diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-20 09:52:21 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-20 09:52:21 +0200 |
commit | e70b1417d22d22e3d5bdffb1f4b55bc83a4c36ef (patch) | |
tree | 3bd3a7fe6854916ee1afa9ee042fc91b3fb9c24e /reportdesign/source/core/sdr | |
parent | c00fe9ce1105c6c2a26954eeaee5e51336909a2a (diff) | |
parent | f1ea4ba4479f4a29eb0a42389d5f03c2ad280e8f (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
dbaccess/AllLangResTarget_adabasui.mk
dbaccess/AllLangResTarget_dba.mk
dbaccess/AllLangResTarget_dbmm.mk
dbaccess/AllLangResTarget_sdbt.mk
dbaccess/Executable_odbcconfig.mk
dbaccess/JunitTest_dbaccess_unoapi.mk
dbaccess/Library_adabasui.mk
dbaccess/Library_dba.mk
dbaccess/Library_dbaxml.mk
dbaccess/Library_dbmm.mk
dbaccess/Library_sdbt.mk
dbaccess/Makefile
dbaccess/Module_dbaccess.mk
dbaccess/Package_inc.mk
dbaccess/Package_uiconfig.mk
dbaccess/prj/build.lst
dbaccess/qa/unoapi/Test.java
dbaccess/source/core/api/CacheSet.hxx
dbaccess/source/core/dataaccess/SharedConnection.hxx
dbaccess/source/core/dataaccess/connection.cxx
dbaccess/source/filter/xml/xmlAutoStyle.cxx
dbaccess/source/filter/xml/xmlColumn.cxx
dbaccess/source/filter/xml/xmlComponent.cxx
dbaccess/source/filter/xml/xmlConnectionData.cxx
dbaccess/source/filter/xml/xmlConnectionResource.cxx
dbaccess/source/filter/xml/xmlDataSource.cxx
dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
dbaccess/source/filter/xml/xmlDatabaseDescription.cxx
dbaccess/source/filter/xml/xmlDocuments.cxx
dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
dbaccess/source/filter/xml/xmlHelper.cxx
dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
dbaccess/source/filter/xml/xmlLogin.cxx
dbaccess/source/filter/xml/xmlQuery.cxx
dbaccess/source/filter/xml/xmlServerDatabase.cxx
dbaccess/source/filter/xml/xmlTable.cxx
dbaccess/source/filter/xml/xmlTableFilterList.cxx
dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
dbaccess/source/ui/app/AppDetailPageHelper.cxx
dbaccess/source/ui/app/AppDetailView.cxx
dbaccess/source/ui/app/AppIconControl.cxx
dbaccess/source/ui/app/AppSwapWindow.cxx
dbaccess/source/ui/app/AppTitleWindow.cxx
dbaccess/source/ui/app/AppView.cxx
dbaccess/source/ui/browser/AsyncronousLink.cxx
dbaccess/source/ui/browser/genericcontroller.cxx
dbaccess/source/ui/control/ColumnControlWindow.cxx
dbaccess/source/ui/control/RelationControl.cxx
dbaccess/source/ui/control/SqlNameEdit.cxx
dbaccess/source/ui/control/TableGrantCtrl.cxx
dbaccess/source/ui/control/VertSplitView.cxx
dbaccess/source/ui/control/toolboxcontroller.cxx
dbaccess/source/ui/dlg/CollectionView.cxx
dbaccess/source/ui/dlg/ConnectionHelper.cxx
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
dbaccess/source/ui/dlg/RelationDlg.cxx
dbaccess/source/ui/dlg/TextConnectionHelper.cxx
dbaccess/source/ui/dlg/detailpages.cxx
dbaccess/source/ui/dlg/dlgsize.cxx
dbaccess/source/ui/dlg/queryorder.cxx
dbaccess/source/ui/dlg/tablespage.cxx
dbaccess/source/ui/misc/TableCopyHelper.cxx
dbaccess/source/ui/misc/ToolBoxHelper.cxx
dbaccess/source/ui/misc/WExtendPages.cxx
dbaccess/source/ui/misc/WNameMatch.cxx
dbaccess/source/ui/misc/WTypeSelect.cxx
dbaccess/source/ui/querydesign/ConnectionLine.cxx
dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
dbaccess/source/ui/querydesign/ConnectionLineData.cxx
dbaccess/source/ui/querydesign/JAccess.cxx
dbaccess/source/ui/querydesign/JoinController.cxx
dbaccess/source/ui/querydesign/JoinDesignView.cxx
dbaccess/source/ui/querydesign/JoinExchange.cxx
dbaccess/source/ui/querydesign/JoinTableView.cxx
dbaccess/source/ui/querydesign/QTableConnection.cxx
dbaccess/source/ui/querydesign/QTableConnectionData.cxx
dbaccess/source/ui/querydesign/QTableWindow.cxx
dbaccess/source/ui/querydesign/QTableWindowData.cxx
dbaccess/source/ui/querydesign/QueryDesignView.cxx
dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
dbaccess/source/ui/querydesign/QueryTextView.cxx
dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
dbaccess/source/ui/querydesign/TableConnection.cxx
dbaccess/source/ui/querydesign/TableConnectionData.cxx
dbaccess/source/ui/querydesign/TableWindow.cxx
dbaccess/source/ui/querydesign/TableWindowAccess.cxx
dbaccess/source/ui/querydesign/TableWindowData.cxx
dbaccess/source/ui/querydesign/TableWindowListBox.cxx
dbaccess/source/ui/querydesign/TableWindowTitle.cxx
dbaccess/source/ui/querydesign/querydlg.cxx
dbaccess/source/ui/querydesign/queryview.cxx
dbaccess/source/ui/relationdesign/RTableConnection.cxx
dbaccess/source/ui/relationdesign/RelationDesignView.cxx
dbaccess/source/ui/relationdesign/RelationTableView.cxx
dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
dbaccess/source/ui/tabledesign/TEditControl.cxx
dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
dbaccess/source/ui/tabledesign/TableDesignView.cxx
dbaccess/source/ui/tabledesign/TableFieldControl.cxx
dbaccess/source/ui/tabledesign/TableRow.cxx
dbaccess/source/ui/tabledesign/TableRowExchange.cxx
dbaccess/source/ui/tabledesign/TableUndo.cxx
dbaccess/source/ui/uno/ColumnControl.cxx
dbaccess/source/ui/uno/ColumnPeer.cxx
reportdesign/AllLangResTarget_rpt.mk
reportdesign/AllLangResTarget_rptui.mk
reportdesign/Library_rpt.mk
reportdesign/Library_rptui.mk
reportdesign/Library_rptxml.mk
reportdesign/Module_reportdesign.mk
reportdesign/Package_uiconfig.mk
reportdesign/Package_xml.mk
reportdesign/prj/build.lst
reportdesign/prj/makefile.mk
Diffstat (limited to 'reportdesign/source/core/sdr')
-rw-r--r-- | reportdesign/source/core/sdr/ModuleHelper.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/PropertyForward.cxx | 11 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/ReportDrawPage.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/ReportUndoFactory.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/RptModel.cxx | 18 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/RptObject.cxx | 54 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/RptObjectListener.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/RptPage.cxx | 35 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/UndoActions.cxx | 14 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/UndoEnv.cxx | 21 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/formatnormalizer.cxx | 13 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/formatnormalizer.hxx | 3 |
12 files changed, 85 insertions, 109 deletions
diff --git a/reportdesign/source/core/sdr/ModuleHelper.cxx b/reportdesign/source/core/sdr/ModuleHelper.cxx index bfdff08c09a9..a36b37f96a03 100644 --- a/reportdesign/source/core/sdr/ModuleHelper.cxx +++ b/reportdesign/source/core/sdr/ModuleHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,9 +35,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <rtl/uri.hxx> #include <tools/debug.hxx> -#ifndef _SOLAR_HRC #include <svl/solar.hrc> -#endif #define EXPAND_PROTOCOL "vnd.sun.star.expand:" #define ENTER_MOD_METHOD() \ @@ -92,8 +91,7 @@ ResMgr* OModuleImpl::getResManager() if (!m_pRessources) { // create a manager with a fixed prefix - rtl::OString sName = rtl::OString( "rptui" ); - m_pRessources = ResMgr::CreateResMgr(sName); + m_pRessources = ResMgr::CreateResMgr("rptui"); } return m_pRessources; } @@ -140,3 +138,5 @@ void OModule::ensureImpl() //......................................................................... } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx b/reportdesign/source/core/sdr/PropertyForward.cxx index 90e012caf603..c346a377954c 100644 --- a/reportdesign/source/core/sdr/PropertyForward.cxx +++ b/reportdesign/source/core/sdr/PropertyForward.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,6 +34,7 @@ #include <tools/debug.hxx> #include <tools/diagnose_ex.h> #include "corestrings.hrc" +#include <o3tl/compat_functional.hxx> //........................................................................ namespace rptui @@ -94,7 +96,7 @@ OPropertyMediator::OPropertyMediator(const Reference< XPropertySet>& _xSource DBG_UNHANDLED_EXCEPTION(); (void)e; } - } // if ( m_xDest.is() && m_xSource.is() ) + } osl_decrementInterlockedCount(&m_refCount); } // ----------------------------------------------------------------------------- @@ -131,9 +133,9 @@ void SAL_CALL OPropertyMediator::propertyChange( const PropertyChangeEvent& evt aFind = ::std::find_if( m_aNameMap.begin(), m_aNameMap.end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(::std::equal_to< ::rtl::OUString >(), evt.PropertyName), - ::std::compose1(::std::select1st<TPropertyConverter>(),::std::select2nd<TPropertyNamePair::value_type>()) + ::o3tl::compose1(::o3tl::select1st<TPropertyConverter>(),::o3tl::select2nd<TPropertyNamePair::value_type>()) ) ); if ( aFind != m_aNameMap.end() ) @@ -163,7 +165,7 @@ void SAL_CALL OPropertyMediator::propertyChange( const PropertyChangeEvent& evt } catch(Exception&) { - OSL_ENSURE(0,"Exception catched!"); + OSL_FAIL("Exception catched!"); } m_bInChange = sal_False; } @@ -204,3 +206,4 @@ void OPropertyMediator::startListening() } // namespace dbaccess //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index df151fc7051b..d34b72de3722 100644 --- a/reportdesign/source/core/sdr/ReportDrawPage.cxx +++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -133,7 +134,6 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb SvxOle2Shape* pShape = new SvxOle2Shape( pObj ); xShape.set(*pShape,uno::UNO_QUERY); pShape->setShapeKind(pObj->GetObjIdentifier()); - //xShape = new SvxOle2Shape( pOle2Obj ); } if ( !xShape.is() ) @@ -154,3 +154,5 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx index 056d3b77c43f..37bbfdf965c4 100644 --- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx +++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,7 +97,6 @@ SdrUndoAction* OReportUndoFactory::CreateUndoInsertObject( SdrObject& rObject, b SdrUndoAction* OReportUndoFactory::CreateUndoDeleteObject( SdrObject& rObject, bool /*bOrdNumDirect*/ ) { return lcl_createUndo(rObject,rptui::Removed,RID_STR_UNDO_DELETE_CONTROL); - //return m_pUndoFactory->CreateUndoDeleteObject( rObject, bOrdNumDirect ? sal_True : sal_False ); } SdrUndoAction* OReportUndoFactory::CreateUndoNewObject( SdrObject& rObject, bool /*bOrdNumDirect*/ ) @@ -180,3 +180,4 @@ SdrUndoAction* OReportUndoFactory::CreateUndoPageChangeMasterPage(SdrPage& rChan } //rptui //================================================================== +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx index 897e46bf4f3d..30d99f85927e 100644 --- a/reportdesign/source/core/sdr/RptModel.cxx +++ b/reportdesign/source/core/sdr/RptModel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,13 +71,6 @@ OReportModel::OReportModel(::reportdesign::OReportDefinition* _pReportDefinition m_pUndoEnv = new OXUndoEnvironment(*this); m_pUndoEnv->acquire(); SetSdrUndoFactory(new OReportUndoFactory); - - // SvxFontNameToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONT); - //SvxFontHeightToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT); - //SvxFontColorToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR); - //SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR2); - //SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR_BACKGROUND); - //SvxColorToolBoxControl::RegisterControl(SID_BACKGROUND_COLOR); } //---------------------------------------------------------------------------- @@ -96,10 +90,10 @@ void OReportModel::detachController() m_pUndoEnv->Clear(OXUndoEnvironment::Accessor()); } //---------------------------------------------------------------------------- -SdrPage* OReportModel::AllocPage(FASTBOOL /*bMasterPage*/) +SdrPage* OReportModel::AllocPage(bool /*bMasterPage*/) { DBG_CHKTHIS( rpt_OReportModel, 0); - OSL_ENSURE(0,"Who called me!"); + OSL_FAIL("Who called me!"); return NULL; } @@ -133,10 +127,6 @@ void OReportModel::SetModified(sal_Bool _bModified) SdrPage* OReportModel::RemovePage(sal_uInt16 nPgNum) { OReportPage* pPage = dynamic_cast<OReportPage*>(SdrModel::RemovePage(nPgNum)); - //if ( pPage ) - //{ - // m_pUndoEnv->RemoveSection(pPage); - //} return pPage; } // ----------------------------------------------------------------------------- @@ -231,3 +221,5 @@ uno::Reference< uno::XInterface > OReportModel::createShape(const ::rtl::OUStrin //================================================================== } //rptui //================================================================== + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index bbc970eba479..09bf34044676 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -171,7 +172,7 @@ SdrObject* OObjectBase::createObject(const uno::Reference< report::XReportCompon pNewObj = OOle2Obj::Create( _xComponent,nType ); break; default: - OSL_ENSURE(0,"Unknown object id"); + OSL_FAIL("Unknown object id"); break; } @@ -204,9 +205,9 @@ namespace nTextAlign = style::ParagraphAdjust_RIGHT; break; default: - OSL_ENSURE(0,"Illegal text alignment value!"); + OSL_FAIL("Illegal text alignment value!"); break; - } // switch(nTextAlign) + } aRet <<= (style::ParagraphAdjust)nTextAlign; } else @@ -227,9 +228,9 @@ namespace nTextAlign = awt::TextAlign::RIGHT; break; default: - OSL_ENSURE(0,"Illegal text alignment value!"); + OSL_FAIL("Illegal text alignment value!"); break; - } // switch(eParagraphAdjust) + } aRet <<= nTextAlign; } return aRet; @@ -250,7 +251,6 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId) s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter))); s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter))); s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter))); - //s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,PROPERTY_ALIGN)); } return s_aNameMap; } @@ -291,7 +291,6 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId) s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLTEXTEMPHASISMARK,TPropertyConverter(PROPERTY_FONTEMPHASISMARK,aNoConverter))); s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter))); s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter))); - //s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aNoConverter))); ::boost::shared_ptr<AnyConverter> aParaAdjust(new ParaAdjust()); s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust))); } @@ -397,7 +396,7 @@ void OObjectBase::EndListening(sal_Bool /*bRemoveListener*/) } catch(uno::Exception) { - OSL_ENSURE(0,"OObjectBase::EndListening: Exception caught!"); + OSL_FAIL("OObjectBase::EndListening: Exception caught!"); } } m_xPropertyChangeListener.clear(); @@ -533,7 +532,7 @@ sal_Int32 OCustomShape::GetStep() const { // get step property sal_Int32 nStep = 0; - OSL_ENSURE(0,"Who called me!"); + OSL_FAIL("Who called me!"); return nStep; } //---------------------------------------------------------------------------- @@ -573,9 +572,9 @@ void OCustomShape::NbcSetLogicRect(const Rectangle& rRect) SetPropsFromRect(rRect); } //---------------------------------------------------------------------------- -FASTBOOL OCustomShape::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool OCustomShape::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { - FASTBOOL bResult = SdrObjCustomShape::EndCreate(rStat, eCmd); + bool bResult = SdrObjCustomShape::EndCreate(rStat, eCmd); if ( bResult ) { OReportModel* pRptModel = static_cast<OReportModel*>(GetModel()); @@ -719,7 +718,7 @@ sal_Int32 OUnoObject::GetStep() const DBG_CHKTHIS( rpt_OUnoObject,NULL); // get step property sal_Int32 nStep = 0; - OSL_ENSURE(0,"Who called me!"); + OSL_FAIL("Who called me!"); return nStep; } @@ -748,11 +747,6 @@ void OUnoObject::NbcMove( const Size& rSize ) // LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point? int nNewX = m_xReportComponent->getPositionX() + rSize.A(); - // can this hinder us to set components outside the area? - // if (nNewX < 0) - // { - // nNewX = 0; - // } m_xReportComponent->setPositionX(nNewX); int nNewY = m_xReportComponent->getPositionY() + rSize.B(); if (nNewY < 0 && !bUndoMode) @@ -808,10 +802,10 @@ void OUnoObject::NbcSetLogicRect(const Rectangle& rRect) } //---------------------------------------------------------------------------- -FASTBOOL OUnoObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool OUnoObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { DBG_CHKTHIS( rpt_OUnoObject,NULL); - FASTBOOL bResult = SdrUnoObj::EndCreate(rStat, eCmd); + bool bResult = SdrUnoObj::EndCreate(rStat, eCmd); if ( bResult ) { impl_setReportComponent_nothrow(); @@ -948,16 +942,16 @@ uno::Reference< uno::XInterface > OUnoObject::getUnoShape() return OObjectBase::getUnoShapeOf( *this ); } // ----------------------------------------------------------------------------- -SdrObject* OUnoObject::Clone() const +OUnoObject* OUnoObject::Clone() const { - SdrObject* pClone = SdrUnoObj::Clone(); + OUnoObject* pClone = CloneHelper< OUnoObject >(); if ( pClone ) { Reference<XPropertySet> xSource(const_cast<OUnoObject*>(this)->getUnoShape(),uno::UNO_QUERY); Reference<XPropertySet> xDest(pClone->getUnoShape(),uno::UNO_QUERY); if ( xSource.is() && xDest.is() ) comphelper::copyProperties(xSource.get(),xDest.get()); - } // if ( pClone ) + } return pClone; } //---------------------------------------------------------------------------- @@ -1019,7 +1013,7 @@ sal_Int32 OOle2Obj::GetStep() const DBG_CHKTHIS( rpt_OOle2Obj,NULL); // get step property sal_Int32 nStep = 0; - OSL_ENSURE(0,"Who called me!"); + OSL_FAIL("Who called me!"); return nStep; } @@ -1108,10 +1102,10 @@ void OOle2Obj::NbcSetLogicRect(const Rectangle& rRect) } //---------------------------------------------------------------------------- -FASTBOOL OOle2Obj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool OOle2Obj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { DBG_CHKTHIS( rpt_OOle2Obj,NULL); - FASTBOOL bResult = SdrOle2Obj::EndCreate(rStat, eCmd); + bool bResult = SdrOle2Obj::EndCreate(rStat, eCmd); if ( bResult ) { OReportModel* pRptModel = static_cast<OReportModel*>(GetModel()); @@ -1157,14 +1151,14 @@ uno::Reference< chart2::data::XDatabaseDataProvider > lcl_getDataProvider(const { xSource.set(xChartDoc->getDataProvider(),uno::UNO_QUERY); } - } // if( xCompSupp.is()) + } return xSource; } // ----------------------------------------------------------------------------- // Clone() soll eine komplette Kopie des Objektes erzeugen. -SdrObject* OOle2Obj::Clone() const +OOle2Obj* OOle2Obj::Clone() const { - OOle2Obj* pObj = static_cast<OOle2Obj*>(SdrOle2Obj::Clone()); + OOle2Obj* pObj = CloneHelper< OOle2Obj >(); OReportModel* pRptModel = static_cast<OReportModel*>(GetModel()); svt::EmbeddedObjectRef::TryRunningState( pObj->GetObjRef() ); pObj->impl_createDataProvider_nothrow(pRptModel->getReportDefinition().get()); @@ -1193,7 +1187,7 @@ void OOle2Obj::impl_createDataProvider_nothrow(const uno::Reference< frame::XMod uno::Reference< lang::XMultiServiceFactory> xFac(_xModel,uno::UNO_QUERY); uno::Reference< chart2::data::XDatabaseDataProvider > xDataProvider( xFac->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataProvider"))),uno::UNO_QUERY); xReceiver->attachDataProvider( xDataProvider.get() ); - } // if( xReceiver.is() ) + } } catch(uno::Exception) { @@ -1273,3 +1267,5 @@ uno::Reference< style::XStyle> getUsedStyle(const uno::Reference< report::XRepor //============================================================================ } // rptui //============================================================================ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/RptObjectListener.cxx b/reportdesign/source/core/sdr/RptObjectListener.cxx index 2e6a7e37e8d1..e5fe0c9fbf31 100644 --- a/reportdesign/source/core/sdr/RptObjectListener.cxx +++ b/reportdesign/source/core/sdr/RptObjectListener.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,13 +56,6 @@ OObjectListener::~OObjectListener() void SAL_CALL OObjectListener::disposing( const ::com::sun::star::lang::EventObject& ) throw( ::com::sun::star::uno::RuntimeException) { - /* - // disconnect the listener - if (m_pObject) - { - (m_pObject->m_xPropertyChangeListener).clear(); - } - */ } // XPropertyChangeListener @@ -93,3 +87,5 @@ DlgEdHint::~DlgEdHint() } //---------------------------------------------------------------------------- } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx index 3273bb1ed5e1..2f2f6e17e1b1 100644 --- a/reportdesign/source/core/sdr/RptPage.cxx +++ b/reportdesign/source/core/sdr/RptPage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,7 +43,7 @@ TYPEINIT1( OReportPage, SdrPage ); DBG_NAME( rpt_OReportPage ) OReportPage::OReportPage( OReportModel& _rModel ,const uno::Reference< report::XSection >& _xSection - ,FASTBOOL bMasterPage ) + ,bool bMasterPage ) :SdrPage( _rModel, bMasterPage ) ,rModel(_rModel) ,m_xSection(_xSection) @@ -92,7 +93,7 @@ sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent { break; } - } // for (; i < nCount; ++i) + } return i; } //---------------------------------------------------------------------------- @@ -106,7 +107,7 @@ void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent OSL_ENSURE(pBase,"Why is this not a OObjectBase?"); if ( pBase ) pBase->EndListening(); - /*delete */RemoveObject(nPos); + RemoveObject(nPos); } } // ----------------------------------------------------------------------------- @@ -132,26 +133,11 @@ SdrObject* OReportPage::RemoveObject(sal_uLong nObjNum) return pObj; } //---------------------------------------------------------------------------- -//namespace -//{ -// ::rtl::OUString lcl_getControlName(const uno::Reference< lang::XServiceInfo >& _xServiceInfo) -// { -// if ( _xServiceInfo->supportsService( SERVICE_FIXEDTEXT )) -// return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FixedText")); -// if ( _xServiceInfo->supportsService( SERVICE_FORMATTEDFIELD )) -// return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FormattedField")); -// if ( _xServiceInfo->supportsService( SERVICE_IMAGECONTROL)) -// return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.DatabaseImageControl")); -// -// return ::rtl::OUString(); -// } -//} -//---------------------------------------------------------------------------- void OReportPage::insertObject(const uno::Reference< report::XReportComponent >& _xObject) { DBG_CHKTHIS( rpt_OReportPage,NULL); OSL_ENSURE(_xObject.is(),"Object is not valid to create a SdrObject!"); - if ( !_xObject.is() ) // || !m_pView ) + if ( !_xObject.is() ) return; sal_uLong nPos = getIndexOf(_xObject); if ( nPos < GetObjCount() ) @@ -186,7 +172,6 @@ void OReportPage::removeTempObject(SdrObject *_pToRemoveObj) SdrObject* pObject = RemoveObject(i); (void)pObject; break; - // delete pObject; } } } @@ -232,14 +217,6 @@ void OReportPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInse uno::Reference< drawing::XShape> xShape(pObj->getUnoShape(),uno::UNO_QUERY); pSection->notifyElementAdded(xShape); - //// check if we are a shape - //uno::Reference<beans::XPropertySet> xProp(xShape,uno::UNO_QUERY); - //if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID"))) ) - //{ - // // use MimeConfigurationHelper::GetStringClassIDRepresentation(MimeConfigurationHelper::GetSequenceClassID(SO3_SCH_OLE_EMBED_CLASSID_8)) - // xProp->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID")),uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("12dcae26-281f-416f-a234-c3086127382e")))); - //} - // now that the shape is inserted into its structures, we can allow the OObjectBase // to release the reference to it OObjectBase* pObjectBase = dynamic_cast< OObjectBase* >( pObj ); @@ -250,3 +227,5 @@ void OReportPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInse //============================================================================ } // rptui //============================================================================ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx index 24ce8a9e1710..9c7895d6d708 100644 --- a/reportdesign/source/core/sdr/UndoActions.cxx +++ b/reportdesign/source/core/sdr/UndoActions.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,7 +55,7 @@ #include <vcl/svapp.hxx> #include <dbaccess/dbsubcomponentcontroller.hxx> #include <svx/unoshape.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> namespace rptui { @@ -223,13 +224,13 @@ void OUndoContainerAction::Undo() implReInsert(); break; default: - OSL_ENSURE(0,"Illegal case value"); + OSL_FAIL("Illegal case value"); break; } } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OUndoContainerAction::Undo: caught an exception!" ); + OSL_FAIL( "OUndoContainerAction::Undo: caught an exception!" ); } } } @@ -251,13 +252,13 @@ void OUndoContainerAction::Redo() implReRemove(); break; default: - OSL_ENSURE(0,"Illegal case value"); + OSL_FAIL("Illegal case value"); break; } } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OUndoContainerAction::Redo: caught an exception!" ); + OSL_FAIL( "OUndoContainerAction::Redo: caught an exception!" ); } } } @@ -396,7 +397,7 @@ void ORptUndoPropertyAction::setProperty(sal_Bool _bOld) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "ORptUndoPropertyAction::Redo: caught an exception!" ); + OSL_FAIL( "ORptUndoPropertyAction::Redo: caught an exception!" ); } } } @@ -447,3 +448,4 @@ Reference< XPropertySet> OUndoPropertyReportSectionAction::getObject() } // rptui //============================================================================ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index 8dcec22290ed..53865e4da086 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,7 +57,7 @@ #include <vcl/svapp.hxx> #include <dbaccess/dbsubcomponentcontroller.hxx> #include <svx/unoshape.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> namespace rptui { @@ -87,7 +88,7 @@ struct PropertyInfo } }; -typedef ::std::hash_map< ::rtl::OUString, PropertyInfo, ::rtl::OUStringHash > PropertiesInfo; +typedef ::boost::unordered_map< ::rtl::OUString, PropertyInfo, ::rtl::OUStringHash > PropertiesInfo; struct ObjectInfo { @@ -244,8 +245,6 @@ void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e) throw( RuntimeE RemoveSection(xSection); else RemoveElement(xSourceSet); - /*if (!m_pImpl->m_aPropertySetCache.empty()) - m_pImpl->m_aPropertySetCache.erase(xSourceSet);*/ } } @@ -253,6 +252,7 @@ void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e) throw( RuntimeE //------------------------------------------------------------------------------ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEvent ) throw(uno::RuntimeException) { + ::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex ); if ( IsLocked() ) @@ -358,7 +358,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv // TODO: this is a potential race condition: two threads here could in theory // add their undo actions out-of-order - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ORptUndoPropertyAction* pUndo = NULL; try { @@ -403,7 +403,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv //------------------------------------------------------------------------------ void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) throw(uno::RuntimeException) { - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_pImpl->m_aMutex ); // neues Object zum lauschen @@ -454,14 +454,13 @@ void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) thro //------------------------------------------------------------------------------ void OXUndoEnvironment::implSetModified() { - //if ( !IsLocked() ) m_pImpl->m_rModel.SetModified( sal_True ); } //------------------------------------------------------------------------------ void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt) throw(uno::RuntimeException) { - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_pImpl->m_aMutex ); Reference< XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY); @@ -477,7 +476,7 @@ void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt) thro //------------------------------------------------------------------------------ void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw(uno::RuntimeException) { - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_pImpl->m_aMutex ); Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY ); @@ -608,7 +607,6 @@ void OXUndoEnvironment::switchListening( const Reference< XIndexAccess >& _rxCon // be notified of any changes in the container elements Reference< XContainer > xSimpleContainer( _rxContainer, UNO_QUERY ); - // OSL_ENSURE( xSimpleContainer.is(), "OXUndoEnvironment::switchListening: how are we expected to be notified of changes in the container?" ); if ( xSimpleContainer.is() ) { if ( _bStartListening ) @@ -653,7 +651,6 @@ void OXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObjec } catch( const Exception& ) { - //OSL_ENSURE( sal_False, "OXUndoEnvironment::switchListening: caught an exception!" ); } } @@ -696,3 +693,5 @@ sal_Bool OXUndoEnvironment::IsUndoMode() const //============================================================================ } // rptui //============================================================================ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx index f5fba8129d54..9dd4730c81ff 100644 --- a/reportdesign/source/core/sdr/formatnormalizer.cxx +++ b/reportdesign/source/core/sdr/formatnormalizer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -126,9 +127,9 @@ namespace rptui //-------------------------------------------------------------------- void FormatNormalizer::impl_onDefinitionPropertyChange( const ::rtl::OUString& _rChangedPropName ) { - if ( !_rChangedPropName.equalsAscii( "Command" ) - && !_rChangedPropName.equalsAscii( "CommandType" ) - && !_rChangedPropName.equalsAscii( "EscapeProcessing" ) + if ( !_rChangedPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Command" ) ) + && !_rChangedPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CommandType" ) ) + && !_rChangedPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EscapeProcessing" ) ) ) // nothing we're interested in return; @@ -138,7 +139,7 @@ namespace rptui //-------------------------------------------------------------------- void FormatNormalizer::impl_onFormattedProperttyChange( const Reference< XFormattedField >& _rxFormatted, const ::rtl::OUString& _rChangedPropName ) { - if ( !_rChangedPropName.equalsAscii( "DataField" ) ) + if ( !_rChangedPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DataField" ) ) ) // nothing we're interested in return; @@ -246,7 +247,7 @@ namespace rptui if ( sDataField.getStr()[ sDataField.getLength() - 1 ] != ']' ) { // last character is not the closing brace - OSL_ENSURE( false, "FormatNormalizer::impl_adjustFormatToDataFieldType_nothrow: suspicious data field value!" ); + OSL_FAIL( "FormatNormalizer::impl_adjustFormatToDataFieldType_nothrow: suspicious data field value!" ); return; } sDataField = sDataField.copy( sFieldPrefix.getLength(), sDataField.getLength() - sFieldPrefix.getLength() - 1 ); @@ -277,3 +278,5 @@ namespace rptui //........................................................................ } // namespace rptui //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/formatnormalizer.hxx b/reportdesign/source/core/sdr/formatnormalizer.hxx index 8577d276d4c8..a3974f8e9103 100644 --- a/reportdesign/source/core/sdr/formatnormalizer.hxx +++ b/reportdesign/source/core/sdr/formatnormalizer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,3 +93,5 @@ namespace rptui //........................................................................ #endif // REPORTDESIGN_FORMATNORMALIZER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |