From a6b91730053fc61416716ae176081b91de52532b Mon Sep 17 00:00:00 2001 From: nccuong Date: Mon, 4 Mar 2013 15:25:02 +0100 Subject: fdo#60148 Clean up warnings from the Clang compiler plugin Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671 loplugin: clean warnings: unused variables, incorrect indentation and log area. Reviewed-on: https://gerrit.libreoffice.org/2544 Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- UnoControls/source/base/registercontrols.cxx | 9 +- .../extended/accessibleeditbrowseboxcell.cxx | 16 +- autodoc/source/parser_i/idoc/cx_dsapi.cxx | 2 +- basic/source/runtime/iosys.cxx | 2 +- basic/source/sbx/sbxobj.cxx | 6 +- basic/source/sbx/sbxvalue.cxx | 62 +- chart2/source/controller/dialogs/tp_DataSource.cxx | 1 - .../controller/main/ChartDropTargetHelper.cxx | 1 - chart2/source/controller/main/ChartFrameloader.cxx | 66 +- .../source/model/template/BarChartTypeTemplate.cxx | 2 - chart2/source/model/template/ChartTypeTemplate.cxx | 4 +- connectivity/source/drivers/file/FTable.cxx | 2 - .../source/drivers/mork/MResultSetMetaData.cxx | 4 +- .../source/drivers/postgresql/pq_xindexcolumns.cxx | 3 +- .../source/drivers/postgresql/pq_xtable.cxx | 3 - .../source/drivers/postgresql/pq_xtables.cxx | 4 +- .../source/drivers/postgresql/pq_xuser.cxx | 1 - cppcanvas/source/mtfrenderer/emfplus.cxx | 882 ++++++------ cui/source/dialogs/cuigaldlg.cxx | 4 +- cui/source/tabpages/tpbitmap.cxx | 3 - cui/source/tabpages/tpgradnt.cxx | 2 - cui/source/tabpages/tphatch.cxx | 1 - cui/source/tabpages/tplnedef.cxx | 1 - desktop/source/app/lockfile2.cxx | 1 - editeng/source/misc/hangulhanja.cxx | 2 +- filter/source/config/cache/filterfactory.cxx | 18 +- filter/source/graphicfilter/icgm/class2.cxx | 2 +- filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 1 - formula/source/ui/dlg/funcpage.cxx | 1 - framework/source/services/autorecovery.cxx | 24 +- helpcompiler/source/HelpCompiler.cxx | 3 +- hwpfilter/source/hwpreader.cxx | 26 +- .../defaultnumberingprovider.cxx | 12 +- idl/source/prj/command.cxx | 202 +-- jvmfwk/source/elements.cxx | 4 +- l10ntools/source/xrmmerge.cxx | 3 +- padmin/source/adddlg.cxx | 2 - .../source/filter/xml/xmlImportDocumentHandler.cxx | 1 - rsc/source/rscpp/cpp5.c | 30 +- sal/inc/sal/log-areas.dox | 11 +- sc/qa/unit/helper/qahelper.hxx | 1 - sc/qa/unit/subsequent_export-test.cxx | 1 - sc/qa/unit/subsequent_filters-test.cxx | 3 - sc/source/core/tool/compiler.cxx | 16 +- sc/source/filter/oox/extlstcontext.cxx | 11 +- sc/source/ui/drawfunc/drawsh.cxx | 16 +- sc/source/ui/pagedlg/scuitphfedit.cxx | 2 - sc/source/ui/vba/vbafont.cxx | 2 +- sd/source/filter/eppt/pptx-epptooxml.cxx | 6 +- sfx2/source/appl/appuno.cxx | 24 +- sfx2/source/appl/linksrc.cxx | 10 +- sfx2/source/control/bindings.cxx | 4 +- sfx2/source/control/dispatch.cxx | 4 +- sfx2/source/control/shell.cxx | 4 +- sfx2/source/dialog/dinfdlg.cxx | 2 +- sfx2/source/dialog/filedlghelper.cxx | 8 +- sfx2/source/doc/sfxbasemodel.cxx | 4 +- sfx2/source/menu/mnuitem.cxx | 2 +- sfx2/source/view/sfxbasecontroller.cxx | 4 +- .../OGLTrans/generic/OGLTrans_TransitionerImpl.cxx | 8 +- slideshow/source/engine/transitions/fanwipe.cxx | 2 +- svtools/source/contnr/DocumentInfoPreview.cxx | 2 +- svx/source/dialog/srchdlg.cxx | 2 +- svx/source/fmcomp/gridcell.cxx | 2 - svx/source/form/navigatortree.cxx | 4 +- svx/source/gallery2/galobj.cxx | 2 +- unotools/source/config/configitem.cxx | 25 +- vcl/source/filter/wmf/enhwmf.cxx | 1414 ++++++++++---------- vcl/source/gdi/pdfwriter_impl.cxx | 2 +- vcl/source/window/window.cxx | 14 +- vcl/unx/generic/printer/printerinfomanager.cxx | 2 +- vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 3 +- writerperfect/source/draw/WPGImportFilter.cxx | 1 - 73 files changed, 1494 insertions(+), 1537 deletions(-) diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx index dfcdfb0d8f67..94df3e701ba1 100644 --- a/UnoControls/source/base/registercontrols.cxx +++ b/UnoControls/source/base/registercontrols.cxx @@ -122,12 +122,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL ctl_component_getFactory( const s // Write no ";" at end of line and dont forget "else" ! (see macro) //============================================================================= IF_NAME_CREATECOMPONENTFACTORY_SINGLE( FrameControl ) - else - IF_NAME_CREATECOMPONENTFACTORY_SINGLE( ProgressBar ) - else - IF_NAME_CREATECOMPONENTFACTORY_SINGLE( ProgressMonitor ) - else - IF_NAME_CREATECOMPONENTFACTORY_SINGLE( StatusIndicator ) + else IF_NAME_CREATECOMPONENTFACTORY_SINGLE( ProgressBar ) + else IF_NAME_CREATECOMPONENTFACTORY_SINGLE( ProgressMonitor ) + else IF_NAME_CREATECOMPONENTFACTORY_SINGLE( StatusIndicator ) //============================================================================= // Factory is valid - service was found. diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx index dcc29fb45696..146003bac2f5 100644 --- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx +++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx @@ -214,15 +214,15 @@ namespace accessibility { if ( !m_pBrowseBox || !m_xControlAccessible.is() ) throw DisposedException(); - Reference< XAccessibleContext > xMyContext( m_aContext ); - if ( !xMyContext.is() ) - { - Reference< XAccessibleContext > xInnerContext = m_xControlAccessible->getAccessibleContext(); - Reference< XAccessible > xMe( this ); + Reference< XAccessibleContext > xMyContext( m_aContext ); + if ( !xMyContext.is() ) + { + Reference< XAccessibleContext > xInnerContext = m_xControlAccessible->getAccessibleContext(); + Reference< XAccessible > xMe( this ); - xMyContext = new EditBrowseBoxTableCell( m_xParent, xMe, xInnerContext, *m_pBrowseBox, m_xFocusWindow, m_nRowPos, m_nColPos ); - m_aContext = xMyContext; - } + xMyContext = new EditBrowseBoxTableCell( m_xParent, xMe, xInnerContext, *m_pBrowseBox, m_xFocusWindow, m_nRowPos, m_nColPos ); + m_aContext = xMyContext; + } return xMyContext; } //-------------------------------------------------------------------- diff --git a/autodoc/source/parser_i/idoc/cx_dsapi.cxx b/autodoc/source/parser_i/idoc/cx_dsapi.cxx index 9c43d5febf54..a7d8b65bd600 100644 --- a/autodoc/source/parser_i/idoc/cx_dsapi.cxx +++ b/autodoc/source/parser_i/idoc/cx_dsapi.cxx @@ -195,7 +195,7 @@ Context_Docu::PerformStatusFunction( uintt i_nStatusSignal, throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF); else io_rText.CutToken(); - pNewToken = new Tok_EOF; + pNewToken = new Tok_EOF; break; case nF_fin_AnyWord: pNewToken = new Tok_Word(io_rText.CutToken()); diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 4daa688b702b..de08aaacccea 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -704,7 +704,7 @@ namespace void WriteLines(SvStream &rStream, const rtl::OString& rStr) { rtl::OString aStr(convertLineEnd(rStr, rStream.GetLineDelimiter()) ); - write_uInt8s_FromOString(rStream, rStr); + write_uInt8s_FromOString(rStream, aStr); endl( rStream ); } } diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 69f99201309d..da05ce28fc18 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -219,7 +219,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t ) DbgOutf( "SBX: Search %.*s %s %s in %s", nLvl++, " ", ( t >= SbxCLASS_DONTCARE && t <= SbxCLASS_OBJECT ) - ? pCls[ t-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() ); + ? pCls[ t-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr2.getStr() ); #endif if( !GetAll( t ) ) @@ -504,7 +504,7 @@ void SbxObject::Insert( SbxVariable* pVar ) DbgOutf( "SBX: Insert %s %s in %s", ( pVar->GetClass() >= SbxCLASS_DONTCARE && pVar->GetClass() <= SbxCLASS_OBJECT ) - ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() ); + ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr2.getStr() ); #endif } } @@ -547,7 +547,7 @@ void SbxObject::QuickInsert( SbxVariable* pVar ) DbgOutf( "SBX: Insert %s %s in %s", ( pVar->GetClass() >= SbxCLASS_DONTCARE && pVar->GetClass() <= SbxCLASS_OBJECT ) - ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() ); + ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr2.getStr() ); #endif } } diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index e4d9000ca11e..7356f8978343 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -44,37 +44,39 @@ SbxValue::SbxValue( SbxDataType t, void* p ) : SbxBase() else SetFlag( SBX_FIXED ); if( p ) - switch( t & 0x0FFF ) { - case SbxINTEGER: n |= SbxBYREF; aData.pInteger = (sal_Int16*) p; break; - case SbxSALUINT64: n |= SbxBYREF; aData.puInt64 = (sal_uInt64*) p; break; - case SbxSALINT64: - case SbxCURRENCY: n |= SbxBYREF; aData.pnInt64 = (sal_Int64*) p; break; - case SbxLONG: n |= SbxBYREF; aData.pLong = (sal_Int32*) p; break; - case SbxSINGLE: n |= SbxBYREF; aData.pSingle = (float*) p; break; - case SbxDATE: - case SbxDOUBLE: n |= SbxBYREF; aData.pDouble = (double*) p; break; - case SbxSTRING: n |= SbxBYREF; aData.pOUString = (OUString*) p; break; - case SbxERROR: - case SbxUSHORT: - case SbxBOOL: n |= SbxBYREF; aData.pUShort = (sal_uInt16*) p; break; - case SbxULONG: n |= SbxBYREF; aData.pULong = (sal_uInt32*) p; break; - case SbxCHAR: n |= SbxBYREF; aData.pChar = (sal_Unicode*) p; break; - case SbxBYTE: n |= SbxBYREF; aData.pByte = (sal_uInt8*) p; break; - case SbxINT: n |= SbxBYREF; aData.pInt = (int*) p; break; - case SbxOBJECT: - aData.pObj = (SbxBase*) p; - if( p ) - aData.pObj->AddRef(); - break; - case SbxDECIMAL: - aData.pDecimal = (SbxDecimal*) p; - if( p ) - aData.pDecimal->addRef(); - break; - default: - DBG_ASSERT( !this, "Angabe eines Pointers unzulaessig" ); - n = SbxNULL; + switch( t & 0x0FFF ) + { + case SbxINTEGER: n |= SbxBYREF; aData.pInteger = (sal_Int16*) p; break; + case SbxSALUINT64: n |= SbxBYREF; aData.puInt64 = (sal_uInt64*) p; break; + case SbxSALINT64: + case SbxCURRENCY: n |= SbxBYREF; aData.pnInt64 = (sal_Int64*) p; break; + case SbxLONG: n |= SbxBYREF; aData.pLong = (sal_Int32*) p; break; + case SbxSINGLE: n |= SbxBYREF; aData.pSingle = (float*) p; break; + case SbxDATE: + case SbxDOUBLE: n |= SbxBYREF; aData.pDouble = (double*) p; break; + case SbxSTRING: n |= SbxBYREF; aData.pOUString = (OUString*) p; break; + case SbxERROR: + case SbxUSHORT: + case SbxBOOL: n |= SbxBYREF; aData.pUShort = (sal_uInt16*) p; break; + case SbxULONG: n |= SbxBYREF; aData.pULong = (sal_uInt32*) p; break; + case SbxCHAR: n |= SbxBYREF; aData.pChar = (sal_Unicode*) p; break; + case SbxBYTE: n |= SbxBYREF; aData.pByte = (sal_uInt8*) p; break; + case SbxINT: n |= SbxBYREF; aData.pInt = (int*) p; break; + case SbxOBJECT: + aData.pObj = (SbxBase*) p; + if( p ) + aData.pObj->AddRef(); + break; + case SbxDECIMAL: + aData.pDecimal = (SbxDecimal*) p; + if( p ) + aData.pDecimal->addRef(); + break; + default: + DBG_ASSERT( !this, "Angabe eines Pointers unzulaessig" ); + n = SbxNULL; + } } else memset( &aData, 0, sizeof( SbxValues ) ); diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index a13c6779fba9..35fe3500c49a 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -604,7 +604,6 @@ IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl) SvTreeListEntry * pEntry = m_aLB_ROLE.FirstSelected(); if( pEntry ) { - OUString aRange( m_aEDT_RANGE.GetText()); OUString aSelectedRoleUI = lcl_GetSelectedRole( m_aLB_ROLE, true ); OUString aSelectedRange = lcl_GetSelectedRolesRange( m_aLB_ROLE ); diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx index 8669897861d3..83d075a045c5 100644 --- a/chart2/source/controller/main/ChartDropTargetHelper.cxx +++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx @@ -111,7 +111,6 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt ) ::std::vector< OUString > aStrings( lcl_getStringsFromByteSequence( aBytes )); if( aStrings.size() >= 3 && aStrings[0] == "soffice" ) { - OUString aDocName( aStrings[1] ); OUString aRangeString( aStrings[2] ); Reference< container::XChild > xChild( m_xChartDocument, uno::UNO_QUERY ); if( xChild.is()) diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index 5ca460b0be5f..5b2c03b3aaf6 100644 --- a/chart2/source/controller/main/ChartFrameloader.cxx +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -141,45 +141,45 @@ APPHELPER_XSERVICEINFO_IMPL(ChartFrameLoader,CHART_FRAMELOADER_SERVICE_IMPLEMENT // call initNew() or load() at XLoadable if(!bHaveLoadedModel) - try - { - comphelper::MediaDescriptor::const_iterator aIt( aMediaDescriptor.find( aMediaDescriptor.PROP_URL())); - if( aIt != aMediaDescriptor.end()) + try { - ::rtl::OUString aURL( (*aIt).second.get< ::rtl::OUString >()); - if( aURL.matchAsciiL( - RTL_CONSTASCII_STRINGPARAM( "private:factory/schart" ))) - { - // create new file - uno::Reference< frame::XLoadable > xLoadable( xModel, uno::UNO_QUERY_THROW ); - xLoadable->initNew(); - } - else + comphelper::MediaDescriptor::const_iterator aIt( aMediaDescriptor.find( aMediaDescriptor.PROP_URL())); + if( aIt != aMediaDescriptor.end()) { - aMediaDescriptor.addInputStream(); - uno::Sequence< beans::PropertyValue > aCompleteMediaDescriptor; - aMediaDescriptor >> aCompleteMediaDescriptor; - apphelper::MediaDescriptorHelper aMDHelper( aCompleteMediaDescriptor ); - - // load file - // @todo: replace: aMediaDescriptorHelper.getReducedForModel() - uno::Reference< frame::XLoadable > xLoadable( xModel, uno::UNO_QUERY_THROW ); - xLoadable->load( aCompleteMediaDescriptor ); - - //resize standalone files to get correct size: - if( xComponentWindow.is() && aMDHelper.ISSET_FilterName && aMDHelper.FilterName.equals( "StarChart 5.0") ) + ::rtl::OUString aURL( (*aIt).second.get< ::rtl::OUString >()); + if( aURL.matchAsciiL( + RTL_CONSTASCII_STRINGPARAM( "private:factory/schart" ))) + { + // create new file + uno::Reference< frame::XLoadable > xLoadable( xModel, uno::UNO_QUERY_THROW ); + xLoadable->initNew(); + } + else { - awt::Rectangle aRect( xComponentWindow->getPosSize() ); - sal_Int16 nFlags=0; - xComponentWindow->setPosSize( aRect.X, aRect.Y, aRect.Width, aRect.Height, nFlags ); + aMediaDescriptor.addInputStream(); + uno::Sequence< beans::PropertyValue > aCompleteMediaDescriptor; + aMediaDescriptor >> aCompleteMediaDescriptor; + apphelper::MediaDescriptorHelper aMDHelper( aCompleteMediaDescriptor ); + + // load file + // @todo: replace: aMediaDescriptorHelper.getReducedForModel() + uno::Reference< frame::XLoadable > xLoadable( xModel, uno::UNO_QUERY_THROW ); + xLoadable->load( aCompleteMediaDescriptor ); + + //resize standalone files to get correct size: + if( xComponentWindow.is() && aMDHelper.ISSET_FilterName && aMDHelper.FilterName.equals( "StarChart 5.0") ) + { + awt::Rectangle aRect( xComponentWindow->getPosSize() ); + sal_Int16 nFlags=0; + xComponentWindow->setPosSize( aRect.X, aRect.Y, aRect.Width, aRect.Height, nFlags ); + } } } } - } - catch( const uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); - } + catch( const uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + } return sal_True; } diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx index 260b12ece08b..1c1ec10e069b 100644 --- a/chart2/source/model/template/BarChartTypeTemplate.cxx +++ b/chart2/source/model/template/BarChartTypeTemplate.cxx @@ -188,8 +188,6 @@ sal_Bool SAL_CALL BarChartTypeTemplate::matchesTemplate( bResult && getDimension() == 3 ) { - ::std::vector< Reference< chart2::XDataSeries > > aSeriesVec( - DiagramHelper::getDataSeriesFromDiagram( xDiagram )); bool bGeomFound = false, bGeomAmbiguous = false; sal_Int32 aCommonGeom = DiagramHelper::getGeometry3D( xDiagram, bGeomFound, bGeomAmbiguous ); diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 3f7899f34e15..7858edf87cac 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -237,8 +237,8 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram > } // remove charttype groups from all coordinate systems - Sequence< Reference< XChartType > > aOldChartTypesSeq( - DiagramHelper::getChartTypesFromDiagram(xDiagram) ); + Sequence< Reference< XChartType > > aOldChartTypesSeq( + DiagramHelper::getChartTypesFromDiagram(xDiagram) ); Reference< XCoordinateSystemContainer > xCoordSysCnt( xDiagram, uno::UNO_QUERY ); OSL_ASSERT( xCoordSysCnt.is()); diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index d947c251a2b5..8dc2c7106544 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -51,8 +51,6 @@ OFileTable::OFileTable(sdbcx::OCollection* _pTables,OConnection* _pConnection) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::OFileTable" ); DBG_CTOR( file_OFileTable, NULL ); construct(); - TStringVector aVector; - // m_pColumns = new OColumns(this,m_aMutex,aVector); m_aColumns = new OSQLColumns(); } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mork/MResultSetMetaData.cxx b/connectivity/source/drivers/mork/MResultSetMetaData.cxx index 57f6dea980ac..778bdae69ac6 100644 --- a/connectivity/source/drivers/mork/MResultSetMetaData.cxx +++ b/connectivity/source/drivers/mork/MResultSetMetaData.cxx @@ -158,10 +158,8 @@ sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLE } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { - ::rtl::OUString sColumnName( getColumnName( column ) ); - if ( !m_pTable || !m_pTable->getConnection() ) { OSL_FAIL( "OResultSetMetaData::isSearchable: suspicious: called without table or connection!" ); diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index 8f8e68df6683..b654171f27d5 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -187,12 +187,11 @@ void IndexColumns::refresh() void IndexColumns::appendByDescriptor( - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& future ) + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& /*future*/ ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException) { - OUString name = extractStringProperty( future, getStatics().NAME ); throw com::sun::star::sdbc::SQLException( "SDBC-POSTGRESQL: IndexesColumns.appendByDescriptor not yet implemented", *this, OUString(), 1, Any() ); diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx index e6210eac3850..7ba75f8131dd 100644 --- a/connectivity/source/drivers/postgresql/pq_xtable.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx @@ -293,8 +293,6 @@ void Table::alterColumnByIndex( Reference< com::sun::star::container::XIndexAccess > colums = Reference< com::sun::star::container::XIndexAccess>( getColumns(), UNO_QUERY ); Reference< com::sun::star::beans::XPropertySet> column(colums->getByIndex( index ), UNO_QUERY ); - OUString oldName = extractStringProperty( column, getStatics().NAME ); - OUString newName = extractStringProperty( descriptor, getStatics().NAME ); ::pq_sdbc_driver::alterColumnByDescriptor( extractStringProperty( this, getStatics().SCHEMA_NAME ), extractStringProperty( this, getStatics().NAME ), @@ -302,7 +300,6 @@ void Table::alterColumnByIndex( m_conn->createStatement(), column, descriptor ); -// m_pColumns->rename( oldName, newName ); m_pColumns->refresh(); } diff --git a/connectivity/source/drivers/postgresql/pq_xtables.cxx b/connectivity/source/drivers/postgresql/pq_xtables.cxx index 705adcf4f2c2..92c0f12f2dfe 100644 --- a/connectivity/source/drivers/postgresql/pq_xtables.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtables.cxx @@ -321,9 +321,7 @@ void Tables::appendByDescriptor( while( xEnum.is() && xEnum->hasMoreElements() ) { Reference< XPropertySet > column( xEnum->nextElement(), UNO_QUERY ); - // help text seems to be used by OOo rather than Description -// OUString description = extractStringProperty( column, st.HELP_TEXT ); - OUString helpText = extractStringProperty( column,st.DESCRIPTION ); + description = extractStringProperty( column,st.DESCRIPTION ); if( description.getLength() ) { buf = OUStringBuffer( 128 ); diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx index e76b29ff9dc8..b96450a7bd94 100644 --- a/connectivity/source/drivers/postgresql/pq_xuser.cxx +++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx @@ -184,7 +184,6 @@ sal_Int32 User::getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType if( isLog( m_pSettings, LogLevel::INFO ) ) { Statics & st = getStatics(); - rtl::OUString user = extractStringProperty( this, st.NAME ); rtl::OUStringBuffer buf( 128 ); buf.append( "User::getPrivileges[" + extractStringProperty( this, st.NAME ) + diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index b9a24f10dfa7..ddec8e0802ca 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1217,550 +1217,552 @@ namespace cppcanvas } if (type != EmfPlusRecordTypeObject || !(flags & 0x8000)) - switch (type) { - case EmfPlusRecordTypeHeader: - sal_uInt32 header, version; - - rMF >> header >> version >> nHDPI >> nVDPI; - - EMFP_DEBUG (printf ("EMF+ Header\n")); - EMFP_DEBUG (printf ("EMF+\theader: 0x%08x version: %u horizontal DPI: %d vertical DPI: %d dual: %d\n", (int)header, (unsigned int)version, (int)nHDPI, (int)nVDPI,(int)( flags & 1))); - - break; - case EmfPlusRecordTypeEndOfFile: - EMFP_DEBUG (printf ("EMF+ EndOfFile\n")); - break; - case EmfPlusRecordTypeGetDC: - EMFP_DEBUG (printf ("EMF+ GetDC\n")); - EMFP_DEBUG (printf ("EMF+\talready used in svtools wmf/emf filter parser\n")); - break; - case EmfPlusRecordTypeObject: - processObjectRecord (rMF, flags, dataSize); - break; - case EmfPlusRecordTypeFillPie: - { - sal_uInt32 brushIndexOrColor; - float startAngle, sweepAngle; - - rMF >> brushIndexOrColor >> startAngle >> sweepAngle; - - EMFP_DEBUG (printf ("EMF+ FillPie colorOrIndex: %x startAngle: %f sweepAngle: %f\n", (unsigned int)brushIndexOrColor, startAngle, sweepAngle)); - - float dx, dy, dw, dh; - - ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); - - EMFP_DEBUG (printf ("EMF+ RectData: %f,%f %fx%f\n", dx, dy, dw, dh)); - - startAngle = 2*M_PI*startAngle/360; - sweepAngle = 2*M_PI*sweepAngle/360; - - B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2)); - B2DSize mappedSize( MapSize (dw/2, dh/2)); - - double endAngle = startAngle + sweepAngle; - if (endAngle < 0) - endAngle += M_PI*2; - endAngle = fmod (endAngle, M_PI*2); - - if (sweepAngle < 0) { - double tmp = startAngle; - startAngle = endAngle; - endAngle = tmp; - } + { + switch (type) { + case EmfPlusRecordTypeHeader: + sal_uInt32 header, version; - EMFP_DEBUG (printf ("EMF+ angles: %f,%f ---> %f,%f\n", startAngle, sweepAngle, startAngle, endAngle)); + rMF >> header >> version >> nHDPI >> nVDPI; - B2DPolygon polygon = tools::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX (), mappedSize.getY (), startAngle, endAngle); - polygon.append (mappedCenter); - polygon.setClosed (true); + EMFP_DEBUG (printf ("EMF+ Header\n")); + EMFP_DEBUG (printf ("EMF+\theader: 0x%08x version: %u horizontal DPI: %d vertical DPI: %d dual: %d\n", (int)header, (unsigned int)version, (int)nHDPI, (int)nVDPI,(int)( flags & 1))); - B2DPolyPolygon polyPolygon (polygon); - EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); - } - break; - case EmfPlusRecordTypeFillPath: - { - sal_uInt32 index = flags & 0xff; - sal_uInt32 brushIndexOrColor; + break; + case EmfPlusRecordTypeEndOfFile: + EMFP_DEBUG (printf ("EMF+ EndOfFile\n")); + break; + case EmfPlusRecordTypeGetDC: + EMFP_DEBUG (printf ("EMF+ GetDC\n")); + EMFP_DEBUG (printf ("EMF+\talready used in svtools wmf/emf filter parser\n")); + break; + case EmfPlusRecordTypeObject: + processObjectRecord (rMF, flags, dataSize); + break; + case EmfPlusRecordTypeFillPie: + { + sal_uInt32 brushIndexOrColor; + float startAngle, sweepAngle; - rMF >> brushIndexOrColor; + rMF >> brushIndexOrColor >> startAngle >> sweepAngle; - EMFP_DEBUG (printf ("EMF+ FillPath slot: %u\n", (unsigned int)index)); + EMFP_DEBUG (printf ("EMF+ FillPie colorOrIndex: %x startAngle: %f sweepAngle: %f\n", (unsigned int)brushIndexOrColor, startAngle, sweepAngle)); - EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])->GetPolygon (*this), rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); - } - break; - case EmfPlusRecordTypeFillRects: - { - EMFP_DEBUG (printf ("EMF+ FillRects\n")); + float dx, dy, dw, dh; - sal_uInt32 brushIndexOrColor; - sal_Int32 rectangles; - ::basegfx::B2DPolygon polygon; + ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); - rMF >> brushIndexOrColor >> rectangles; + EMFP_DEBUG (printf ("EMF+ RectData: %f,%f %fx%f\n", dx, dy, dw, dh)); - EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : "brush index", (unsigned int)brushIndexOrColor)); + startAngle = 2*M_PI*startAngle/360; + sweepAngle = 2*M_PI*sweepAngle/360; - for (int i=0; i < rectangles; i++) { - if (flags & 0x4000) { - /* 16bit integers */ - sal_Int16 x, y, width, height; + B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2)); + B2DSize mappedSize( MapSize (dw/2, dh/2)); - rMF >> x >> y >> width >> height; + double endAngle = startAngle + sweepAngle; + if (endAngle < 0) + endAngle += M_PI*2; + endAngle = fmod (endAngle, M_PI*2); - polygon.append (Map (x, y)); - polygon.append (Map (x + width, y)); - polygon.append (Map (x + width, y + height)); - polygon.append (Map (x, y + height)); + if (sweepAngle < 0) { + double tmp = startAngle; + startAngle = endAngle; + endAngle = tmp; + } - EMFP_DEBUG (printf ("EMF+\trectangle: %d,%d %dx%d\n", x, y, width, height)); - } else { - /* Single's */ - float x, y, width, height; + EMFP_DEBUG (printf ("EMF+ angles: %f,%f ---> %f,%f\n", startAngle, sweepAngle, startAngle, endAngle)); - rMF >> x >> y >> width >> height; + B2DPolygon polygon = tools::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX (), mappedSize.getY (), startAngle, endAngle); + polygon.append (mappedCenter); + polygon.setClosed (true); - polygon.append (Map (x, y)); - polygon.append (Map (x + width, y)); - polygon.append (Map (x + width, y + height)); - polygon.append (Map (x, y + height)); + B2DPolyPolygon polyPolygon (polygon); + EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); + } + break; + case EmfPlusRecordTypeFillPath: + { + sal_uInt32 index = flags & 0xff; + sal_uInt32 brushIndexOrColor; - EMFP_DEBUG (printf ("EMF+\trectangle: %f,%f %fx%f\n", x, y, width, height)); - } + rMF >> brushIndexOrColor; - ::basegfx::B2DPolyPolygon polyPolygon (polygon); + EMFP_DEBUG (printf ("EMF+ FillPath slot: %u\n", (unsigned int)index)); - EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); + EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])->GetPolygon (*this), rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); } break; - } - case EmfPlusRecordTypeFillPolygon: - { - EMFP_DEBUG (sal_uInt8 index = flags & 0xff); - sal_uInt32 brushIndexOrColor; - sal_Int32 points; + case EmfPlusRecordTypeFillRects: + { + EMFP_DEBUG (printf ("EMF+ FillRects\n")); - rMF >> brushIndexOrColor; - rMF >> points; + sal_uInt32 brushIndexOrColor; + sal_Int32 rectangles; + ::basegfx::B2DPolygon polygon; - EMFP_DEBUG (printf ("EMF+ FillPolygon in slot: %d points: %d\n", index, points)); - EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : "brush index", brushIndexOrColor)); + rMF >> brushIndexOrColor >> rectangles; - EMFPPath path (points, true); - path.Read (rMF, flags, *this); + EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : "brush index", (unsigned int)brushIndexOrColor)); + for (int i=0; i < rectangles; i++) { + if (flags & 0x4000) { + /* 16bit integers */ + sal_Int16 x, y, width, height; - EMFPPlusFillPolygon (path.GetPolygon (*this), rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); + rMF >> x >> y >> width >> height; - break; - } - case EmfPlusRecordTypeDrawLines: - { - sal_uInt32 index = flags & 0xff; - sal_uInt32 points; + polygon.append (Map (x, y)); + polygon.append (Map (x + width, y)); + polygon.append (Map (x + width, y + height)); + polygon.append (Map (x, y + height)); - rMF >> points; + EMFP_DEBUG (printf ("EMF+\trectangle: %d,%d %dx%d\n", x, y, width, height)); + } else { + /* Single's */ + float x, y, width, height; - EMFP_DEBUG (printf ("EMF+ DrawLines in slot: %u points: %u\n", (unsigned int)index, (unsigned int)points)); + rMF >> x >> y >> width >> height; - EMFPPath path (points, true); - path.Read (rMF, flags, *this); + polygon.append (Map (x, y)); + polygon.append (Map (x + width, y)); + polygon.append (Map (x + width, y + height)); + polygon.append (Map (x, y + height)); - EMFPPen* pen = (EMFPPen*) aObjects [index]; + EMFP_DEBUG (printf ("EMF+\trectangle: %f,%f %fx%f\n", x, y, width, height)); + } - rState.isFillColorSet = false; - rState.isLineColorSet = true; - rState.lineColor = ::vcl::unotools::colorToDoubleSequence (pen->GetColor (), - rCanvas->getUNOCanvas ()->getDevice()->getDeviceColorSpace() ); - ::basegfx::B2DPolyPolygon& polygon (path.GetPolygon (*this)); + ::basegfx::B2DPolyPolygon polyPolygon (polygon); - polygon.transform( rState.mapModeTransform ); + EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); + } + break; + } + case EmfPlusRecordTypeFillPolygon: + { + EMFP_DEBUG (sal_uInt8 index = flags & 0xff); + sal_uInt32 brushIndexOrColor; + sal_Int32 points; - rendering::StrokeAttributes aStrokeAttributes; + rMF >> brushIndexOrColor; + rMF >> points; - pen->SetStrokeAttributes (aStrokeAttributes, *this, rState); + EMFP_DEBUG (printf ("EMF+ FillPolygon in slot: %d points: %d\n", index, points)); + EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : "brush index", brushIndexOrColor)); - ActionSharedPtr pPolyAction( - internal::PolyPolyActionFactory::createPolyPolyAction( - polygon, rFactoryParms.mrCanvas, rState, aStrokeAttributes ) ); + EMFPPath path (points, true); + path.Read (rMF, flags, *this); - if( pPolyAction ) - { - maActions.push_back( - MtfAction( - pPolyAction, - rFactoryParms.mrCurrActionIndex ) ); - rFactoryParms.mrCurrActionIndex += pPolyAction->getActionCount()-1; - } + EMFPPlusFillPolygon (path.GetPolygon (*this), rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); - break; - } - case EmfPlusRecordTypeDrawPath: - { - sal_uInt32 penIndex; + break; + } + case EmfPlusRecordTypeDrawLines: + { + sal_uInt32 index = flags & 0xff; + sal_uInt32 points; - rMF >> penIndex; + rMF >> points; - EMFP_DEBUG (printf ("EMF+ DrawPath\n")); - EMFP_DEBUG (printf ("EMF+\tpen: %u\n", (unsigned int)penIndex)); + EMFP_DEBUG (printf ("EMF+ DrawLines in slot: %u points: %u\n", (unsigned int)index, (unsigned int)points)); - EMFPPath* path = (EMFPPath*) aObjects [flags & 0xff]; - EMFPPen* pen = (EMFPPen*) aObjects [penIndex & 0xff]; + EMFPPath path (points, true); + path.Read (rMF, flags, *this); - SAL_WARN_IF( !pen, "cppcanvas", "EmfPlusRecordTypeDrawPath missing pen" ); - SAL_WARN_IF( !path, "cppcanvas", "EmfPlusRecordTypeDrawPath missing path" ); + EMFPPen* pen = (EMFPPen*) aObjects [index]; - if (pen && path) - { rState.isFillColorSet = false; rState.isLineColorSet = true; rState.lineColor = ::vcl::unotools::colorToDoubleSequence (pen->GetColor (), - rCanvas->getUNOCanvas ()->getDevice()->getDeviceColorSpace()); - ::basegfx::B2DPolyPolygon& polygon (path->GetPolygon (*this)); + rCanvas->getUNOCanvas ()->getDevice()->getDeviceColorSpace() ); + ::basegfx::B2DPolyPolygon& polygon (path.GetPolygon (*this)); polygon.transform( rState.mapModeTransform ); + rendering::StrokeAttributes aStrokeAttributes; pen->SetStrokeAttributes (aStrokeAttributes, *this, rState); - ActionSharedPtr pPolyAction( - internal::PolyPolyActionFactory::createPolyPolyAction( - polygon, rFactoryParms.mrCanvas, rState, aStrokeAttributes ) ); + ActionSharedPtr pPolyAction( + internal::PolyPolyActionFactory::createPolyPolyAction( + polygon, rFactoryParms.mrCanvas, rState, aStrokeAttributes ) ); - if( pPolyAction ) - { - maActions.push_back( - MtfAction( - pPolyAction, - rFactoryParms.mrCurrActionIndex ) ); + if( pPolyAction ) + { + maActions.push_back( + MtfAction( + pPolyAction, + rFactoryParms.mrCurrActionIndex ) ); - rFactoryParms.mrCurrActionIndex += pPolyAction->getActionCount()-1; - } - } - break; - } - case EmfPlusRecordTypeDrawImage: - case EmfPlusRecordTypeDrawImagePoints: - { - sal_uInt32 attrIndex; - sal_Int32 sourceUnit; + rFactoryParms.mrCurrActionIndex += pPolyAction->getActionCount()-1; + } - rMF >> attrIndex >> sourceUnit; + break; + } + case EmfPlusRecordTypeDrawPath: + { + sal_uInt32 penIndex; - EMFP_DEBUG (printf ("EMF+ %s attributes index: %d source unit: %d\n", type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage", (int)attrIndex, (int)sourceUnit)); - EMFP_DEBUG (printf ("EMF+\tTODO: use image attributes\n")); + rMF >> penIndex; - if (sourceUnit == 2 && aObjects [flags & 0xff]) { // we handle only GraphicsUnit.Pixel now - EMFPImage& image = *(EMFPImage *) aObjects [flags & 0xff]; - float sx, sy, sw, sh; - sal_Int32 aCount; + EMFP_DEBUG (printf ("EMF+ DrawPath\n")); + EMFP_DEBUG (printf ("EMF+\tpen: %u\n", (unsigned int)penIndex)); - ReadRectangle (rMF, sx, sy, sw, sh); + EMFPPath* path = (EMFPPath*) aObjects [flags & 0xff]; + EMFPPen* pen = (EMFPPen*) aObjects [penIndex & 0xff]; - EMFP_DEBUG (printf ("EMF+ %s source rectangle: %f,%f %fx%f\n", type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage", sx, sy, sw, sh)); + SAL_WARN_IF( !pen, "cppcanvas", "EmfPlusRecordTypeDrawPath missing pen" ); + SAL_WARN_IF( !path, "cppcanvas", "EmfPlusRecordTypeDrawPath missing path" ); - ::basegfx::B2DPoint aDstPoint; - ::basegfx::B2DSize aDstSize; - bool bValid = false; + if (pen && path) + { + rState.isFillColorSet = false; + rState.isLineColorSet = true; + rState.lineColor = ::vcl::unotools::colorToDoubleSequence (pen->GetColor (), + rCanvas->getUNOCanvas ()->getDevice()->getDeviceColorSpace()); + ::basegfx::B2DPolyPolygon& polygon (path->GetPolygon (*this)); - if (type == EmfPlusRecordTypeDrawImagePoints) { - rMF >> aCount; + polygon.transform( rState.mapModeTransform ); + rendering::StrokeAttributes aStrokeAttributes; - if( aCount == 3) { // TODO: now that we now that this value is count we should support it better - float x1, y1, x2, y2, x3, y3; + pen->SetStrokeAttributes (aStrokeAttributes, *this, rState); - ReadPoint (rMF, x1, y1, flags); - ReadPoint (rMF, x2, y2, flags); - ReadPoint (rMF, x3, y3, flags); + ActionSharedPtr pPolyAction( + internal::PolyPolyActionFactory::createPolyPolyAction( + polygon, rFactoryParms.mrCanvas, rState, aStrokeAttributes ) ); - aDstPoint = Map (x1, y1); - aDstSize = MapSize(x2 - x1, y3 - y1); + if( pPolyAction ) + { + maActions.push_back( + MtfAction( + pPolyAction, + rFactoryParms.mrCurrActionIndex ) ); - bValid = true; + rFactoryParms.mrCurrActionIndex += pPolyAction->getActionCount()-1; } - } else if (type == EmfPlusRecordTypeDrawImage) { - float dx, dy, dw, dh; - - ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); - - aDstPoint = Map (dx, dy); - aDstSize = MapSize(dw, dh); - - bValid = true; } + break; + } + case EmfPlusRecordTypeDrawImage: + case EmfPlusRecordTypeDrawImagePoints: + { + sal_uInt32 attrIndex; + sal_Int32 sourceUnit; - if (bValid) { - BitmapEx aBmp( image.graphic.GetBitmapEx () ); - const Rectangle aCropRect (::vcl::unotools::pointFromB2DPoint (basegfx::B2DPoint (sx, sy)), - ::vcl::unotools::sizeFromB2DSize (basegfx::B2DSize(sw, sh))); - aBmp.Crop( aCropRect ); + rMF >> attrIndex >> sourceUnit; + EMFP_DEBUG (printf ("EMF+ %s attributes index: %d source unit: %d\n", type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage", (int)attrIndex, (int)sourceUnit)); + EMFP_DEBUG (printf ("EMF+\tTODO: use image attributes\n")); - Size aSize( aBmp.GetSizePixel() ); - if( aSize.Width() > 0 && aSize.Height() > 0 ) { - ActionSharedPtr pBmpAction ( - internal::BitmapActionFactory::createBitmapAction ( - aBmp, - rState.mapModeTransform * aDstPoint, - rState.mapModeTransform * aDstSize, - rCanvas, - rState)); + if (sourceUnit == 2 && aObjects [flags & 0xff]) { // we handle only GraphicsUnit.Pixel now + EMFPImage& image = *(EMFPImage *) aObjects [flags & 0xff]; + float sx, sy, sw, sh; + sal_Int32 aCount; - if( pBmpAction ) { - maActions.push_back( MtfAction( pBmpAction, - rFactoryParms.mrCurrActionIndex ) ); + ReadRectangle (rMF, sx, sy, sw, sh); - rFactoryParms.mrCurrActionIndex += pBmpAction->getActionCount()-1; - } - } else { - EMFP_DEBUG (printf ("EMF+ warning: empty bitmap\n")); - } - } else { - EMFP_DEBUG (printf ("EMF+ DrawImage(Points) TODO (fixme)\n")); - } - } else { - EMFP_DEBUG (printf ("EMF+ DrawImage(Points) TODO (fixme) - possibly unsupported source units for crop rectangle\n")); - } - break; - } - case EmfPlusRecordTypeDrawString: - { - EMFP_DEBUG (printf ("EMF+ DrawString\n")); + EMFP_DEBUG (printf ("EMF+ %s source rectangle: %f,%f %fx%f\n", type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage", sx, sy, sw, sh)); - sal_uInt32 brushId; - sal_uInt32 formatId; - sal_uInt32 stringLength; + ::basegfx::B2DPoint aDstPoint; + ::basegfx::B2DSize aDstSize; + bool bValid = false; - rMF >> brushId >> formatId >> stringLength; - EMFP_DEBUG (printf ("EMF+ DrawString brushId: %x formatId: %x length: %x\n", brushId, formatId, stringLength)); + if (type == EmfPlusRecordTypeDrawImagePoints) { + rMF >> aCount; - if (flags & 0x8000) { - float lx, ly, lw, lh; + if( aCount == 3) { // TODO: now that we now that this value is count we should support it better + float x1, y1, x2, y2, x3, y3; - rMF >> lx >> ly >> lw >> lh; + ReadPoint (rMF, x1, y1, flags); + ReadPoint (rMF, x2, y2, flags); + ReadPoint (rMF, x3, y3, flags); - EMFP_DEBUG (printf ("EMF+ DrawString layoutRect: %f,%f - %fx%f\n", lx, ly, lw, lh)); + aDstPoint = Map (x1, y1); + aDstSize = MapSize(x2 - x1, y3 - y1); - rtl::OUString text = read_uInt16s_ToOUString(rMF, stringLength); + bValid = true; + } + } else if (type == EmfPlusRecordTypeDrawImage) { + float dx, dy, dw, dh; - double cellSize = setFont (flags & 0xff, rFactoryParms, rState); - SET_TEXT_COLOR( brushId ); + ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); - ActionSharedPtr pTextAction( - TextActionFactory::createTextAction( - // position is just rough guess for now - // we should calculate it exactly from layoutRect or font - ::vcl::unotools::pointFromB2DPoint ( Map( lx + 0.15*cellSize, ly + cellSize ) ), - ::Size(), - ::Color(), - ::Size(), - ::Color(), - text, - 0, - stringLength, - NULL, - rFactoryParms.mrVDev, - rFactoryParms.mrCanvas, - rState, - rFactoryParms.mrParms, - false ) ); - if( pTextAction ) - { - EMFP_DEBUG (printf ("EMF+\t\tadd text action\n")); + aDstPoint = Map (dx, dy); + aDstSize = MapSize(dw, dh); - maActions.push_back( - MtfAction( - pTextAction, - rFactoryParms.mrCurrActionIndex ) ); + bValid = true; + } - rFactoryParms.mrCurrActionIndex += pTextAction->getActionCount()-1; + if (bValid) { + BitmapEx aBmp( image.graphic.GetBitmapEx () ); + const Rectangle aCropRect (::vcl::unotools::pointFromB2DPoint (basegfx::B2DPoint (sx, sy)), + ::vcl::unotools::sizeFromB2DSize (basegfx::B2DSize(sw, sh))); + aBmp.Crop( aCropRect ); + + + Size aSize( aBmp.GetSizePixel() ); + if( aSize.Width() > 0 && aSize.Height() > 0 ) { + ActionSharedPtr pBmpAction ( + internal::BitmapActionFactory::createBitmapAction ( + aBmp, + rState.mapModeTransform * aDstPoint, + rState.mapModeTransform * aDstSize, + rCanvas, + rState)); + + if( pBmpAction ) { + maActions.push_back( MtfAction( pBmpAction, + rFactoryParms.mrCurrActionIndex ) ); + + rFactoryParms.mrCurrActionIndex += pBmpAction->getActionCount()-1; + } + } else { + EMFP_DEBUG (printf ("EMF+ warning: empty bitmap\n")); + } + } else { + EMFP_DEBUG (printf ("EMF+ DrawImage(Points) TODO (fixme)\n")); + } + } else { + EMFP_DEBUG (printf ("EMF+ DrawImage(Points) TODO (fixme) - possibly unsupported source units for crop rectangle\n")); } - } else { - EMFP_DEBUG (printf ("EMF+ DrawString TODO - drawing with brush not yet supported\n")); + break; } - } - break; - case EmfPlusRecordTypeSetPageTransform: - rMF >> fPageScale; - - EMFP_DEBUG (printf ("EMF+ SetPageTransform\n")); - EMFP_DEBUG (printf ("EMF+\tscale: %f unit: %d\n", fPageScale, flags)); - EMFP_DEBUG (printf ("EMF+\tTODO\n")); - break; - case EmfPlusRecordTypeSetRenderingOrigin: - rMF >> nOriginX >> nOriginY; - EMFP_DEBUG (printf ("EMF+ SetRenderingOrigin\n")); - EMFP_DEBUG (printf ("EMF+\torigin [x,y]: %d,%d\n", (int)nOriginX, (int)nOriginY)); - break; - case EmfPlusRecordTypeSetTextRenderingHint: - EMFP_DEBUG (printf ("EMF+ SetTextRenderingHint\n")); - EMFP_DEBUG (printf ("EMF+\tTODO\n")); - break; - case EmfPlusRecordTypeSetAntiAliasMode: - EMFP_DEBUG (printf ("EMF+ SetAntiAliasMode\n")); - EMFP_DEBUG (printf ("EMF+\tTODO\n")); - break; - case EmfPlusRecordTypeSetInterpolationMode: - EMFP_DEBUG (printf ("EMF+ InterpolationMode\n")); - EMFP_DEBUG (printf ("EMF+\tTODO\n")); - break; - case EmfPlusRecordTypeSetPixelOffsetMode: - EMFP_DEBUG (printf ("EMF+ SetPixelOffsetMode\n")); - EMFP_DEBUG (printf ("EMF+\tTODO\n")); - break; - case EmfPlusRecordTypeSetCompositingQuality: - EMFP_DEBUG (printf ("EMF+ SetCompositingQuality\n")); - EMFP_DEBUG (printf ("EMF+\tTODO\n")); - break; - case EmfPlusRecordTypeSave: - EMFP_DEBUG (printf ("EMF+ Save\n")); - EMFP_DEBUG (printf ("EMF+\tTODO\n")); - break; - case EmfPlusRecordTypeSetWorldTransform: { - EMFP_DEBUG (printf ("EMF+ SetWorldTransform\n")); - XForm transform; - rMF >> transform; - aWorldTransform.Set (transform); - EMFP_DEBUG (printf ("EMF+\tm11: %f m12: %f\nEMF+\tm21: %f m22: %f\nEMF+\tdx: %f dy: %f\n", - aWorldTransform.eM11, aWorldTransform.eM12, - aWorldTransform.eM21, aWorldTransform.eM22, - aWorldTransform.eDx, aWorldTransform.eDy)); - break; - } - case EmfPlusRecordTypeResetWorldTransform: - EMFP_DEBUG (printf ("EMF+ ResetWorldTransform\n")); - aWorldTransform.SetIdentity (); - break; - case EmfPlusRecordTypeMultiplyWorldTransform: { - EMFP_DEBUG (printf ("EMF+ MultiplyWorldTransform\n")); - XForm transform; - rMF >> transform; - - EMFP_DEBUG (printf ("EMF+\tmatrix m11: %f m12: %f\nEMF+\tm21: %f m22: %f\nEMF+\tdx: %f dy: %f\n", - transform.eM11, transform.eM12, - transform.eM21, transform.eM22, - transform.eDx, transform.eDy)); + case EmfPlusRecordTypeDrawString: + { + EMFP_DEBUG (printf ("EMF+ DrawString\n")); + + sal_uInt32 brushId; + sal_uInt32 formatId; + sal_uInt32 stringLength; + + rMF >> brushId >> formatId >> stringLength; + EMFP_DEBUG (printf ("EMF+ DrawString brushId: %x formatId: %x length: %x\n", brushId, formatId, stringLength)); + + if (flags & 0x8000) { + float lx, ly, lw, lh; + + rMF >> lx >> ly >> lw >> lh; + + EMFP_DEBUG (printf ("EMF+ DrawString layoutRect: %f,%f - %fx%f\n", lx, ly, lw, lh)); + + rtl::OUString text = read_uInt16s_ToOUString(rMF, stringLength); + + double cellSize = setFont (flags & 0xff, rFactoryParms, rState); + SET_TEXT_COLOR( brushId ); + + ActionSharedPtr pTextAction( + TextActionFactory::createTextAction( + // position is just rough guess for now + // we should calculate it exactly from layoutRect or font + ::vcl::unotools::pointFromB2DPoint ( Map( lx + 0.15*cellSize, ly + cellSize ) ), + ::Size(), + ::Color(), + ::Size(), + ::Color(), + text, + 0, + stringLength, + NULL, + rFactoryParms.mrVDev, + rFactoryParms.mrCanvas, + rState, + rFactoryParms.mrParms, + false ) ); + if( pTextAction ) + { + EMFP_DEBUG (printf ("EMF+\t\tadd text action\n")); + + maActions.push_back( + MtfAction( + pTextAction, + rFactoryParms.mrCurrActionIndex ) ); + + rFactoryParms.mrCurrActionIndex += pTextAction->getActionCount()-1; + } + } else { + EMFP_DEBUG (printf ("EMF+ DrawString TODO - drawing with brush not yet supported\n")); + } + } + break; + case EmfPlusRecordTypeSetPageTransform: + rMF >> fPageScale; - if (flags & 0x2000) // post multiply - aWorldTransform.Multiply (transform); - else { // pre multiply - transform.Multiply (aWorldTransform); + EMFP_DEBUG (printf ("EMF+ SetPageTransform\n")); + EMFP_DEBUG (printf ("EMF+\tscale: %f unit: %d\n", fPageScale, flags)); + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + break; + case EmfPlusRecordTypeSetRenderingOrigin: + rMF >> nOriginX >> nOriginY; + EMFP_DEBUG (printf ("EMF+ SetRenderingOrigin\n")); + EMFP_DEBUG (printf ("EMF+\torigin [x,y]: %d,%d\n", (int)nOriginX, (int)nOriginY)); + break; + case EmfPlusRecordTypeSetTextRenderingHint: + EMFP_DEBUG (printf ("EMF+ SetTextRenderingHint\n")); + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + break; + case EmfPlusRecordTypeSetAntiAliasMode: + EMFP_DEBUG (printf ("EMF+ SetAntiAliasMode\n")); + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + break; + case EmfPlusRecordTypeSetInterpolationMode: + EMFP_DEBUG (printf ("EMF+ InterpolationMode\n")); + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + break; + case EmfPlusRecordTypeSetPixelOffsetMode: + EMFP_DEBUG (printf ("EMF+ SetPixelOffsetMode\n")); + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + break; + case EmfPlusRecordTypeSetCompositingQuality: + EMFP_DEBUG (printf ("EMF+ SetCompositingQuality\n")); + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + break; + case EmfPlusRecordTypeSave: + EMFP_DEBUG (printf ("EMF+ Save\n")); + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + break; + case EmfPlusRecordTypeSetWorldTransform: { + EMFP_DEBUG (printf ("EMF+ SetWorldTransform\n")); + XForm transform; + rMF >> transform; aWorldTransform.Set (transform); + EMFP_DEBUG (printf ("EMF+\tm11: %f m12: %f\nEMF+\tm21: %f m22: %f\nEMF+\tdx: %f dy: %f\n", + aWorldTransform.eM11, aWorldTransform.eM12, + aWorldTransform.eM21, aWorldTransform.eM22, + aWorldTransform.eDx, aWorldTransform.eDy)); + break; } - EMFP_DEBUG (printf ("EMF+\tresult world matrix m11: %f m12: %f\nEMF+\tm21: %f m22: %f\nEMF+\tdx: %f dy: %f\n", - aWorldTransform.eM11, aWorldTransform.eM12, - aWorldTransform.eM21, aWorldTransform.eM22, - aWorldTransform.eDx, aWorldTransform.eDy)); - break; - } - case EmfPlusRecordTypeSetClipPath: - { - EMFP_DEBUG (printf ("EMF+ SetClipPath\n")); - EMFP_DEBUG (printf ("EMF+\tpath in slot: %d\n", flags & 0xff)); + case EmfPlusRecordTypeResetWorldTransform: + EMFP_DEBUG (printf ("EMF+ ResetWorldTransform\n")); + aWorldTransform.SetIdentity (); + break; + case EmfPlusRecordTypeMultiplyWorldTransform: { + EMFP_DEBUG (printf ("EMF+ MultiplyWorldTransform\n")); + XForm transform; + rMF >> transform; + + EMFP_DEBUG (printf ("EMF+\tmatrix m11: %f m12: %f\nEMF+\tm21: %f m22: %f\nEMF+\tdx: %f dy: %f\n", + transform.eM11, transform.eM12, + transform.eM21, transform.eM22, + transform.eDx, transform.eDy)); + + if (flags & 0x2000) // post multiply + aWorldTransform.Multiply (transform); + else { // pre multiply + transform.Multiply (aWorldTransform); + aWorldTransform.Set (transform); + } + EMFP_DEBUG (printf ("EMF+\tresult world matrix m11: %f m12: %f\nEMF+\tm21: %f m22: %f\nEMF+\tdx: %f dy: %f\n", + aWorldTransform.eM11, aWorldTransform.eM12, + aWorldTransform.eM21, aWorldTransform.eM22, + aWorldTransform.eDx, aWorldTransform.eDy)); + break; + } + case EmfPlusRecordTypeSetClipPath: + { + EMFP_DEBUG (printf ("EMF+ SetClipPath\n")); + EMFP_DEBUG (printf ("EMF+\tpath in slot: %d\n", flags & 0xff)); - EMFPPath& path = *(EMFPPath*) aObjects [flags & 0xff]; - ::basegfx::B2DPolyPolygon& clipPoly (path.GetPolygon (*this)); + EMFPPath& path = *(EMFPPath*) aObjects [flags & 0xff]; + ::basegfx::B2DPolyPolygon& clipPoly (path.GetPolygon (*this)); - clipPoly.transform (rState.mapModeTransform); - updateClipping (clipPoly, rFactoryParms, false); + clipPoly.transform (rState.mapModeTransform); + updateClipping (clipPoly, rFactoryParms, false); + break; + } + case EmfPlusRecordTypeSetClipRegion: { + EMFP_DEBUG (printf ("EMF+ SetClipRegion\n")); + EMFP_DEBUG (printf ("EMF+\tregion in slot: %d combine mode: %d\n", flags & 0xff, (flags & 0xff00) >> 8)); + EMFPRegion *region = (EMFPRegion*)aObjects [flags & 0xff]; + + // reset clip + if (region && region->parts == 0 && region->initialState == EmfPlusRegionInitialStateInfinite) { + updateClipping (::basegfx::B2DPolyPolygon (), rFactoryParms, false); + } else { + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + } break; } - case EmfPlusRecordTypeSetClipRegion: { - EMFP_DEBUG (printf ("EMF+ SetClipRegion\n")); - EMFP_DEBUG (printf ("EMF+\tregion in slot: %d combine mode: %d\n", flags & 0xff, (flags & 0xff00) >> 8)); - EMFPRegion *region = (EMFPRegion*)aObjects [flags & 0xff]; - - // reset clip - if (region && region->parts == 0 && region->initialState == EmfPlusRegionInitialStateInfinite) { - updateClipping (::basegfx::B2DPolyPolygon (), rFactoryParms, false); - } else { - EMFP_DEBUG (printf ("EMF+\tTODO\n")); - } - break; - } - case EmfPlusRecordTypeDrawDriverString: { - EMFP_DEBUG (printf ("EMF+ DrawDriverString, flags: 0x%04x\n", flags)); - sal_uInt32 brushIndexOrColor; - sal_uInt32 optionFlags; - sal_uInt32 hasMatrix; - sal_uInt32 glyphsCount; + case EmfPlusRecordTypeDrawDriverString: { + EMFP_DEBUG (printf ("EMF+ DrawDriverString, flags: 0x%04x\n", flags)); + sal_uInt32 brushIndexOrColor; + sal_uInt32 optionFlags; + sal_uInt32 hasMatrix; + sal_uInt32 glyphsCount; - rMF >> brushIndexOrColor >> optionFlags >> hasMatrix >> glyphsCount; + rMF >> brushIndexOrColor >> optionFlags >> hasMatrix >> glyphsCount; - EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : "brush index", (unsigned int)brushIndexOrColor)); - EMFP_DEBUG (printf ("EMF+\toption flags: 0x%08x\n", (unsigned int)optionFlags)); - EMFP_DEBUG (printf ("EMF+\thas matrix: %u\n", (unsigned int)hasMatrix)); - EMFP_DEBUG (printf ("EMF+\tglyphs: %u\n", (unsigned int)glyphsCount)); + EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : "brush index", (unsigned int)brushIndexOrColor)); + EMFP_DEBUG (printf ("EMF+\toption flags: 0x%08x\n", (unsigned int)optionFlags)); + EMFP_DEBUG (printf ("EMF+\thas matrix: %u\n", (unsigned int)hasMatrix)); + EMFP_DEBUG (printf ("EMF+\tglyphs: %u\n", (unsigned int)glyphsCount)); - if( ( optionFlags & 1 ) && glyphsCount > 0 ) { - float *charsPosX = new float[glyphsCount]; - float *charsPosY = new float[glyphsCount]; + if( ( optionFlags & 1 ) && glyphsCount > 0 ) { + float *charsPosX = new float[glyphsCount]; + float *charsPosY = new float[glyphsCount]; - rtl::OUString text = read_uInt16s_ToOUString(rMF, glyphsCount); - - for( sal_uInt32 i=0; i> charsPosX[i] >> charsPosY[i]; - EMFP_DEBUG (printf ("EMF+\tglyphPosition[%u]: %f, %f\n", (unsigned int)i, charsPosX[i], charsPosY[i])); - } + rtl::OUString text = read_uInt16s_ToOUString(rMF, glyphsCount); - XForm transform; - if( hasMatrix ) { - rMF >> transform; - EMFP_DEBUG (printf ("EMF+\tmatrix:: %f, %f, %f, %f, %f, %f\n", transform.eM11, transform.eM12, transform.eM21, transform.eM22, transform.eDx, transform.eDy)); - } + for( sal_uInt32 i=0; i> charsPosX[i] >> charsPosY[i]; + EMFP_DEBUG (printf ("EMF+\tglyphPosition[%u]: %f, %f\n", (unsigned int)i, charsPosX[i], charsPosY[i])); + } - // add the text action - setFont (flags & 0xff, rFactoryParms, rState); - - if( flags & 0x8000 ) - SET_TEXT_COLOR(brushIndexOrColor); - - ActionSharedPtr pTextAction( - TextActionFactory::createTextAction( - ::vcl::unotools::pointFromB2DPoint ( Map( charsPosX[0], charsPosY[0] ) ), - ::Size(), - ::Color(), - ::Size(), - ::Color(), - text, - 0, - glyphsCount, - NULL, - rFactoryParms.mrVDev, - rFactoryParms.mrCanvas, - rState, - rFactoryParms.mrParms, - false ) ); - - if( pTextAction ) - { - EMFP_DEBUG (printf ("EMF+\t\tadd text action\n")); + XForm transform; + if( hasMatrix ) { + rMF >> transform; + EMFP_DEBUG (printf ("EMF+\tmatrix:: %f, %f, %f, %f, %f, %f\n", transform.eM11, transform.eM12, transform.eM21, transform.eM22, transform.eDx, transform.eDy)); + } - maActions.push_back( - MtfAction( - pTextAction, - rFactoryParms.mrCurrActionIndex ) ); + // add the text action + setFont (flags & 0xff, rFactoryParms, rState); + + if( flags & 0x8000 ) + SET_TEXT_COLOR(brushIndexOrColor); + + ActionSharedPtr pTextAction( + TextActionFactory::createTextAction( + ::vcl::unotools::pointFromB2DPoint ( Map( charsPosX[0], charsPosY[0] ) ), + ::Size(), + ::Color(), + ::Size(), + ::Color(), + text, + 0, + glyphsCount, + NULL, + rFactoryParms.mrVDev, + rFactoryParms.mrCanvas, + rState, + rFactoryParms.mrParms, + false ) ); + + if( pTextAction ) + { + EMFP_DEBUG (printf ("EMF+\t\tadd text action\n")); - rFactoryParms.mrCurrActionIndex += pTextAction->getActionCount()-1; - } + maActions.push_back( + MtfAction( + pTextAction, + rFactoryParms.mrCurrActionIndex ) ); - delete[] charsPosX; - delete[] charsPosY; - } else { - EMFP_DEBUG (printf ("EMF+\tTODO: fonts (non-unicode glyphs chars)\n")); - } + rFactoryParms.mrCurrActionIndex += pTextAction->getActionCount()-1; + } - break; - } - default: - EMFP_DEBUG (printf ("EMF+ unhandled record type: %d\n", type)); - EMFP_DEBUG (printf ("EMF+\tTODO\n")); + delete[] charsPosX; + delete[] charsPosY; + } else { + EMFP_DEBUG (printf ("EMF+\tTODO: fonts (non-unicode glyphs chars)\n")); } + break; + } + default: + EMFP_DEBUG (printf ("EMF+ unhandled record type: %d\n", type)); + EMFP_DEBUG (printf ("EMF+\tTODO\n")); + } + } + rMF.Seek (next); if (size <= length) diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index b2d44eab527f..31af615160fa 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -504,8 +504,8 @@ IMPL_LINK( ActualizeProgress, TimeoutHdl, Timer*, _pTimer ) IMPL_LINK( ActualizeProgress, ActualizeHdl, INetURLObject*, pURL ) { - for( long i = 0; i < 128; i++ ) - Application::Reschedule(); + for( long i = 0; i < 128; i++ ) + Application::Reschedule(); Flush(); Sync(); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index e4ae1453ff7e..6a4b74b139f0 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -515,8 +515,6 @@ long SvxBitmapTabPage::CheckChanges_Impl() sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - String aString = aLbBitmaps.GetSelectEntry(); - if( bBmpChanged ) { ResMgr& rMgr = CUI_MGR(); @@ -789,7 +787,6 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { ResMgr& rMgr = CUI_MGR(); - String aNewName( SVX_RES( RID_SVXSTR_BITMAP ) ); String aDesc( ResId( RID_SVXSTR_DESC_NEW_BITMAP, rMgr ) ); String aName( pBitmapList->GetBitmap( nPos )->GetName() ); String aOldName = aName; diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 2e26f3c5362a..6dc090221f02 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -259,7 +259,6 @@ long SvxGradientTabPage::CheckChanges_Impl() if( nPos != LISTBOX_ENTRY_NOTFOUND ) { XGradient aGradient = pGradientList->GetGradient( nPos )->GetGradient(); - String aString = m_pLbGradients->GetSelectEntry(); if( !( aTmpGradient == aGradient ) ) { @@ -520,7 +519,6 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { ResMgr& rMgr = CUI_MGR(); - String aNewName( SVX_RES( RID_SVXSTR_GRADIENT ) ); String aDesc( CUI_RES( RID_SVXSTR_DESC_GRADIENT ) ); String aName( pGradientList->GetGradient( nPos )->GetName() ); String aOldName = aName; diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 5970907ad9c2..cb880278dae3 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -568,7 +568,6 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { ResMgr& rMgr = CUI_MGR(); - String aNewName( SVX_RES( RID_SVXSTR_HATCH ) ); String aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) ); String aName( pHatchingList->GetHatch( nPos )->GetName() ); String aOldName = aName; diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index d707364a53a8..dd880830295d 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -632,7 +632,6 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { ResMgr& rMgr = CUI_MGR(); - String aNewName( SVX_RES( RID_SVXSTR_LINESTYLE ) ); String aDesc( ResId( RID_SVXSTR_DESC_LINESTYLE, rMgr ) ); String aName( pDashList->GetDash( nPos )->GetName() ); String aOldName = aName; diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx index 9d74709f740f..f56bda17988b 100644 --- a/desktop/source/app/lockfile2.cxx +++ b/desktop/source/app/lockfile2.cxx @@ -35,7 +35,6 @@ bool Lockfile_execWarning( Lockfile * that ) aConfig.SetGroup( LOCKFILE_GROUP ); rtl::OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY ); rtl::OString aUser = aConfig.ReadKey( LOCKFILE_USERKEY ); - rtl::OString aStamp = aConfig.ReadKey( LOCKFILE_STAMPKEY ); rtl::OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY ); // display warning and return response diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index 36e020ac4df3..2d1e5f2963f1 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -770,7 +770,7 @@ namespace editeng { try { - ::rtl::OUString aConvText = xExtConverter->getConversionWithOffset( + xExtConverter->getConversionWithOffset( m_sCurrentPortion, m_nCurrentStartIndex, m_nCurrentEndIndex - m_nCurrentStartIndex, diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index e6725c1a5fbb..9270a166bc2d 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -260,38 +260,32 @@ OUStringList FilterFactory::impl_queryMatchByDocumentService(const QueryTokenize OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); sDocumentService = ::rtl::OUString( "com.sun.star.text.TextDocument" ); } - else - if ( sDocumentService == "web" ) + else if ( sDocumentService == "web" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); sDocumentService = ::rtl::OUString( "com.sun.star.text.WebDocument" ); } - else - if ( sDocumentService == "global" ) + else if ( sDocumentService == "global" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); sDocumentService = ::rtl::OUString( "com.sun.star.text.GlobalDocument" ); } - else - if ( sDocumentService == "calc" ) + else if ( sDocumentService == "calc" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); sDocumentService = ::rtl::OUString( "com.sun.star.sheet.SpreadsheetDocument" ); } - else - if ( sDocumentService == "draw" ) + else if ( sDocumentService == "draw" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); sDocumentService = ::rtl::OUString( "com.sun.star.drawing.DrawingDocument" ); } - else - if ( sDocumentService == "impress" ) + else if ( sDocumentService == "impress" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); sDocumentService = ::rtl::OUString( "com.sun.star.presentation.PresentationDocument" ); } - else - if ( sDocumentService == "math" ) + else if ( sDocumentService == "math" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); sDocumentService = ::rtl::OUString( "com.sun.star.formula.FormulaProperties" ); diff --git a/filter/source/graphicfilter/icgm/class2.cxx b/filter/source/graphicfilter/icgm/class2.cxx index 44cf6eaf5f67..2c9e430323a9 100644 --- a/filter/source/graphicfilter/icgm/class2.cxx +++ b/filter/source/graphicfilter/icgm/class2.cxx @@ -99,7 +99,7 @@ void CGM::ImplDoClass2() { if ( pElement->eVDCType == VDC_INTEGER ) ImplGetRectangle( pElement->aDeviceViewPort ); - ImplSetMapMode(); + ImplSetMapMode(); } break; case 0x09 : /*Device Viewport Specification Mode*/ diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx index f07c497ad86e..bc6652db7b22 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx @@ -163,7 +163,6 @@ OUString XMLFilterTabPageXSLT::GetURL( SvtURLBox& rURLBox ) } else { - const OUString aBaseURL ( rURLBox.GetBaseURL() ); osl::FileBase::getFileURLFromSystemPath( aStrPath, aURL ); } diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx index eaaf6fafeeff..1b372557f102 100644 --- a/formula/source/ui/dlg/funcpage.cxx +++ b/formula/source/ui/dlg/funcpage.cxx @@ -235,7 +235,6 @@ const IFunctionDescription* FuncPage::GetFuncDesc( sal_uInt16 nPos ) const void FuncPage::InitLRUList() { - ::std::vector< const IFunctionDescription*> aRUFunctions; m_pFunctionManager->fillLastRecentlyUsedFunctions(aLRUList); } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index e6f35e8edb04..f5e464f4986b 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -2817,29 +2817,21 @@ void AutoRecovery::implts_informListener( sal_Int32 eJ if ((eJob & AutoRecovery::E_PREPARE_EMERGENCY_SAVE) == AutoRecovery::E_PREPARE_EMERGENCY_SAVE) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_PREPARE_EMERGENCY_SAVE)); - else - if ((eJob & AutoRecovery::E_EMERGENCY_SAVE) == AutoRecovery::E_EMERGENCY_SAVE) + else if ((eJob & AutoRecovery::E_EMERGENCY_SAVE) == AutoRecovery::E_EMERGENCY_SAVE) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_EMERGENCY_SAVE)); - else - if ((eJob & AutoRecovery::E_RECOVERY) == AutoRecovery::E_RECOVERY) + else if ((eJob & AutoRecovery::E_RECOVERY) == AutoRecovery::E_RECOVERY) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_RECOVERY)); - else - if ((eJob & AutoRecovery::E_SESSION_SAVE) == AutoRecovery::E_SESSION_SAVE) + else if ((eJob & AutoRecovery::E_SESSION_SAVE) == AutoRecovery::E_SESSION_SAVE) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_SAVE)); - else - if ((eJob & AutoRecovery::E_SESSION_QUIET_QUIT) == AutoRecovery::E_SESSION_QUIET_QUIT) + else if ((eJob & AutoRecovery::E_SESSION_QUIET_QUIT) == AutoRecovery::E_SESSION_QUIET_QUIT) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_QUIET_QUIT)); - else - if ((eJob & AutoRecovery::E_SESSION_RESTORE) == AutoRecovery::E_SESSION_RESTORE) + else if ((eJob & AutoRecovery::E_SESSION_RESTORE) == AutoRecovery::E_SESSION_RESTORE) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_RESTORE)); - else - if ((eJob & AutoRecovery::E_ENTRY_BACKUP) == AutoRecovery::E_ENTRY_BACKUP) + else if ((eJob & AutoRecovery::E_ENTRY_BACKUP) == AutoRecovery::E_ENTRY_BACKUP) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_ENTRY_BACKUP)); - else - if ((eJob & AutoRecovery::E_ENTRY_CLEANUP) == AutoRecovery::E_ENTRY_CLEANUP) + else if ((eJob & AutoRecovery::E_ENTRY_CLEANUP) == AutoRecovery::E_ENTRY_CLEANUP) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_ENTRY_CLEANUP)); - else - if ((eJob & AutoRecovery::E_AUTO_SAVE) == AutoRecovery::E_AUTO_SAVE) + else if ((eJob & AutoRecovery::E_AUTO_SAVE) == AutoRecovery::E_AUTO_SAVE) sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_AUTO_SAVE)); #ifdef ENABLE_WARNINGS else if ( eJob != AutoRecovery::E_NO_JOB ) diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index 926a6dd86cea..e679d60e739b 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -341,8 +341,7 @@ void myparser::traverse( xmlNodePtr parentNode ) if (documentId.empty()) documentId = hid; extendedHelpText.push_back(hid); - std::string foo = anchor.empty() ? hid : hid + "#" + anchor; - HCDBG(std::cerr << "hid pushback" << foo << std::endl); + HCDBG(std::cerr << "hid pushback" << (anchor.empty() ? hid : hid + "#" + anchor) << std::endl); hidlist->push_back( anchor.empty() ? hid : hid + "#" + anchor); } else diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index b4fd937aea4e..fe997965214a 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -1903,12 +1903,12 @@ void HwpReader::makeTableStyle(Table *tbl) // --------------- cell --------------------- // for (int i = 0 ; i < static_cast(tbl->cells.size()); i++) { - std::list::iterator it = tbl->cells.begin(); + std::list::iterator it = tbl->cells.begin(); - for( int ii = 0; it != tbl->cells.end(); ++it, ii++ ){ - if( ii == i ) - break; - } + for( int ii = 0; it != tbl->cells.end(); ++it, ii++ ){ + if( ii == i ) + break; + } TCell *tcell = *it; sprintf(buf,"Table%d.%c%d",hbox->style.boxnum, 'A'+ tcell->nColumnIndex, tcell->nRowIndex +1); @@ -2858,8 +2858,9 @@ void HwpReader::make_text_p3(HWPPara * para,sal_Bool bParaStart) int curr = para->cshape.index; if( d->bFirstPara && d->bInBody ) { - if( !pstart ) + if ( !pstart ) { STARTP; + } strcpy(buf,"[문서의 처음]"); /* "Begin of Document" */ padd(ascii("text:name"), sXML_CDATA, OUString(buf, strlen(buf), RTL_TEXTENCODING_UTF8)); rstartEl(ascii("text:bookmark"), rList); @@ -2869,8 +2870,9 @@ void HwpReader::make_text_p3(HWPPara * para,sal_Bool bParaStart) } if( d->bInHeader ) { - if( !pstart ) + if ( !pstart ) { STARTP; + } makeShowPageNum(); d->bInHeader = false; } @@ -3451,12 +3453,12 @@ void HwpReader::makeTable(TxtBox * hbox) int j = -1, k = -1; for (int i = 0 ; i < static_cast(tbl->cells.size()); i++) { - std::list::iterator it = tbl->cells.begin(); + std::list::iterator it = tbl->cells.begin(); - for( int ii = 0; it != tbl->cells.end(); ++it, ii++ ){ - if( ii == i ) - break; - } + for( int ii = 0; it != tbl->cells.end(); ++it, ii++ ){ + if( ii == i ) + break; + } TCell *tcell = *it; if( tcell->nRowIndex > j ) diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 66145ef6b944..75818ad30bb1 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -300,8 +300,8 @@ OUString toRoman( sal_Int32 n ) n -= ( nOver1000 * nMask ); OUStringBuffer sTmp; - while(nOver1000--) - sTmp.append(sal_Unicode(*coRomanArr)); + while(nOver1000--) + sTmp.append(sal_Unicode(*coRomanArr)); while( nMask ) { @@ -509,11 +509,11 @@ void lcl_formatCharsGR( sal_Unicode table[], int n, OUString& s ) for (int i = 0; i < myriadPower; i++) sb.append(MYRIAD_SYM); - sb.append(gr_smallNum(table, n/divisor)); - n %= divisor; + sb.append(gr_smallNum(table, n/divisor)); + n %= divisor; - if (n > 0) - sb.append(DOT_SYM); + if (n > 0) + sb.append(DOT_SYM); } } sb.append(gr_smallNum(table,n)); diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx index a8b5ef1ea25c..a61804f8cd5e 100644 --- a/idl/source/prj/command.cxx +++ b/idl/source/prj/command.cxx @@ -216,80 +216,124 @@ SvCommand::SvCommand( int argc, char ** argv ) StringList aList; if( ResponseFile( &aList, argc, argv ) ) - for( size_t i = 1; i < aList.size(); i++ ) { - String aParam( *aList[ i ] ); - sal_Unicode aFirstChar( aParam.GetChar(0) ); - if( '-' == aFirstChar ) + for( size_t i = 1; i < aList.size(); i++ ) { - aParam.Erase( 0, 1 ); - aFirstChar = aParam.GetChar(0); - if( aFirstChar == 'F' || aFirstChar == 'f' ) + String aParam( *aList[ i ] ); + sal_Unicode aFirstChar( aParam.GetChar(0) ); + if( '-' == aFirstChar ) { aParam.Erase( 0, 1 ); aFirstChar = aParam.GetChar(0); - String aName( aParam.Copy( 1 ) ); - if( 's' == aFirstChar ) - { // name of slot output - aSlotMapFile = aName; - } - else if( 'l' == aFirstChar ) - { // name of listing - aListFile = aName; - } - else if( 'i' == aFirstChar ) - { - } - else if( 'o' == aFirstChar ) - { - } - else if( 'd' == aFirstChar ) - { // name of data set file - aDataBaseFile = aName; - } - else if( 'D' == aFirstChar ) - { - } - else if( 'C' == aFirstChar ) - { - } - else if( 'H' == aFirstChar ) - { - } - else if( 'c' == aFirstChar ) + if( aFirstChar == 'F' || aFirstChar == 'f' ) { + aParam.Erase( 0, 1 ); + aFirstChar = aParam.GetChar(0); + String aName( aParam.Copy( 1 ) ); + if( 's' == aFirstChar ) + { // name of slot output + aSlotMapFile = aName; + } + else if( 'l' == aFirstChar ) + { // name of listing + aListFile = aName; + } + else if( 'i' == aFirstChar ) + { + } + else if( 'o' == aFirstChar ) + { + } + else if( 'd' == aFirstChar ) + { // name of data set file + aDataBaseFile = aName; + } + else if( 'D' == aFirstChar ) + { + } + else if( 'C' == aFirstChar ) + { + } + else if( 'H' == aFirstChar ) + { + } + else if( 'c' == aFirstChar ) + { + } + else if( 'h' == aFirstChar ) + { + } + else if( 't' == aFirstChar ) + { + } + else if( 'm' == aFirstChar ) + { // name of info file + aTargetFile = aName; + } + else if( 'r' == aFirstChar ) + { + } + else if( 'z' == aFirstChar ) + { // name of HelpId file + aHelpIdFile = aName; + } + else if( 'y' == aFirstChar ) + { // name of CSV file + aCSVFile = aName; + } + else if( 'x' == aFirstChar ) + { // name of IDL file for the CSV file + aExportFile = aName; + } + else if( 'M' == aFirstChar ) + { + m_DepFile = aName; + } + else + { + printf( + "unknown switch: %s\n", + rtl::OUStringToOString( + aParam, RTL_TEXTENCODING_UTF8).getStr()); + exit( -1 ); + } } - else if( 'h' == aFirstChar ) - { + else if( aParam.EqualsIgnoreCaseAscii( "help" ) || aParam.EqualsIgnoreCaseAscii( "?" ) ) + { // help + printf( "%s", CommandLineSyntax ); } - else if( 't' == aFirstChar ) + else if( aParam.EqualsIgnoreCaseAscii( "quiet" ) ) { + nVerbosity = 0; } - else if( 'm' == aFirstChar ) - { // name of info file - aTargetFile = aName; - } - else if( 'r' == aFirstChar ) + else if( aParam.EqualsIgnoreCaseAscii( "verbose" ) ) { + nVerbosity = 2; } - else if( 'z' == aFirstChar ) - { // name of HelpId file - aHelpIdFile = aName; + else if( aParam.EqualsIgnoreCaseAscii( "syntax" ) ) + { // help + int j = 0; + while(SyntaxStrings[j]) + printf("%s\n",SyntaxStrings[j++]); } - else if( 'y' == aFirstChar ) - { // name of CSV file - aCSVFile = aName; + else if( aParam.EqualsIgnoreCaseAscii( "i", 0, 1 ) ) + { // define include paths + String aName( aParam.Copy( 1 ) ); + if( aPath.Len() ) + aPath += DirEntry::GetSearchDelimiter(); + aPath += aName; } - else if( 'x' == aFirstChar ) - { // name of IDL file for the CSV file - aExportFile = aName; - } - else if( 'M' == aFirstChar ) - { - m_DepFile = aName; + else if( aParam.EqualsIgnoreCaseAscii( "rsc", 0, 3 ) ) + { // first line in *.srs file + OSL_ENSURE(false, "does anything use this option, doesn't look like it belong here"); + if( aList[ i + 1 ] ) + { + i++; + } } else { + // temporary compatibility hack printf( "unknown switch: %s\n", rtl::OUStringToOString( @@ -297,53 +341,11 @@ SvCommand::SvCommand( int argc, char ** argv ) exit( -1 ); } } - else if( aParam.EqualsIgnoreCaseAscii( "help" ) || aParam.EqualsIgnoreCaseAscii( "?" ) ) - { // help - printf( "%s", CommandLineSyntax ); - } - else if( aParam.EqualsIgnoreCaseAscii( "quiet" ) ) - { - nVerbosity = 0; - } - else if( aParam.EqualsIgnoreCaseAscii( "verbose" ) ) - { - nVerbosity = 2; - } - else if( aParam.EqualsIgnoreCaseAscii( "syntax" ) ) - { // help - int j = 0; - while(SyntaxStrings[j]) - printf("%s\n",SyntaxStrings[j++]); - } - else if( aParam.EqualsIgnoreCaseAscii( "i", 0, 1 ) ) - { // define include paths - String aName( aParam.Copy( 1 ) ); - if( aPath.Len() ) - aPath += DirEntry::GetSearchDelimiter(); - aPath += aName; - } - else if( aParam.EqualsIgnoreCaseAscii( "rsc", 0, 3 ) ) - { // first line in *.srs file - OSL_ENSURE(false, "does anything use this option, doesn't look like it belong here"); - if( aList[ i + 1 ] ) - { - i++; - } - } else { - // temporary compatibility hack - printf( - "unknown switch: %s\n", - rtl::OUStringToOString( - aParam, RTL_TEXTENCODING_UTF8).getStr()); - exit( -1 ); + aInFileList.push_back( new String( aParam ) ); } } - else - { - aInFileList.push_back( new String( aParam ) ); - } } else { diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index c544d4525e72..b49a8fb3f655 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -238,7 +238,7 @@ void NodeJava::load() { if (!prepareSettingsDocument()) { - SAL_INFO("jvmfwk", "no path to load user settings document from"); + SAL_INFO("jfw.level1", "no path to load user settings document from"); return; } } @@ -424,7 +424,7 @@ void NodeJava::write() const if (!prepareSettingsDocument()) { - SAL_INFO("jvmfwk", "no path to write settings document to"); + SAL_INFO("jfw.level1", "no path to write settings document to"); return; } diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx index 680f0cacfa17..2b02bce6a7b5 100644 --- a/l10ntools/source/xrmmerge.cxx +++ b/l10ntools/source/xrmmerge.cxx @@ -85,11 +85,10 @@ extern char *GetOutputFile( int argc, char* argv[]) } /*****************************************************************************/ -int InitXrmExport( char *pOutput , char* pFilename) +int InitXrmExport( char*, char* pFilename) /*****************************************************************************/ { // instanciate Export - rtl::OString sOutput( pOutput ); rtl::OString sFilename( pFilename ); Export::InitLanguages( false ); diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx index 85372dff4a40..f1db9e1033a2 100644 --- a/padmin/source/adddlg.cxx +++ b/padmin/source/adddlg.cxx @@ -495,8 +495,6 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent ) rtl::OString aDefMarginTop( aConfig.ReadKey( "MarginTop" ) ); rtl::OString aDefMarginBottom( aConfig.ReadKey( "MarginBottom" ) ); rtl::OString aDefScale( aConfig.ReadKey( "Scale" ) ); - rtl::OString aDefCopies( aConfig.ReadKey( "Copies" ) ); - rtl::OString aDefDPI( aConfig.ReadKey( "DPI" ) ); aConfig.SetGroup( "devices" ); int nDevices = aConfig.GetKeyCount(); diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index 68610a0a9603..3892346c5997 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -189,7 +189,6 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName else if ( _sName == "rpt:master-detail-field" ) { const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0; - static const ::rtl::OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE); SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr pMasterElemTokenMap( OXMLHelper::GetSubDocumentElemTokenMap()); SAL_WNODEPRECATED_DECLARATIONS_POP diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index 42bf271878ff..43f47366da66 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -411,20 +411,20 @@ again: do { /* Collect the token */ } else if (t == LET) { /* ID must be a macro */ if (streq(token, "defined")) { /* Or defined name */ - c1 = c = skipws(); - if (c == '(') /* Allow defined(name) */ - c = skipws(); - if (type[c] == LET) { - evalue = (lookid(c) != NULL); - if (c1 != '(' /* Need to balance */ - || skipws() == ')') /* Did we balance? */ - return (DIG); /* Parsed ok */ - } - cerror("Bad #if ... defined() syntax", NULLST); - return (OP_FAIL); + c1 = c = skipws(); + if (c == '(') /* Allow defined(name) */ + c = skipws(); + if (type[c] == LET) { + evalue = (lookid(c) != NULL); + if (c1 != '(' /* Need to balance */ + || skipws() == ')') /* Did we balance? */ + return (DIG); /* Parsed ok */ + } + cerror("Bad #if ... defined() syntax", NULLST); + return (OP_FAIL); } else if (streq(token, "sizeof")) /* New sizeof hackery */ - return (dosizeof()); /* Gets own routine */ + return (dosizeof()); /* Gets own routine */ /* * The Draft ANSI C Standard says that an undefined symbol * in an #if has the value zero. We are a bit pickier, @@ -433,7 +433,7 @@ again: do { /* Collect the token */ */ #ifdef STRICT_UNDEF if (!skip) - cwarn("undefined symbol \"%s\" in #if, 0 used", token); + cwarn("undefined symbol \"%s\" in #if, 0 used", token); #endif evalue = 0; return (DIG); @@ -633,13 +633,13 @@ evalnum(int c) for (;;) { c1 = c; if (isascii(c) && isupper(c1)) - c1 = tolower(c1); + c1 = tolower(c1); #ifdef EBCDIC if (c1 <= 'f') #else if (c1 >= 'a') #endif - c1 -= ('a' - 10); + c1 -= ('a' - 10); else c1 -= '0'; if (c1 < 0 || c1 >= base) break; diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox index e9f78640cae4..bbe1f1f7d7f2 100644 --- a/sal/inc/sal/log-areas.dox +++ b/sal/inc/sal/log-areas.dox @@ -145,6 +145,7 @@ certain functionality. @section sfx2 +@li @c sfx2 @li @c sfx2.appl @li @c sfx2.bastyp @li @c sfx2.config @@ -152,6 +153,7 @@ certain functionality. @li @c sfx2.doc @li @c sfx2.notify @li @c sfx2.view +@li @c sfx2.control @section slideshow @@ -181,6 +183,8 @@ certain functionality. @li @c svx.stbcrtls - StatusBarControl @li @c svx.table @li @c svx.tbxcrtls - ToolboxControl +@li @c svx.sdr +@li @c svx.uno @section toolkit @@ -236,6 +240,7 @@ certain functionality. @li @c vcl.gtk - Gtk+ 2/3 plugin @li @c vcl.layout - Widget layout @li @c vcl.sm - Session Manager +@li @c vcl.window @section Writer @@ -265,6 +270,11 @@ certain functionality. @li @c xmlsecurity.helper @li @c xmlsecurity.xmlsec - xmlsec wrapper +@section dbaccess + +@li @c dbaccess +@li @c dbaccess.ui + @section other @li @c accessibility @@ -277,7 +287,6 @@ certain functionality. @li @c cppcanvas @li @c cppuhelper @li @c cppu -@li @c dbaccess @li @c forms @li @c helpcompiler @li @c linguistic diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 94d761abcaf5..0d77c0b0e67a 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -233,7 +233,6 @@ public: } ScDocShellRef saveAndReload( ScDocShell* pShell, sal_Int32 nFormat ) { - OUString aFileExtension(aFileFormats[nFormat].pName, strlen(aFileFormats[nFormat].pName), RTL_TEXTENCODING_UTF8 ); OUString aFilterName(aFileFormats[nFormat].pFilterName, strlen(aFileFormats[nFormat].pFilterName), RTL_TEXTENCODING_UTF8) ; OUString aFilterType(aFileFormats[nFormat].pTypeName, strlen(aFileFormats[nFormat].pTypeName), RTL_TEXTENCODING_UTF8); ScDocShellRef xDocSh = saveAndReload(pShell, aFilterName, OUString(), aFilterType, aFileFormats[nFormat].nFormatType); diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 76d88d0d4e9c..621a6d77f8c5 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -136,7 +136,6 @@ void ScExportTest::testPasswordExport() CPPUNIT_ASSERT(pDoc); sal_Int32 nFormat = ODS; - OUString aFileExtension(aFileFormats[nFormat].pName, strlen(aFileFormats[nFormat].pName), RTL_TEXTENCODING_UTF8 ); OUString aFilterName(aFileFormats[nFormat].pFilterName, strlen(aFileFormats[nFormat].pFilterName), RTL_TEXTENCODING_UTF8) ; OUString aFilterType(aFileFormats[nFormat].pTypeName, strlen(aFileFormats[nFormat].pTypeName), RTL_TEXTENCODING_UTF8); ScDocShellRef xDocSh = saveAndReloadPassword(pShell, aFilterName, OUString(), aFilterType, aFileFormats[nFormat].nFormatType); diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index a5d5a5a767b1..cdaaa3e8c777 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -484,14 +484,12 @@ void testDBRanges_Impl(ScDocument* pDoc, sal_Int32 nFormat) { double aValue; pDoc->GetValue(0,10,1, aValue); - OUString aString; CPPUNIT_ASSERT_EQUAL_MESSAGE("Sheet2: A11: formula result is incorrect", 4.0, aValue); pDoc->GetValue(1, 10, 1, aValue); CPPUNIT_ASSERT_EQUAL_MESSAGE("Sheet2: B11: formula result is incorrect", 2.0, aValue); } double aValue; pDoc->GetValue(3,10,1, aValue); - OUString aString; CPPUNIT_ASSERT_EQUAL_MESSAGE("Sheet2: D11: formula result is incorrect", 4.0, aValue); pDoc->GetValue(4, 10, 1, aValue); CPPUNIT_ASSERT_EQUAL_MESSAGE("Sheet2: E11: formula result is incorrect", 2.0, aValue); @@ -611,7 +609,6 @@ void testFormats_Impl(ScFiltersTest* pFiltersTest, ScDocument* pDoc, sal_Int32 n //test Sheet3 only for ods if ( nFormat == ODS || nFormat == XLSX ) { - OUString aCondString = getConditionalFormatString(pDoc, 3,0,2); pFiltersTest->createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("conditionalFormatting.")), aCSVFileName); testCondFile(aCSVFileName, pDoc, 2); // test parent cell style import ( fdo#55198 ) diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 09e61c9fa7b8..74a496e3cbbb 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -310,13 +310,13 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv ) /* */ t[32] = SC_COMPILER_C_CHAR_DONTCARE | SC_COMPILER_C_WORD_SEP | SC_COMPILER_C_VALUE_SEP; /* ! */ t[33] = SC_COMPILER_C_CHAR | SC_COMPILER_C_WORD_SEP | SC_COMPILER_C_VALUE_SEP; - if (FormulaGrammar::CONV_ODF == meConv) -/* ! */ t[33] |= SC_COMPILER_C_ODF_LABEL_OP; + if (FormulaGrammar::CONV_ODF == meConv) +/* ! */ t[33] |= SC_COMPILER_C_ODF_LABEL_OP; /* " */ t[34] = SC_COMPILER_C_CHAR_STRING | SC_COMPILER_C_STRING_SEP; /* # */ t[35] = SC_COMPILER_C_WORD_SEP | SC_COMPILER_C_CHAR_ERRCONST; /* $ */ t[36] = SC_COMPILER_C_CHAR_WORD | SC_COMPILER_C_WORD | SC_COMPILER_C_CHAR_IDENT | SC_COMPILER_C_IDENT; - if (FormulaGrammar::CONV_ODF == meConv) -/* $ */ t[36] |= SC_COMPILER_C_ODF_NAME_MARKER; + if (FormulaGrammar::CONV_ODF == meConv) +/* $ */ t[36] |= SC_COMPILER_C_ODF_NAME_MARKER; /* % */ t[37] = SC_COMPILER_C_VALUE; /* & */ t[38] = SC_COMPILER_C_CHAR | SC_COMPILER_C_WORD_SEP | SC_COMPILER_C_VALUE_SEP; /* ' */ t[39] = SC_COMPILER_C_NAME_SEP; @@ -329,8 +329,8 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv ) /* . */ t[46] = SC_COMPILER_C_WORD | SC_COMPILER_C_CHAR_VALUE | SC_COMPILER_C_VALUE | SC_COMPILER_C_IDENT | SC_COMPILER_C_NAME; /* / */ t[47] = SC_COMPILER_C_CHAR | SC_COMPILER_C_WORD_SEP | SC_COMPILER_C_VALUE_SEP; - for (i = 48; i < 58; i++) -/* 0-9 */ t[i] = SC_COMPILER_C_CHAR_VALUE | SC_COMPILER_C_WORD | SC_COMPILER_C_VALUE | SC_COMPILER_C_VALUE_EXP | SC_COMPILER_C_VALUE_VALUE | SC_COMPILER_C_IDENT | SC_COMPILER_C_NAME; + for (i = 48; i < 58; i++) +/* 0-9 */ t[i] = SC_COMPILER_C_CHAR_VALUE | SC_COMPILER_C_WORD | SC_COMPILER_C_VALUE | SC_COMPILER_C_VALUE_EXP | SC_COMPILER_C_VALUE_VALUE | SC_COMPILER_C_IDENT | SC_COMPILER_C_NAME; /* : */ t[58] = SC_COMPILER_C_CHAR | SC_COMPILER_C_WORD; /* ; */ t[59] = SC_COMPILER_C_CHAR | SC_COMPILER_C_WORD_SEP | SC_COMPILER_C_VALUE_SEP; @@ -359,8 +359,8 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv ) /* _ */ t[95] = SC_COMPILER_C_CHAR_WORD | SC_COMPILER_C_WORD | SC_COMPILER_C_CHAR_IDENT | SC_COMPILER_C_IDENT | SC_COMPILER_C_CHAR_NAME | SC_COMPILER_C_NAME; /* ` */ // FREE - for (i = 97; i < 123; i++) -/* a-z */ t[i] = SC_COMPILER_C_CHAR_WORD | SC_COMPILER_C_WORD | SC_COMPILER_C_CHAR_IDENT | SC_COMPILER_C_IDENT | SC_COMPILER_C_CHAR_NAME | SC_COMPILER_C_NAME; + for (i = 97; i < 123; i++) +/* a-z */ t[i] = SC_COMPILER_C_CHAR_WORD | SC_COMPILER_C_WORD | SC_COMPILER_C_CHAR_IDENT | SC_COMPILER_C_IDENT | SC_COMPILER_C_CHAR_NAME | SC_COMPILER_C_NAME; /* { */ t[123] = SC_COMPILER_C_CHAR | SC_COMPILER_C_WORD_SEP | SC_COMPILER_C_VALUE_SEP; // array open /* | */ t[124] = SC_COMPILER_C_CHAR | SC_COMPILER_C_WORD_SEP | SC_COMPILER_C_VALUE_SEP; // array row sep (Should be OOo specific) diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 43a3859ddaa8..5e20e2f6c9ae 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -218,17 +218,8 @@ ContextHandlerRef ExtGlobalContext::onCreateContext( sal_Int32 nElement, const A } } -void ExtGlobalContext::onStartElement( const AttributeList& rAttribs ) +void ExtGlobalContext::onStartElement( const AttributeList& /*rAttribs*/ ) { - if(rAttribs.hasAttribute( XML_id )) - { - rtl::OUString aId = rAttribs.getString( XML_id, rtl::OUString() ); - } - - if(rAttribs.hasAttribute( XML_uri )) - { - rtl::OUString aUri = rAttribs.getString( XML_uri, rtl::OUString() ); - } } ExtLstGlobalContext::ExtLstGlobalContext( WorksheetFragment& rFragment ): diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 6e11f33919e8..b748f81898ac 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -360,14 +360,14 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) if( bHasMarked ) pView->MergeAttrFromMarked( aNewAttr, false ); - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialogdiet Factory fail!"); - SfxAbstractTabDialog * pDlg = pFact->CreateSvxLineTabDialog( pViewData->GetDialogParent(), - &aNewAttr, - pViewData->GetDocument()->GetDrawLayer(), - pObj, - bHasMarked); - OSL_ENSURE(pDlg, "Dialogdiet fail!"); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + OSL_ENSURE(pFact, "Dialogdiet Factory fail!"); + SfxAbstractTabDialog * pDlg = pFact->CreateSvxLineTabDialog( pViewData->GetDialogParent(), + &aNewAttr, + pViewData->GetDocument()->GetDrawLayer(), + pObj, + bHasMarked); + OSL_ENSURE(pDlg, "Dialogdiet fail!"); if ( nTabPage != 0xffff ) pDlg->SetCurPageId( nTabPage ); diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index 34a1534cf902..a6bbe6e676a0 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -632,7 +632,6 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling) aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos)); pTextObj.reset(aWndCenter.GetEditEngine()->CreateTextObject()); aWndCenter.SetText(*pTextObj); - XubString aEntry(pTextObj.get()->GetText(0)); if(!bTravelling) aWndCenter.GrabFocus(); } @@ -677,7 +676,6 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling) aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos)); pTextObj.reset(aWndCenter.GetEditEngine()->CreateTextObject()); aWndCenter.SetText(*pTextObj); - XubString aEntry2(pTextObj.get()->GetText(0)); if(!bTravelling) aWndCenter.GrabFocus(); } diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index f07a73cc167d..17939060c89e 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -223,7 +223,7 @@ ScVbaFont::getSize() throw ( uno::RuntimeException ) if ( GetDataSet() ) if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); - return ScVbaFont_BASE::getSize(); + return ScVbaFont_BASE::getSize(); } void SAL_CALL diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 20b9561faf0c..85c3725d899b 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1398,7 +1398,7 @@ void PowerPointExport::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNu "application/vnd.openxmlformats-officedocument.presentationml.slide+xml" ); if( mpSlidesFSArray.size() < mnPages ) - mpSlidesFSArray.resize( mnPages ); + mpSlidesFSArray.resize( mnPages ); mpSlidesFSArray[ nPageNum ] = pFS; const char* pShow = NULL; @@ -1486,7 +1486,7 @@ void PowerPointExport::ImplWriteNotes( sal_uInt32 nPageNum ) // add slide implicit relation to notes if( mpSlidesFSArray.size() >= nPageNum ) - addRelation( mpSlidesFSArray[ nPageNum ]->getOutputStream(), + addRelation( mpSlidesFSArray[ nPageNum ]->getOutputStream(), "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide", OUStringBuffer() .appendAscii( "../notesSlides/notesSlide" ) @@ -1560,7 +1560,7 @@ void PowerPointExport::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPr .makeStringAndClear(), "application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml" ); if( mpMasterFSArray.size() < mnMasterPages ) - mpMasterFSArray.resize( mnMasterPages ); + mpMasterFSArray.resize( mnMasterPages ); mpMasterFSArray[ nPageNum ] = pFS; // write theme per master diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index ff36e493f19d..df9676926de0 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -209,7 +209,7 @@ static char const sDocumentService[] = "DocumentService"; static bool isMediaDescriptor( sal_uInt16 nSlotId ) { - return ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || + return ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || nSlotId == SID_SAVEASDOC || nSlotId == SID_SAVEDOC || nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF ); @@ -233,7 +233,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque return; const ::com::sun::star::beans::PropertyValue* pPropsVal = rArgs.getConstArray(); - if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) + if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) { // slot is a property const SfxType* pType = pSlot->GetType(); @@ -352,11 +352,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque sal_Int32 nFoundArgs = 0; #endif // slot is a method - bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); - sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; + bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); + sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; for ( sal_uInt16 nArgs=0; nArgsGetFormalArgument( nArgs ); + const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArgs] : pSlot->GetFormalArgument( nArgs ); SfxPoolItem* pItem = rArg.CreateItem(); if ( !pItem ) { @@ -1010,8 +1010,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta else { // slot is a method - bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); - sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->GetFormalArgumentCount(); + bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); + sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->GetFormalArgumentCount(); for ( sal_uInt16 nArg=0; nArgIsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) ) continue; - bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); - sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; + bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); + sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; sal_uInt16 nArg; for ( nArg=0; nArgGetFormalArgument( nArg ); + const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArg] : pSlot->GetFormalArgument( nArg ); sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); if ( nId == nWhich ) break; @@ -2049,7 +2049,7 @@ throw (::com::sun::star::uno::RuntimeException) // Gruppe anw"ahlen ( Gruppe 0 ist intern ) for ( sal_uInt16 i=0; iGetGroupCount(); i++ ) { - String aName = pAppSlotPool->SeekGroup( i ); + pAppSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot(); while ( pSfxSlot ) { @@ -2085,7 +2085,7 @@ throw (::com::sun::star::uno::RuntimeException) // Gruppe anw"ahlen ( Gruppe 0 ist intern ) for ( sal_uInt16 i=0; iGetGroupCount(); i++ ) { - String aName = pAppSlotPool->SeekGroup( i ); + pAppSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot(); if ( pSfxSlot ) { diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index 6e5ac6b59752..1a0d8cb6f36e 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -301,11 +301,11 @@ void SvLinkSource::NotifyDataChanged() } } - if( pImpl->pTimer ) - { - delete pImpl->pTimer; - pImpl->pTimer = NULL; - } + if( pImpl->pTimer ) + { + delete pImpl->pTimer; + pImpl->pTimer = NULL; + } } } diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 70edb4fdb9f2..457f70e70214 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1714,7 +1714,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer ) sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine) { SAL_INFO( - "sfx2", + "sfx2.control", std::setw(Min(nRegLevel, sal_uInt16(8))) << ' ' << "this = " << this << " Level = " << nRegLevel << " SfxBindings::EnterRegistrations " << (pFile @@ -1814,7 +1814,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int } SAL_INFO( - "sfx2", + "sfx2.control", std::setw(Min(nRegLevel, sal_uInt16(8))) << ' ' << "this = " << this << " Level = " << nRegLevel << " SfxBindings::LeaveRegistrations " << (pFile diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 8c8cf7a33837..95ee15d4a524 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -452,7 +452,7 @@ void SfxDispatcher::Pop SfxApplication *pSfxApp = SFX_APP(); SAL_INFO( - "sfx2", + "sfx2.control", "-SfxDispatcher(" << this << (bPush ? ")::Push(" : ")::Pop(") << (rShell.GetInterface() ? rShell.GetInterface()->GetClassName() : SAL_STREAM(&rShell)) @@ -1676,7 +1676,7 @@ void SfxDispatcher::FlushImpl() for (sal_uInt16 n=0; naFixedObjBars[n].nResId = 0; - SAL_INFO("sfx2", "SfxDispatcher(" << this << ")::Flush() done"); + SAL_INFO("sfx2.control", "SfxDispatcher(" << this << ")::Flush() done"); } //-------------------------------------------------------------------- diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 8c1de06a6592..0fffa4a4aacb 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -551,7 +551,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI ) return; #endif SAL_INFO( - "sfx2.vb", + "sfx2.control", "SfxShell::DoActivate() " << this << " " << GetInterface()->GetName() << " bMDI " << (bMDI ? "MDI" : "")); @@ -587,7 +587,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI ) return; #endif SAL_INFO( - "sfx2.vb", + "sfx2.control", "SfxShell::DoDeactivate()" << this << " " << GetInterface()->GetName() << " bMDI " << (bMDI ? "MDI" : "")); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 93dc978cb7c9..48f8abf0b00e 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1342,7 +1342,7 @@ sal_Bool SfxInternetPage::FillItemSet( SfxItemSet& rSet ) nDelay = static_cast(m_pNFReload->GetValue()); break; case S_Forward: - SAL_WARN_IF(m_pEDForwardURL->GetText().isEmpty(), "sfx2", + SAL_WARN_IF(m_pEDForwardURL->GetText().isEmpty(), "sfx2.dialog", "+SfxInternetPage::FillItemSet(): empty URL should be not possible for forward option!"); bEnableReload = sal_True; diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index f774b4eb3520..8245d08b31ec 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1649,7 +1649,7 @@ void FileDialogHelper_Impl::verifyPath() return; } if (maFileName.indexOf('/') != -1) { - SAL_WARN("sfx2", maFileName << " contains /"); + SAL_WARN("sfx2.dialog", maFileName << " contains /"); return; } url.insertName( @@ -1660,7 +1660,7 @@ void FileDialogHelper_Impl::verifyPath() url.GetMainURL(INetURLObject::NO_DECODE), sysPathU); if (e != osl::FileBase::E_None) { SAL_WARN( - "sfx2", + "sfx2.dialog", "getSystemPathFromFileURL(" << url.GetMainURL(INetURLObject::NO_DECODE) << ") failed with " << +e); @@ -1673,7 +1673,7 @@ void FileDialogHelper_Impl::verifyPath() | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))) { SAL_WARN( - "sfx2", + "sfx2.dialog", "convertToString(" << sysPathU << ") failed for encoding " << +osl_getThreadTextEncoding()); return; @@ -1681,7 +1681,7 @@ void FileDialogHelper_Impl::verifyPath() struct stat aFileStat; if (stat(sysPathC.getStr(), &aFileStat) == -1) { SAL_WARN( - "sfx2", + "sfx2.dialog", "stat(" << sysPathC.getStr() << ") failed with errno " << errno); return; } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 525da28f73be..06f496294f65 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3158,7 +3158,7 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XDocumentEventListener >*)0 ) ); if ( pIC ) { - SAL_INFO("sfx2", "SfxDocumentEvent: " + aName); + SAL_INFO("sfx2.doc", "SfxDocumentEvent: " + aName); document::DocumentEvent aDocumentEvent( (frame::XModel*)this, aName, xController, uno::Any() ); @@ -3171,7 +3171,7 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ) ); if ( pIC ) { - SAL_INFO("sfx2", "SfxEvent: " + aName); + SAL_INFO("sfx2.doc", "SfxEvent: " + aName); document::EventObject aEvent( (frame::XModel*)this, aName ); diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index e3ec63e95d3d..1a48896a350b 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -172,7 +172,7 @@ void SfxMenuControl::StateChanged pOwnMenu->EnableItem( GetId(), sal_True ); else #endif - pOwnMenu->EnableItem( GetId(), bIsObjMenu + pOwnMenu->EnableItem( GetId(), bIsObjMenu ? 0 != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() ) : eState != SFX_ITEM_DISABLED ); diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index c97d014aaa2d..260f6b39ca8a 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1160,7 +1160,7 @@ throw (::com::sun::star::uno::RuntimeException) // Select Group ( Group 0 is internal ) for ( sal_uInt16 i=0; iGetGroupCount(); i++ ) { - String aName = pSlotPool->SeekGroup( i ); + pSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pSlotPool->FirstSlot(); while ( pSfxSlot ) { @@ -1196,7 +1196,7 @@ throw (::com::sun::star::uno::RuntimeException) SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); for ( sal_uInt16 i=0; iGetGroupCount(); i++ ) { - String aName = pSlotPool->SeekGroup( i ); + pSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pSlotPool->FirstSlot(); if ( pSfxSlot ) { diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx index 2446fb3bc8ec..61e89896176c 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx @@ -609,8 +609,8 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow ) GLWin.dpy = reinterpret_cast(pChildSysData->pDisplay); GLWin.win = pChildSysData->aWindow; #if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap ) - if( mbHasTFPVisual ) - GLWin.fbc = fbconfigs[i]; + if( mbHasTFPVisual ) + GLWin.fbc = fbconfigs[i]; #endif GLWin.vi = vi; GLWin.GLXExtensions = unx::glXQueryExtensionsString( GLWin.dpy, GLWin.screen ); @@ -884,8 +884,10 @@ void OGLTransitionerImpl::impl_prepareSlides() // TODO #ifdef UNX if(GLWin.ctx)//if we have a rendering context, let's init the slides -#endif + GLInitSlides(); +#else GLInitSlides(); +#endif SAL_WARN_IF(SlideBitmapLayout.PlaneStride != 0, "slideshow.opengl","only handle no plane stride now"); diff --git a/slideshow/source/engine/transitions/fanwipe.cxx b/slideshow/source/engine/transitions/fanwipe.cxx index dc102ff99b89..5281412d3120 100644 --- a/slideshow/source/engine/transitions/fanwipe.cxx +++ b/slideshow/source/engine/transitions/fanwipe.cxx @@ -51,7 +51,7 @@ namespace internal { } else { - SAL_WARN_IF( m_fanIn, "slideshow", "FanWipe: m_fanIn is true ?" ); + SAL_WARN_IF( m_fanIn, "slideshow.opengl", "FanWipe: m_fanIn is true ?" ); res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 1.0, 0.5, 1.0)); } return res; diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx index 4d12ce902de3..76d867634838 100644 --- a/svtools/source/contnr/DocumentInfoPreview.cxx +++ b/svtools/source/contnr/DocumentInfoPreview.cxx @@ -112,7 +112,7 @@ void ODocumentInfoPreview::fill( value = conv->convertToSimpleType(aAny, css::uno::TypeClass_STRING). get< rtl::OUString >(); } catch (css::script::CannotConvertException & e) { - SAL_INFO("svtools.contr", "ignored CannotConvertException " << e.Message); + SAL_INFO("svtools.contnr", "ignored CannotConvertException " << e.Message); } if (!value.isEmpty()) { insertEntry(name, value); diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index afebf2e6b62d..4a2211d749dd 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1834,6 +1834,7 @@ void SvxSearchDialog::EnableControls_Impl( const sal_uInt16 nFlags ) aSearchBtn.Enable( !bNoSearch ); aSearchText.Enable( !bNoSearch ); aSearchLB.Enable( !bNoSearch ); + aNotesBtn.Enable(); if ( ( SEARCH_OPTIONS_WHOLE_WORDS & nOptions ) != 0 ) aWordBtn.Enable(); @@ -1843,7 +1844,6 @@ void SvxSearchDialog::EnableControls_Impl( const sal_uInt16 nFlags ) aBackwardsBtn.Enable(); else aBackwardsBtn.Disable(); - aNotesBtn.Enable(); if ( ( SEARCH_OPTIONS_REG_EXP & nOptions ) != 0 ) aRegExpBtn.Enable(); else diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 282cbde3e53a..6581488c6bce 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2991,8 +2991,6 @@ sal_Bool DbFilterField::commitControl() } else { - // display the error and return sal_False - OUString aTitle( SVX_RESSTR(RID_STR_SYNTAXERROR) ); SQLException aError; aError.Message = aErrorMsg; diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index e9b0a282838d..44bb0ca60237 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -859,8 +859,8 @@ namespace svxform // test for 5) // if ( bDropTargetIsComponent && (pDropTargetParent != pCurrentParent) ) - if ( bDropTargetIsComponent ) // TODO : die obige Zeile wieder rein, dann muss aber ExecuteDrop das Vertauschen auch beherrschen - return DND_ACTION_NONE; + if ( bDropTargetIsComponent ) // TODO : die obige Zeile wieder rein, dann muss aber ExecuteDrop das Vertauschen auch beherrschen + return DND_ACTION_NONE; // test for 3) if ( IsFormEntry(pCurrent) ) diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 271e196e250d..53975595b624 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -193,7 +193,7 @@ const String SgaObject::GetTitle() const String aPrivateInd ( aReturnValue.GetToken( 0, ':' ) ); String aResourceName( aReturnValue.GetToken( 1, ':' ) ); sal_Int32 nResId ( aReturnValue.GetToken( 2, ':' ).ToInt32() ); - if ( aReturnValue.GetToken( 0, ':' ).EqualsAscii( "private" ) && + if ( aPrivateInd.EqualsAscii( "private" ) && aResourceName.Len() && ( nResId > 0 ) && ( nResId < 0x10000 ) ) { rtl::OString aMgrName(rtl::OUStringToOString(aResourceName, RTL_TEXTENCODING_UTF8)); diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index 4c91fd3acefc..1a6667b4d671 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -658,11 +658,13 @@ static void lcl_normalizeLocalNames(Sequence< OUString >& _rNames, ConfigNameFor { OUString * pNames = _rNames.getArray(); for(int i = 0; i<_rNames.getLength(); ++i) - try { - pNames[i] = xFormatter->composeHierarchicalName(pNames[i]); + try + { + pNames[i] = xFormatter->composeHierarchicalName(pNames[i]); + } + CATCH_INFO("Exception from composeHierarchicalName(): ") } - CATCH_INFO("Exception from composeHierarchicalName(): ") break; } } @@ -1016,16 +1018,17 @@ sal_Bool ConfigItem::ReplaceSetProperties( catch (const Exception&) { if (isSimpleValueSet) - try { - // #i37322#: fallback action: replace with - xCont->replaceByName(pContainerSubNodes[nContSub], Any()); - // fallback successful: continue looping - continue; + try + { + // #i37322#: fallback action: replace with + xCont->replaceByName(pContainerSubNodes[nContSub], Any()); + // fallback successful: continue looping + continue; + } + catch (Exception &) + {} // propagate original exception, if fallback fails } - catch (Exception &) - {} // propagate original exception, if fallback fails - throw; } } diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index 541d68dbe48c..b10a803e8892 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -487,845 +487,847 @@ sal_Bool EnhWMFReader::ReadEnhWMF() } } else if( !bEMFPlus || bHaveDC || nRecType == EMR_EOF ) - switch( nRecType ) { - case EMR_POLYBEZIERTO : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_True); - break; - case EMR_POLYBEZIER : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_False); - break; + switch( nRecType ) + { + case EMR_POLYBEZIERTO : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_True); + break; + case EMR_POLYBEZIER : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_False); + break; - case EMR_POLYGON : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), sal_False); - break; + case EMR_POLYGON : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), sal_False); + break; - case EMR_POLYLINETO : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_True); - break; - case EMR_POLYLINE : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_False); - break; + case EMR_POLYLINETO : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_True); + break; + case EMR_POLYLINE : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_False); + break; - case EMR_POLYPOLYLINE : - ReadAndDrawPolyLine(); - break; + case EMR_POLYPOLYLINE : + ReadAndDrawPolyLine(); + break; - case EMR_POLYPOLYGON : - ReadAndDrawPolyPolygon(); - break; + case EMR_POLYPOLYGON : + ReadAndDrawPolyPolygon(); + break; - case EMR_SETWINDOWEXTEX : - { // #75383# - *pWMF >> nW >> nH; - pOut->SetWinExt( Size( nW, nH ), true); - } - break; + case EMR_SETWINDOWEXTEX : + { // #75383# + *pWMF >> nW >> nH; + pOut->SetWinExt( Size( nW, nH ), true); + } + break; - case EMR_SETWINDOWORGEX : - { - *pWMF >> nX32 >> nY32; - pOut->SetWinOrg( Point( nX32, nY32 ), true); - } - break; + case EMR_SETWINDOWORGEX : + { + *pWMF >> nX32 >> nY32; + pOut->SetWinOrg( Point( nX32, nY32 ), true); + } + break; - case EMR_SCALEWINDOWEXTEX : - { - *pWMF >> nNom1 >> nDen1 >> nNom2 >> nDen2; - pOut->ScaleWinExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 ); - } - 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_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_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_SETVIEWPORTEXTEX : + { + *pWMF >> nW >> nH; + pOut->SetDevExt( Size( nW, nH ) ); + } + break; - case EMR_EOF : - nRecordCount = 0; // #76846# - break; + case EMR_EOF : + nRecordCount = 0; // #76846# + break; - case EMR_SETPIXELV : - { - *pWMF >> nX32 >> nY32; - pOut->DrawPixel( Point( nX32, nY32 ), ReadColor() ); - } - 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_SETMAPMODE : + { + sal_uInt32 nMapMode; + *pWMF >> nMapMode; + pOut->SetMapMode( nMapMode ); + } + break; - case EMR_SETBKMODE : - { - *pWMF >> nDat32; - pOut->SetBkMode( nDat32 ); - } - break; + case EMR_SETBKMODE : + { + *pWMF >> nDat32; + pOut->SetBkMode( nDat32 ); + } + break; - case EMR_SETPOLYFILLMODE : - break; + case EMR_SETPOLYFILLMODE : + break; - case EMR_SETROP2 : - { - *pWMF >> nDat32; - pOut->SetRasterOp( nDat32 ); - } - break; + case EMR_SETROP2 : + { + *pWMF >> nDat32; + pOut->SetRasterOp( nDat32 ); + } + break; - case EMR_SETSTRETCHBLTMODE : - { - *pWMF >> nStretchBltMode; - } - break; + case EMR_SETSTRETCHBLTMODE : + { + *pWMF >> nStretchBltMode; + } + break; - case EMR_SETTEXTALIGN : - { - *pWMF >> nDat32; - pOut->SetTextAlign( nDat32 ); - } - break; + case EMR_SETTEXTALIGN : + { + *pWMF >> nDat32; + pOut->SetTextAlign( nDat32 ); + } + break; - case EMR_SETTEXTCOLOR : - { - pOut->SetTextColor( ReadColor() ); - } - break; + case EMR_SETTEXTCOLOR : + { + pOut->SetTextColor( ReadColor() ); + } + break; - case EMR_SETBKCOLOR : - { - pOut->SetBkColor( ReadColor() ); - } - break; + case EMR_SETBKCOLOR : + { + pOut->SetBkColor( ReadColor() ); + } + break; - case EMR_OFFSETCLIPRGN : - { - *pWMF >> nX32 >> nY32; - pOut->MoveClipRegion( Size( nX32, nY32 ) ); - } - 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_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_INTERSECTCLIPRECT : + { + *pWMF >> nX32 >> nY32 >> nx32 >> ny32; + pOut->IntersectClipRect( ReadRectangle( nX32, nY32, nx32, ny32 ) ); + } + break; - case EMR_SAVEDC : - { - pOut->Push(); - } - break; + case EMR_SAVEDC : + { + pOut->Push(); + } + break; - case EMR_RESTOREDC : - { - pOut->Pop(); - } - break; + case EMR_RESTOREDC : + { + pOut->Pop(); + } + break; - case EMR_SETWORLDTRANSFORM : - { - XForm aTempXForm; - *pWMF >> aTempXForm; - pOut->SetWorldTransform( aTempXForm ); - } - break; + case EMR_SETWORLDTRANSFORM : + { + XForm aTempXForm; + *pWMF >> aTempXForm; + pOut->SetWorldTransform( aTempXForm ); + } + break; - case EMR_MODIFYWORLDTRANSFORM : - { - sal_uInt32 nMode; - XForm aTempXForm; - *pWMF >> aTempXForm >> nMode; - pOut->ModifyWorldTransform( aTempXForm, nMode ); - } - break; + case EMR_MODIFYWORLDTRANSFORM : + { + sal_uInt32 nMode; + XForm aTempXForm; + *pWMF >> aTempXForm >> nMode; + pOut->ModifyWorldTransform( aTempXForm, nMode ); + } + break; - case EMR_SELECTOBJECT : - { - *pWMF >> nIndex; - pOut->SelectObject( nIndex ); - } - break; + case EMR_SELECTOBJECT : + { + *pWMF >> nIndex; + pOut->SelectObject( nIndex ); + } + break; - case EMR_CREATEPEN : - { - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + case EMR_CREATEPEN : { + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { - LineInfo aLineInfo; - sal_uInt32 nStyle; - Size aSize; - //#fdo39428 Remove SvStream operator>>(long&) - sal_Int32 nTmpW(0), nTmpH(0); + LineInfo aLineInfo; + sal_uInt32 nStyle; + Size aSize; + //#fdo39428 Remove SvStream operator>>(long&) + sal_Int32 nTmpW(0), nTmpH(0); - *pWMF >> nStyle >> nTmpW >> nTmpH; - aSize.Width() = nTmpW; - aSize.Height() = nTmpH; + *pWMF >> nStyle >> nTmpW >> nTmpH; + aSize.Width() = nTmpW; + aSize.Height() = nTmpH; - if ( aSize.Width() ) - aLineInfo.SetWidth( aSize.Width() ); + if ( aSize.Width() ) + aLineInfo.SetWidth( aSize.Width() ); - sal_Bool bTransparent = sal_False; - sal_uInt16 nDashCount = 0; - sal_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 = 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 ); + sal_Bool bTransparent = sal_False; + sal_uInt16 nDashCount = 0; + sal_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 = 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( ReadColor(), aLineInfo, bTransparent ) ); } - 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; + break; - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + case EMR_EXTCREATEPEN : { - *pWMF >> offBmi >> cbBmi >> offBits >> cbBits >> nStyle >> nWidth >> nBrushStyle; - aColorRef = ReadColor(); - *pWMF >> elpHatch >> elpNumEntries; + sal_Int32 elpHatch; + sal_uInt32 offBmi, cbBmi, offBits, cbBits, nStyle, nWidth, nBrushStyle, elpNumEntries; + Color aColorRef; - LineInfo aLineInfo; - if ( nWidth ) - aLineInfo.SetWidth( nWidth ); + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { + *pWMF >> offBmi >> cbBmi >> offBits >> cbBits >> nStyle >> nWidth >> nBrushStyle; + aColorRef = ReadColor(); + *pWMF >> elpHatch >> elpNumEntries; - sal_Bool bTransparent = sal_False; - sal_uInt16 nDashCount = 0; - sal_uInt16 nDotCount = 0; + LineInfo aLineInfo; + if ( nWidth ) + aLineInfo.SetWidth( nWidth ); - 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 ); + 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 ) ); } - if ( nDashCount | nDotCount ) + } + break; + + case EMR_CREATEBRUSHINDIRECT : + { + sal_uInt32 nStyle; + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { - aLineInfo.SetStyle( LINE_DASH ); - aLineInfo.SetDashCount( nDashCount ); - aLineInfo.SetDotCount( nDotCount ); + *pWMF >> nStyle; + pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) ); } - pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( aColorRef, aLineInfo, bTransparent ) ); } - } - break; + break; - case EMR_CREATEBRUSHINDIRECT : - { - sal_uInt32 nStyle; - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + case EMR_DELETEOBJECT : { - *pWMF >> nStyle; - pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) ); + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + pOut->DeleteObject( nIndex ); } - } - break; - - case EMR_DELETEOBJECT : - { - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) - pOut->DeleteObject( nIndex ); - } - break; + break; - case EMR_ELLIPSE : - { - *pWMF >> nX32 >> nY32 >> nx32 >> ny32; - pOut->DrawEllipse( ReadRectangle( nX32, nY32, nx32, ny32 ) ); - } - 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_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_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 : - { - 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 ) ); - } - break; + case EMR_ARC : + { + 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 ) ); + } + break; - case EMR_CHORD : - { - 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 ) ); - } - break; + case EMR_CHORD : + { + 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 ) ); + } + break; - case EMR_PIE : - { - sal_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_PIE : + { + sal_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_LINETO : + { + *pWMF >> nX32 >> nY32; + pOut->LineTo( Point( nX32, nY32 ), bRecordPath ); + } + break; - case EMR_ARCTO : - { - 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 ), sal_True ); - } - break; + case EMR_ARCTO : + { + 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 ), sal_True ); + } + break; - case EMR_BEGINPATH : - { - pOut->ClearPath(); - bRecordPath = sal_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_ABORTPATH : + pOut->ClearPath(); + case EMR_ENDPATH : + bRecordPath = sal_False; + break; - case EMR_CLOSEFIGURE : - pOut->ClosePath(); - break; + case EMR_CLOSEFIGURE : + pOut->ClosePath(); + break; - case EMR_FILLPATH : - pOut->StrokeAndFillPath( sal_False, sal_True ); - break; + case EMR_FILLPATH : + pOut->StrokeAndFillPath( sal_False, sal_True ); + break; - case EMR_STROKEANDFILLPATH : - pOut->StrokeAndFillPath( sal_True, 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_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_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_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_True ); + } + break; - case EMR_BITBLT : // PASSTHROUGH INTENDED - case EMR_STRETCHBLT : - { - sal_Int32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc; - sal_uInt32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc; - XForm xformSrc; + case EMR_BITBLT : // PASSTHROUGH INTENDED + case EMR_STRETCHBLT : + { + sal_Int32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc; + sal_uInt32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc; + XForm xformSrc; - sal_uInt32 nStart = pWMF->Tell() - 8; + sal_uInt32 nStart = pWMF->Tell() - 8; - pWMF->SeekRel( 0x10 ); - *pWMF >> xDest >> yDest >> cxDest >> cyDest >> dwRop >> xSrc >> ySrc - >> xformSrc >> nColor >> iUsageSrc >> offBmiSrc >> cbBmiSrc - >> offBitsSrc >> cbBitsSrc; + 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; + if ( nRecType == EMR_STRETCHBLT ) + *pWMF >> cxSrc >> cySrc; + else + cxSrc = cySrc = 0; - Bitmap aBitmap; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) ); + Bitmap aBitmap; + Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) ); - cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative - cyDest = abs( (int)cyDest ); // and also 122889 + 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 = sal_False; - else - { - sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; - if ( nSize <= ( nEndPos - nStartPos ) ) + if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) + bStatus = sal_False; + else { - char* pBuf = new char[ nSize ]; - SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); - 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, sal_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() ) ) + sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; + if ( nSize <= ( nEndPos - nStartPos ) ) { - Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); - aBitmap.Crop( aCropRect ); + char* pBuf = new char[ nSize ]; + SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); + 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, sal_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.push_back( new BSaveStruct( aBitmap, aRect, dwRop, pOut->GetFillStyle () ) ); } - aBmpSaveList.push_back( new BSaveStruct( aBitmap, aRect, dwRop, pOut->GetFillStyle () ) ); } } - } - break; + break; - case EMR_STRETCHDIBITS : - { - 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 - >> cbBitsSrc - >> iUsageSrc - >> dwRop - >> cxDest - >> cyDest; - - Bitmap aBitmap; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) ); - - cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative - cyDest = abs( (int)cyDest ); // and also 122889 - - if ( ((SAL_MAX_UINT32 - 14) < cbBitsSrc) - || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc ) - ) - { - bStatus = sal_False; - } - else + case EMR_STRETCHDIBITS : { - sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; - if ( nSize <= ( nEndPos - nStartPos ) ) + 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 + >> cbBitsSrc + >> iUsageSrc + >> dwRop + >> cxDest + >> cyDest; + + Bitmap aBitmap; + Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) ); + + cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative + cyDest = abs( (int)cyDest ); // and also 122889 + + if ( ((SAL_MAX_UINT32 - 14) < cbBitsSrc) + || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc ) + ) + { + bStatus = sal_False; + } + else { - char* pBuf = new char[ nSize ]; - SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); - 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, sal_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() ) ) + sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; + if ( nSize <= ( nEndPos - nStartPos ) ) { - Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); - aBitmap.Crop( aCropRect ); + char* pBuf = new char[ nSize ]; + SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); + 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, sal_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.push_back( new BSaveStruct( aBitmap, aRect, dwRop, pOut->GetFillStyle () ) ); } - aBmpSaveList.push_back( new BSaveStruct( aBitmap, aRect, dwRop, pOut->GetFillStyle () ) ); } } - } - break; + break; - case EMR_EXTCREATEFONTINDIRECTW : - { - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + case EMR_EXTCREATEFONTINDIRECTW : { - 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++ ) + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { - sal_uInt16 nChar; - *pWMF >> nChar; - lfFaceName[ i ] = nChar; + 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++ ) + { + sal_uInt16 nChar; + *pWMF >> nChar; + lfFaceName[ i ] = nChar; + } + aLogFont.alfFaceName = rtl::OUString( lfFaceName ); + pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) ); } - aLogFont.alfFaceName = rtl::OUString( lfFaceName ); - pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) ); } - } - break; + 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; + 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; + nCurPos = pWMF->Tell() - 8; - *pWMF >> nLeft >> nTop >> nRight >> nBottom >> nGfxMode >> nXScale >> nYScale - >> ptlReferenceX >> ptlReferenceY >> nLen >> nOffString >> nOptions; + *pWMF >> nLeft >> nTop >> nRight >> nBottom >> nGfxMode >> nXScale >> nYScale + >> ptlReferenceX >> ptlReferenceY >> nLen >> nOffString >> nOptions; - pWMF->SeekRel( 0x10 ); - *pWMF >> offDx; + 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" ); + 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 ) ) + Point aPos( ptlReferenceX, ptlReferenceY ); + if ( nLen && ( nLen < SAL_MAX_UINT32 / sizeof(sal_Int32) ) ) { - pWMF->Seek( nCurPos + offDx ); - if ( ( nLen * sizeof(sal_uInt32) ) <= ( nEndPos - pWMF->Tell() ) ) + if ( offDx && (( nCurPos + offDx + nLen * 4 ) <= nNextPos ) ) { - pDX = new sal_Int32[ nLen ]; - sal_uInt32 i; - for ( i = 0; i < nLen; i++ ) - *pWMF >> pDX[ i ]; + 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() ) ) + pWMF->Seek( nCurPos + nOffString ); + String aText; + if ( bFlag ) { - 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 ) + if ( nLen <= ( nEndPos - pWMF->Tell() ) ) { - sal_uInt16 i, j; - sal_Int32* pOldDx = pDX; - pDX = new sal_Int32[ aText.Len() ]; - for ( i = 0, j = 0; i < aText.Len(); i++ ) + 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_Unicode cUniChar = aText.GetChar(i); - rtl::OString aCharacter(&cUniChar, 1, pOut->GetCharSet()); - pDX[ i ] = 0; - for (sal_Int32 k = 0; ( k < aCharacter.getLength() ) && ( j < nLen ) && ( i < aText.Len() ); ++k) - pDX[ i ] += pOldDx[ j++ ]; + sal_uInt16 i, j; + sal_Int32* pOldDx = pDX; + pDX = new sal_Int32[ aText.Len() ]; + for ( i = 0, j = 0; i < aText.Len(); i++ ) + { + sal_Unicode cUniChar = aText.GetChar(i); + rtl::OString aCharacter(&cUniChar, 1, pOut->GetCharSet()); + pDX[ i ] = 0; + for (sal_Int32 k = 0; ( k < aCharacter.getLength() ) && ( j < nLen ) && ( i < aText.Len() ); ++k) + pDX[ i ] += pOldDx[ j++ ]; + } + delete[] pOldDx; } - delete[] pOldDx; } } - } - else - { - if ( ( nLen * sizeof(sal_Unicode) ) <= ( nEndPos - pWMF->Tell() ) ) + else { - 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 ) + if ( ( nLen * sizeof(sal_Unicode) ) <= ( nEndPos - pWMF->Tell() ) ) { - nTmp = *pTmp--; - pTmp[ 1 ] = *pTmp; - *pTmp = nTmp; - } + 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 = rtl::OUString(pBuf, nLen); - delete[] pBuf; + aText = rtl::OUString(pBuf, nLen); + delete[] pBuf; + } } + pOut->DrawText( aPos, aText, pDX, bRecordPath, nGfxMode ); } - pOut->DrawText( aPos, aText, pDX, bRecordPath, nGfxMode ); + delete[] pDX; } - delete[] pDX; - } - break; - - case EMR_POLYBEZIERTO16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_True); break; - case EMR_POLYBEZIER16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_False); - break; - case EMR_POLYGON16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), sal_False); - break; + case EMR_POLYBEZIERTO16 : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_True); + break; + case EMR_POLYBEZIER16 : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_False); + break; - case EMR_POLYLINETO16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_True); + case EMR_POLYGON16 : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), sal_False); break; - case EMR_POLYLINE16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_False); - break; - case EMR_POLYPOLYLINE16 : - ReadAndDrawPolyLine(); + case EMR_POLYLINETO16 : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_True); + break; + case EMR_POLYLINE16 : + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_False); break; - case EMR_POLYPOLYGON16 : - ReadAndDrawPolyPolygon(); - break; + case EMR_POLYPOLYLINE16 : + ReadAndDrawPolyLine(); + break; - case EMR_FILLRGN : - { - sal_uInt32 nLen; - PolyPolygon aPolyPoly; - pWMF->SeekRel( 0x10 ); - *pWMF >> nLen >> nIndex; + case EMR_POLYPOLYGON16 : + ReadAndDrawPolyPolygon(); + break; - if ( ImplReadRegion( aPolyPoly, *pWMF, nRecSize ) ) + case EMR_FILLRGN : { - pOut->Push(); - pOut->SelectObject( nIndex ); - pOut->DrawPolyPolygon( aPolyPoly, sal_False ); - pOut->Pop(); - } - } - break; + sal_uInt32 nLen; + PolyPolygon aPolyPoly; + pWMF->SeekRel( 0x10 ); + *pWMF >> nLen >> nIndex; - case EMR_CREATEDIBPATTERNBRUSHPT : - { - sal_uInt32 nStart = pWMF->Tell() - 8; - Bitmap aBitmap; - - *pWMF >> nIndex; + if ( ImplReadRegion( aPolyPoly, *pWMF, nRecSize ) ) + { + pOut->Push(); + pOut->SelectObject( nIndex ); + pOut->DrawPolyPolygon( aPolyPoly, sal_False ); + pOut->Pop(); + } + } + break; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + case EMR_CREATEDIBPATTERNBRUSHPT : { - sal_uInt32 usage, offBmi, cbBmi, offBits, cbBits; + sal_uInt32 nStart = pWMF->Tell() - 8; + Bitmap aBitmap; - *pWMF >> usage; - *pWMF >> offBmi; - *pWMF >> cbBmi; - *pWMF >> offBits; - *pWMF >> cbBits; + *pWMF >> nIndex; - if ( (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) ) - bStatus = sal_False; - else if ( offBmi ) + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { - sal_uInt32 nSize = cbBmi + cbBits + 14; - if ( nSize <= ( nEndPos - nStartPos ) ) - { - char* pBuf = new char[ nSize ]; + sal_uInt32 usage, offBmi, cbBmi, offBits, cbBits; - SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); - aTmp.ObjectOwnsMemory( sal_True ); - aTmp << (sal_uInt8)'B' - << (sal_uInt8)'M' - << (sal_uInt32)cbBits - << (sal_uInt16)0 - << (sal_uInt16)0 - << (sal_uInt32)cbBmi + 14; - pWMF->Seek( nStart + offBmi ); - pWMF->Read( pBuf + 14, cbBmi ); - pWMF->Seek( nStart + offBits ); - pWMF->Read( pBuf + 14 + cbBmi, cbBits ); - aTmp.Seek( 0 ); - aBitmap.Read( aTmp, sal_True ); + *pWMF >> usage; + *pWMF >> offBmi; + *pWMF >> cbBmi; + *pWMF >> offBits; + *pWMF >> cbBits; + + if ( (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) ) + bStatus = sal_False; + else if ( offBmi ) + { + sal_uInt32 nSize = cbBmi + cbBits + 14; + if ( nSize <= ( nEndPos - nStartPos ) ) + { + char* pBuf = new char[ nSize ]; + + SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); + aTmp.ObjectOwnsMemory( sal_True ); + aTmp << (sal_uInt8)'B' + << (sal_uInt8)'M' + << (sal_uInt32)cbBits + << (sal_uInt16)0 + << (sal_uInt16)0 + << (sal_uInt32)cbBmi + 14; + pWMF->Seek( nStart + offBmi ); + pWMF->Read( pBuf + 14, cbBmi ); + pWMF->Seek( nStart + offBits ); + pWMF->Read( pBuf + 14 + cbBmi, cbBits ); + aTmp.Seek( 0 ); + aBitmap.Read( aTmp, sal_True ); + } } } - } - pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( aBitmap ) ); - } - break; + pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( aBitmap ) ); + } + 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_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; + 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_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 ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 178e619a2bba..59dcfb722fed 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3479,7 +3479,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical ( pFontData[ nBeginBinaryIndex+nIndex ] >= 'a' && pFontData[ nBeginBinaryIndex+nIndex ] <= 'f' ) || ( pFontData[ nBeginBinaryIndex+nIndex ] >= 'A' && pFontData[ nBeginBinaryIndex+nIndex ] <= 'F' ) ); ++nIndex ) - ; + ; bool bConvertHexData = true; if( nIndex < 4 ) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 47437ddb9765..38960afc044b 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -8224,13 +8224,13 @@ void Window::ImplCallActivateListeners( Window *pOld ) // eg, undocked docking windows (ImplDockFloatWin) // #104714#, revert the changes for 100759 because it has a side effect when pOld is a dialog // additionally the gallery is not dockable anymore, so 100759 canot occur - if ( ImplGetParent() ) /* && mpWindowImpl->mpFrameWindow == ImplGetParent()->mpWindowImpl->mpFrameWindow ) */ - ImplGetParent()->ImplCallActivateListeners( pOld ); - else if( (mpWindowImpl->mnStyle & WB_INTROWIN) == 0 ) - { - // top level frame reached: store hint for DefModalDialogParent - ImplGetSVData()->maWinData.mpActiveApplicationFrame = mpWindowImpl->mpFrameWindow; - } + if ( ImplGetParent() ) /* && mpWindowImpl->mpFrameWindow == ImplGetParent()->mpWindowImpl->mpFrameWindow ) */ + ImplGetParent()->ImplCallActivateListeners( pOld ); + else if( (mpWindowImpl->mnStyle & WB_INTROWIN) == 0 ) + { + // top level frame reached: store hint for DefModalDialogParent + ImplGetSVData()->maWinData.mpActiveApplicationFrame = mpWindowImpl->mpFrameWindow; + } //} } } diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx index 6db49042a578..b5a0569b272d 100644 --- a/vcl/unx/generic/printer/printerinfomanager.cxx +++ b/vcl/unx/generic/printer/printerinfomanager.cxx @@ -1149,7 +1149,7 @@ void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const int nModified = rContext.countValuesModified(); while( nModified-- && rContext.getModifiedKey( nModified ) != pPageSizeKey ) - ; + ; if( nModified >= 0 ) // paper was set already, do not modify { diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx index 6cd05311790f..45fe1254c2a3 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx @@ -116,10 +116,9 @@ rtl::OUString SAL_CALL SalGtkFolderPicker::getDirectory() throw( uno::RuntimeExc return aSelectedFolderName; } -void SAL_CALL SalGtkFolderPicker::setDescription( const rtl::OUString& rDescription ) +void SAL_CALL SalGtkFolderPicker::setDescription( const rtl::OUString& /*rDescription*/ ) throw( uno::RuntimeException ) { - ::rtl::OString aDescription = OUStringToOString( rDescription, RTL_TEXTENCODING_UTF8 ); } //----------------------------------------------------------------------------------------- diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx index 8f4073d62db9..2c0e715cbc2d 100644 --- a/writerperfect/source/draw/WPGImportFilter.cxx +++ b/writerperfect/source/draw/WPGImportFilter.cxx @@ -64,7 +64,6 @@ throw (RuntimeException) #endif sal_Int32 nLength = aDescriptor.getLength(); const PropertyValue *pValue = aDescriptor.getConstArray(); - OUString sURL; Reference < XInputStream > xInputStream; for ( sal_Int32 i = 0 ; i < nLength; i++) { -- cgit v1.2.3