diff options
Diffstat (limited to 'reportdesign/source')
73 files changed, 977 insertions, 866 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index e4eee6730..996263447 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -25,18 +25,66 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ + #include "ReportDefinition.hxx" + +#include "FixedLine.hxx" +#include "FixedText.hxx" +#include "FormattedField.hxx" +#include "Functions.hxx" +#include "Groups.hxx" +#include "ImageControl.hxx" +#include "ReportComponent.hxx" +#include "ReportHelperImpl.hxx" +#include "RptDef.hxx" +#include "RptModel.hxx" +#include "Section.hxx" +#include "Shape.hxx" +#include "Tools.hxx" +#include "UndoEnv.hxx" +#include "core_resource.hrc" +#include "core_resource.hxx" +#include "corestrings.hrc" + +/** === begin UNO includes === **/ #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/beans/XMultiPropertyStates.hpp> +#include <com/sun/star/chart2/data/DatabaseDataProvider.hpp> +#include <com/sun/star/document/EventObject.hpp> +#include <com/sun/star/document/XEventListener.hpp> +#include <com/sun/star/document/XExporter.hpp> +#include <com/sun/star/document/XFilter.hpp> +#include <com/sun/star/document/XImporter.hpp> +#include <com/sun/star/embed/Aspects.hpp> +#include <com/sun/star/embed/ElementModes.hpp> +#include <com/sun/star/embed/EmbedMapUnits.hpp> +#include <com/sun/star/embed/EntryInitModes.hpp> +#include <com/sun/star/embed/XEmbedPersist.hpp> +#include <com/sun/star/embed/XTransactedObject.hpp> +#include <com/sun/star/frame/FrameSearchFlag.hpp> +#include <com/sun/star/frame/XComponentLoader.hpp> +#include <com/sun/star/io/XActiveDataSource.hpp> +#include <com/sun/star/io/XSeekable.hpp> +#include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/report/GroupKeepTogether.hpp> #include <com/sun/star/report/ReportPrintOption.hpp> #include <com/sun/star/report/XFunction.hpp> #include <com/sun/star/sdb/CommandType.hpp> +#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp> +#include <com/sun/star/style/GraphicLocation.hpp> +#include <com/sun/star/style/NumberingType.hpp> +#include <com/sun/star/style/PageStyleLayout.hpp> +#include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/table/BorderLine.hpp> #include <com/sun/star/table/ShadowFormat.hpp> -#include <com/sun/star/style/PageStyleLayout.hpp> -#include <com/sun/star/style/GraphicLocation.hpp> +#include <com/sun/star/task/ErrorCodeIOException.hpp> +#include <com/sun/star/task/XStatusIndicator.hpp> +#include <com/sun/star/task/XStatusIndicatorFactory.hpp> +#include <com/sun/star/ui/XUIConfigurationStorage.hpp> #include <com/sun/star/xml/AttributeData.hpp> -#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <com/sun/star/xml/sax/XDocumentHandler.hpp> +/** === end UNO includes === **/ + #include <comphelper/broadcasthelper.hxx> #include <comphelper/documentconstants.hxx> #include <comphelper/genericpropertyset.hxx> @@ -45,83 +93,41 @@ #include <comphelper/namecontainer.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/numberedcollection.hxx> -#include <comphelper/propertystatecontainer.hxx> #include <comphelper/proparrhlp.hxx> #include <comphelper/property.hxx> #include <comphelper/propertysetinfo.hxx> -#include <comphelper/sequence.hxx> +#include <comphelper/propertystatecontainer.hxx> #include <comphelper/seqstream.hxx> +#include <comphelper/sequence.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/uno3.hxx> -#include <com/sun/star/chart2/data/DatabaseDataProvider.hpp> -#include <vcl/svapp.hxx> -#include <vcl/virdev.hxx> -#include <osl/mutex.hxx> -#include <com/sun/star/beans/XMultiPropertyStates.hpp> -#include <com/sun/star/document/EventObject.hpp> -#include <com/sun/star/document/XEventListener.hpp> -#include <com/sun/star/style/XStyle.hpp> -#include <com/sun/star/embed/XTransactedObject.hpp> -#include <com/sun/star/embed/ElementModes.hpp> -#include <com/sun/star/embed/EmbedMapUnits.hpp> -#include <com/sun/star/embed/EntryInitModes.hpp> -#include <com/sun/star/embed/Aspects.hpp> -#include <com/sun/star/io/XActiveDataSource.hpp> -#include <com/sun/star/embed/ElementModes.hpp> -#include <com/sun/star/io/XSeekable.hpp> -#include <com/sun/star/embed/XEmbedPersist.hpp> -#include <com/sun/star/task/XStatusIndicator.hpp> -#include <com/sun/star/task/XStatusIndicatorFactory.hpp> -#include <com/sun/star/ui/XUIConfigurationStorage.hpp> -#include <com/sun/star/document/XExporter.hpp> -#include <com/sun/star/document/XImporter.hpp> -#include <com/sun/star/document/XFilter.hpp> -#include <com/sun/star/task/ErrorCodeIOException.hpp> -#include <com/sun/star/xml/sax/XDocumentHandler.hpp> -#include <com/sun/star/frame/XComponentLoader.hpp> -#include <com/sun/star/frame/FrameSearchFlag.hpp> -#include "corestrings.hrc" -#include "Groups.hxx" -#include "RptDef.hxx" -#include "Section.hxx" -#include "FixedLine.hxx" -#include "core_resource.hrc" -#include "core_resource.hxx" -#include "Tools.hxx" -#include <tools/debug.hxx> -#include <tools/diagnose_ex.h> -#include <unotools/streamwrap.hxx> #include <connectivity/CommonTools.hxx> #include <connectivity/dbconversion.hxx> -#include <framework/titlehelper.hxx> #include <connectivity/dbtools.hxx> -#include <com/sun/star/task/XStatusIndicator.hpp> -#include "Functions.hxx" -#include <boost/mem_fn.hpp> -#include <boost/bind.hpp> -#include <boost/utility.hpp> -#include <unotools/saveopt.hxx> -#include "RptModel.hxx" -#include "UndoEnv.hxx" -#include "FormattedField.hxx" -#include "FixedText.hxx" -#include "ImageControl.hxx" -#include "Shape.hxx" -#include "ReportHelperImpl.hxx" -#include <svl/itempool.hxx> -#include <unotools/moduleoptions.hxx> -#include <osl/thread.hxx> - +#include <cppuhelper/exc_hlp.hxx> +#include <cppuhelper/interfacecontainer.h> +#include <dbaccess/dbaundomanager.hxx> #include <editeng/paperinf.hxx> +#include <framework/titlehelper.hxx> +#include <osl/thread.hxx> +#include <svl/itempool.hxx> +#include <svl/undo.hxx> #include <svx/svdlayer.hxx> +#include <svx/unofill.hxx> #include <svx/xmleohlp.hxx> #include <svx/xmlgrhlp.hxx> -#include <svx/unofill.hxx> -#include <cppuhelper/interfacecontainer.h> -#include <cppuhelper/exc_hlp.hxx> -#include "ReportComponent.hxx" -#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp> -#include <com/sun/star/style/NumberingType.hpp> +#include <tools/debug.hxx> +#include <tools/diagnose_ex.h> +#include <unotools/moduleoptions.hxx> +#include <unotools/saveopt.hxx> +#include <unotools/streamwrap.hxx> +#include <vcl/svapp.hxx> +#include <vcl/virdev.hxx> +#include <vos/mutex.hxx> + +#include <boost/bind.hpp> +#include <boost/mem_fn.hpp> +#include <boost/utility.hpp> #define MAP_LEN(x) x, sizeof(x) - 1 #define MAP_CHAR_LEN(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(x)) @@ -586,6 +592,7 @@ struct OReportDefinitionImpl ::boost::shared_ptr< ::comphelper::EmbeddedObjectContainer> m_pObjectContainer; ::boost::shared_ptr<rptui::OReportModel> m_pReportModel; + ::rtl::Reference< ::dbaui::UndoManager > m_pUndoManager; ::rtl::OUString m_sCaption; ::rtl::OUString m_sCommand; ::rtl::OUString m_sFilter; @@ -602,6 +609,7 @@ struct OReportDefinitionImpl sal_Bool m_bModified; sal_Bool m_bEscapeProcessing; sal_Bool m_bSetModifiedEnabled; + OReportDefinitionImpl(::osl::Mutex& _aMutex) :m_aStorageChangeListeners(_aMutex) ,m_aCloseListener(_aMutex) @@ -753,6 +761,9 @@ void OReportDefinition::init() rAdmin.NewLayer(UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "back" ) ), RPT_LAYER_BACK ); rAdmin.NewLayer( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), RPT_LAYER_HIDDEN ); + m_pImpl->m_pUndoManager = new ::dbaui::UndoManager( *this, m_aMutex ); + m_pImpl->m_pReportModel->SetSdrUndoManager( &m_pImpl->m_pUndoManager->GetSfxUndoManager() ); + m_pImpl->m_xFunctions = new OFunctions(this,m_aProps->m_xContext); if ( !m_pImpl->m_xStorage.is() ) m_pImpl->m_xStorage = ::comphelper::OStorageHelper::GetTemporaryStorage(); @@ -767,9 +778,9 @@ void OReportDefinition::init() } m_pImpl->m_pObjectContainer.reset( new comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) ) ); } - catch(uno::Exception) + catch ( const uno::Exception& ) { - OSL_ENSURE(0,"Error!"); + DBG_UNHANDLED_EXCEPTION(); } } // ----------------------------------------------------------------------------- @@ -1269,10 +1280,21 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); + ::connectivity::checkDisposed( ReportDefinitionBase::rBHelper.bDisposed ); ::comphelper::MediaDescriptor aDescriptor( _aArguments ); - fillArgs(aDescriptor); - m_pImpl->m_pReportModel->SetModified(sal_False); + + m_pImpl->m_pUndoManager->GetSfxUndoManager().EnableUndo( false ); + try + { + fillArgs(aDescriptor); + m_pImpl->m_pReportModel->SetModified(sal_False); + } + catch ( ... ) + { + m_pImpl->m_pUndoManager->GetSfxUndoManager().EnableUndo( true ); + throw; + } + m_pImpl->m_pUndoManager->GetSfxUndoManager().EnableUndo( true ); return sal_True; } // ----------------------------------------------------------------------------- @@ -1811,7 +1833,6 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue else if ( sURL.getLength() ) aStorageSource <<= sURL; else - // TODO: error message throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No input source (URL or InputStream) found." ) ), // TODO: resource @@ -2890,8 +2911,15 @@ uno::Sequence< datatransfer::DataFlavor > SAL_CALL OReportDefinition::getTransfe { return aFlavor.MimeType.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/png"))); } + // ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- +uno::Reference< document::XUndoManager > SAL_CALL OReportDefinition::getUndoManager( ) throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + return m_pImpl->m_pUndoManager.get(); +} + + // ============================================================================= }// namespace reportdesign // ============================================================================= diff --git a/reportdesign/source/core/api/services.cxx b/reportdesign/source/core/api/services.cxx index 9c500fa9c..21375491f 100644 --- a/reportdesign/source/core/api/services.cxx +++ b/reportdesign/source/core/api/services.cxx @@ -91,12 +91,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} } // extern "C" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index 3126c350f..56bea8822 100644 --- a/reportdesign/source/core/sdr/ReportDrawPage.cxx +++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx @@ -119,7 +119,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb /************************************************** * Das leere OLE-Objekt bekommt ein neues IPObj **************************************************/ - pObj->SetEmptyPresObj(FALSE); + pObj->SetEmptyPresObj(sal_False); pOle2Obj->SetOutlinerParaObject(NULL); pOle2Obj->SetObjRef(xObj); pOle2Obj->SetPersistName(sName); diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx index 2c7794830..ffa20516b 100644 --- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx +++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx @@ -34,7 +34,7 @@ namespace rptui { using namespace ::com::sun::star; // ----------------------------------------------------------------------------- -SdrUndoAction* lcl_createUndo(SdrObject& rObject,Action _eAction,USHORT _nCommentId) +SdrUndoAction* lcl_createUndo(SdrObject& rObject,Action _eAction,sal_uInt16 _nCommentId) { OObjectBase* pObj = dynamic_cast<OObjectBase*>(&rObject); if ( !pObj ) @@ -80,12 +80,12 @@ SdrUndoAction* OReportUndoFactory::CreateUndoGeoObject( SdrObject& rObject ) SdrUndoAction* OReportUndoFactory::CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText ) { - return m_pUndoFactory->CreateUndoAttrObject( rObject, bStyleSheet1 ? TRUE : FALSE, bSaveText ? TRUE : FALSE ); + return m_pUndoFactory->CreateUndoAttrObject( rObject, bStyleSheet1 ? sal_True : sal_False, bSaveText ? sal_True : sal_False ); } SdrUndoAction* OReportUndoFactory::CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect ) { - return m_pUndoFactory->CreateUndoRemoveObject( rObject, bOrdNumDirect ? TRUE : FALSE ); + return m_pUndoFactory->CreateUndoRemoveObject( rObject, bOrdNumDirect ? sal_True : sal_False ); } SdrUndoAction* OReportUndoFactory::CreateUndoInsertObject( SdrObject& rObject, bool /*bOrdNumDirect*/ ) @@ -105,7 +105,7 @@ SdrUndoAction* OReportUndoFactory::CreateUndoNewObject( SdrObject& rObject, bool SdrUndoAction* OReportUndoFactory::CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect ) { - return m_pUndoFactory->CreateUndoCopyObject( rObject, bOrdNumDirect ? TRUE : FALSE ); + return m_pUndoFactory->CreateUndoCopyObject( rObject, bOrdNumDirect ? sal_True : sal_False ); } SdrUndoAction* OReportUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1) @@ -115,7 +115,7 @@ SdrUndoAction* OReportUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, s SdrUndoAction* OReportUndoFactory::CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect ) { - return m_pUndoFactory->CreateUndoReplaceObject( rOldObject, rNewObject, bOrdNumDirect ? TRUE : FALSE ); + return m_pUndoFactory->CreateUndoReplaceObject( rOldObject, rNewObject, bOrdNumDirect ? sal_True : sal_False ); } SdrUndoAction* OReportUndoFactory::CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer ) diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx index 3be333a6c..7fa1ba155 100644 --- a/reportdesign/source/core/sdr/RptModel.cxx +++ b/reportdesign/source/core/sdr/RptModel.cxx @@ -29,7 +29,7 @@ #include "RptModel.hxx" #include "RptPage.hxx" -#include <dbaccess/singledoccontroller.hxx> +#include <dbaccess/dbsubcomponentcontroller.hxx> #include <tools/debug.hxx> #include <unotools/pathoptions.hxx> @@ -124,7 +124,7 @@ void OReportModel::SetModified(sal_Bool _bModified) m_pController->setModified(_bModified); } // ----------------------------------------------------------------------------- -SdrPage* OReportModel::RemovePage(USHORT nPgNum) +SdrPage* OReportModel::RemovePage(sal_uInt16 nPgNum) { OReportPage* pPage = dynamic_cast<OReportPage*>(SdrModel::RemovePage(nPgNum)); return pPage; @@ -141,8 +141,8 @@ OReportPage* OReportModel::createNewPage(const uno::Reference< report::XSection OReportPage* OReportModel::getPage(const uno::Reference< report::XSection >& _xSection) { OReportPage* pPage = NULL; - USHORT nCount = GetPageCount(); - for (USHORT i = 0; i < nCount && !pPage ; ++i) + sal_uInt16 nCount = GetPageCount(); + for (sal_uInt16 i = 0; i < nCount && !pPage ; ++i) { OReportPage* pRptPage = PTR_CAST( OReportPage, GetPage(i) ); if ( pRptPage && pRptPage->getSection() == _xSection ) diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index 363a52ca7..cdc073d75 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -38,7 +38,7 @@ #include <toolkit/helper/convert.hxx> #include "RptPage.hxx" #include "corestrings.hrc" -#include <dbaccess/singledoccontroller.hxx> +#include <dbaccess/dbsubcomponentcontroller.hxx> #include "ModuleHelper.hxx" #include <RptResId.hrc> @@ -508,12 +508,12 @@ OCustomShape::~OCustomShape() DBG_DTOR( rpt_OCustomShape, NULL); } // ----------------------------------------------------------------------------- -UINT16 OCustomShape::GetObjIdentifier() const +sal_uInt16 OCustomShape::GetObjIdentifier() const { - return UINT16(OBJ_CUSTOMSHAPE); + return sal_uInt16(OBJ_CUSTOMSHAPE); } //---------------------------------------------------------------------------- -UINT32 OCustomShape::GetObjInventor() const +sal_uInt32 OCustomShape::GetObjInventor() const { return ReportInventor; } @@ -691,12 +691,12 @@ void OUnoObject::impl_setReportComponent_nothrow() impl_initializeModel_nothrow(); } // ----------------------------------------------------------------------------- -UINT16 OUnoObject::GetObjIdentifier() const +sal_uInt16 OUnoObject::GetObjIdentifier() const { - return UINT16(m_nObjectType); + return sal_uInt16(m_nObjectType); } //---------------------------------------------------------------------------- -UINT32 OUnoObject::GetObjInventor() const +sal_uInt32 OUnoObject::GetObjInventor() const { return ReportInventor; } @@ -959,7 +959,7 @@ SdrObject* OUnoObject::Clone() const //---------------------------------------------------------------------------- TYPEINIT1(OOle2Obj, SdrOle2Obj); DBG_NAME( rpt_OOle2Obj ); -OOle2Obj::OOle2Obj(const uno::Reference< report::XReportComponent>& _xComponent,UINT16 _nType) +OOle2Obj::OOle2Obj(const uno::Reference< report::XReportComponent>& _xComponent,sal_uInt16 _nType) :SdrOle2Obj() ,OObjectBase(_xComponent) ,m_nType(_nType) @@ -971,7 +971,7 @@ OOle2Obj::OOle2Obj(const uno::Reference< report::XReportComponent>& _xComponent, m_bIsListening = sal_True; } //---------------------------------------------------------------------------- -OOle2Obj::OOle2Obj(const ::rtl::OUString& _sComponentName,UINT16 _nType) +OOle2Obj::OOle2Obj(const ::rtl::OUString& _sComponentName,sal_uInt16 _nType) :SdrOle2Obj() ,OObjectBase(_sComponentName) ,m_nType(_nType) @@ -986,12 +986,12 @@ OOle2Obj::~OOle2Obj() DBG_DTOR( rpt_OOle2Obj, NULL); } // ----------------------------------------------------------------------------- -UINT16 OOle2Obj::GetObjIdentifier() const +sal_uInt16 OOle2Obj::GetObjIdentifier() const { return m_nType; } //---------------------------------------------------------------------------- -UINT32 OOle2Obj::GetObjInventor() const +sal_uInt32 OOle2Obj::GetObjInventor() const { return ReportInventor; } diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx index d171dd2e9..02747267f 100644 --- a/reportdesign/source/core/sdr/RptPage.cxx +++ b/reportdesign/source/core/sdr/RptPage.cxx @@ -79,11 +79,11 @@ SdrPage* OReportPage::Clone() const } //---------------------------------------------------------------------------- -ULONG OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >& _xObject) +sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >& _xObject) { DBG_CHKTHIS( rpt_OReportPage,NULL); - ULONG nCount = GetObjCount(); - ULONG i = 0; + sal_uLong nCount = GetObjCount(); + sal_uLong i = 0; for (; i < nCount; ++i) { OObjectBase* pObj = dynamic_cast<OObjectBase*>(GetObj(i)); @@ -99,7 +99,7 @@ ULONG OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >& void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent >& _xObject) { DBG_CHKTHIS( rpt_OReportPage,NULL); - ULONG nPos = getIndexOf(_xObject); + sal_uLong nPos = getIndexOf(_xObject); if ( nPos < GetObjCount() ) { OObjectBase* pBase = dynamic_cast<OObjectBase*>(GetObj(nPos)); @@ -110,7 +110,7 @@ void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent } } // ----------------------------------------------------------------------------- -SdrObject* OReportPage::RemoveObject(ULONG nObjNum) +SdrObject* OReportPage::RemoveObject(sal_uLong nObjNum) { SdrObject* pObj = SdrPage::RemoveObject(nObjNum); if (getSpecialMode()) @@ -138,7 +138,7 @@ void OReportPage::insertObject(const uno::Reference< report::XReportComponent >& OSL_ENSURE(_xObject.is(),"Object is not valid to create a SdrObject!"); if ( !_xObject.is() ) return; - ULONG nPos = getIndexOf(_xObject); + sal_uLong nPos = getIndexOf(_xObject); if ( nPos < GetObjCount() ) return; // Object already in list @@ -163,7 +163,7 @@ void OReportPage::removeTempObject(SdrObject *_pToRemoveObj) { if (_pToRemoveObj) { - for (ULONG i=0;i<GetObjCount();i++) + for (sal_uLong i=0;i<GetObjCount();i++) { SdrObject *aObj = GetObj(i); if (aObj && aObj == _pToRemoveObj) @@ -192,7 +192,7 @@ void OReportPage::resetSpecialMode() m_bSpecialInsertMode = false; } // ----------------------------------------------------------------------------- -void OReportPage::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason) +void OReportPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason) { SdrPage::NbcInsertObject(pObj, nPos, pReason); diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx index 5e043b49b..d14d1197c 100644 --- a/reportdesign/source/core/sdr/UndoActions.cxx +++ b/reportdesign/source/core/sdr/UndoActions.cxx @@ -53,7 +53,7 @@ #include <tools/diagnose_ex.h> #include <comphelper/stl_types.hxx> #include <vcl/svapp.hxx> -#include <dbaccess/singledoccontroller.hxx> +#include <dbaccess/dbsubcomponentcontroller.hxx> #include <svx/unoshape.hxx> #include <osl/mutex.hxx> @@ -97,7 +97,7 @@ namespace rptui TYPEINIT1( OCommentUndoAction, SdrUndoAction ); DBG_NAME(rpt_OCommentUndoAction) //---------------------------------------------------------------------------- -OCommentUndoAction::OCommentUndoAction(SdrModel& _rMod,USHORT nCommentID) +OCommentUndoAction::OCommentUndoAction(SdrModel& _rMod,sal_uInt16 nCommentID) :SdrUndoAction(_rMod) { DBG_CTOR(rpt_OCommentUndoAction,NULL); @@ -123,7 +123,7 @@ OUndoContainerAction::OUndoContainerAction(SdrModel& _rMod ,Action _eAction ,const uno::Reference< container::XIndexContainer > _xContainer ,const Reference< XInterface > & xElem - ,USHORT _nCommentId) + ,sal_uInt16 _nCommentId) :OCommentUndoAction(_rMod,_nCommentId) ,m_xElement(xElem) ,m_xContainer(_xContainer) @@ -269,7 +269,7 @@ OUndoGroupSectionAction::OUndoGroupSectionAction(SdrModel& _rMod ,OGroupHelper> _pMemberFunction ,const uno::Reference< report::XGroup >& _xGroup ,const Reference< XInterface > & xElem - ,USHORT _nCommentId) + ,sal_uInt16 _nCommentId) :OUndoContainerAction(_rMod,_eAction,NULL,xElem,_nCommentId) ,m_aGroupHelper(_xGroup) ,m_pMemberFunction(_pMemberFunction) @@ -315,7 +315,7 @@ OUndoReportSectionAction::OUndoReportSectionAction(SdrModel& _rMod ,OReportHelper> _pMemberFunction ,const uno::Reference< report::XReportDefinition >& _xReport ,const Reference< XInterface > & xElem - ,USHORT _nCommentId) + ,sal_uInt16 _nCommentId) :OUndoContainerAction(_rMod,_eAction,NULL,xElem,_nCommentId) ,m_aReportHelper(_xReport) ,m_pMemberFunction(_pMemberFunction) diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index 44a2ef845..51917c3d1 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -45,14 +45,17 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <com/sun/star/beans/XIntrospectionAccess.hpp> +#include <com/sun/star/beans/XIntrospection.hpp> /** === end UNO includes === **/ #include <connectivity/dbtools.hxx> #include <svl/smplhint.hxx> #include <tools/diagnose_ex.h> #include <comphelper/stl_types.hxx> +#include <comphelper/componentcontext.hxx> #include <vcl/svapp.hxx> -#include <dbaccess/singledoccontroller.hxx> +#include <dbaccess/dbsubcomponentcontroller.hxx> #include <svx/unoshape.hxx> #include <osl/mutex.hxx> @@ -70,8 +73,36 @@ namespace rptui //---------------------------------------------------------------------------- -DECLARE_STL_USTRINGACCESS_MAP(bool, AllProperties); -DECLARE_STL_STDKEY_MAP(uno::Reference< beans::XPropertySet >, AllProperties, PropertySetInfoCache); +struct PropertyInfo +{ + bool bIsReadonlyOrTransient; + + PropertyInfo() + :bIsReadonlyOrTransient( false ) + { + } + + PropertyInfo( const bool i_bIsTransientOrReadOnly ) + :bIsReadonlyOrTransient( i_bIsTransientOrReadOnly ) + { + } +}; + +typedef ::std::hash_map< ::rtl::OUString, PropertyInfo, ::rtl::OUStringHash > PropertiesInfo; + +struct ObjectInfo +{ + PropertiesInfo aProperties; + Reference< XPropertySet > xPropertyIntrospection; + + ObjectInfo() + :aProperties() + ,xPropertyIntrospection() + { + } +}; + +typedef ::std::map< Reference< XPropertySet >, ObjectInfo, ::comphelper::OInterfaceCompare< XPropertySet > > PropertySetInfoCache; // ----------------------------------------------------------------------------- @@ -86,6 +117,7 @@ public: ConditionUpdater m_aConditionUpdater; ::osl::Mutex m_aMutex; ::std::vector< uno::Reference< container::XChild> > m_aSections; + Reference< XIntrospection > m_xIntrospection; oslInterlockedCount m_nLocks; sal_Bool m_bReadOnly; sal_Bool m_bIsUndo; @@ -155,7 +187,7 @@ void OXUndoEnvironment::Clear(const Accessor& /*_r*/) { uno::Reference<beans::XPropertySet> xProp(aIter->first,uno::UNO_QUERY); xProp->getPropertySetInfo(); - int nlen = aIter->second.size(); + int nlen = aIter->second.aProperties.size(); nlen = nlen; } #endif @@ -230,7 +262,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv if (!xSet.is()) return; - dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController(); + dbaui::DBSubComponentController* pController = m_pImpl->m_rModel.getController(); if ( !pController ) return; @@ -240,29 +272,73 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv int nlen = m_pImpl->m_aPropertySetCache.size(); nlen = nlen; #endif - PropertySetInfoCache::iterator aSetPos = m_pImpl->m_aPropertySetCache.find(xSet); - if (aSetPos == m_pImpl->m_aPropertySetCache.end()) + PropertySetInfoCache::iterator objectPos = m_pImpl->m_aPropertySetCache.find(xSet); + if (objectPos == m_pImpl->m_aPropertySetCache.end()) { - AllProperties aNewEntry; - aSetPos = m_pImpl->m_aPropertySetCache.insert(PropertySetInfoCache::value_type(xSet,aNewEntry)).first; - OSL_ENSURE(aSetPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); + objectPos = m_pImpl->m_aPropertySetCache.insert( PropertySetInfoCache::value_type( + xSet, ObjectInfo() + ) ).first; + DBG_ASSERT(objectPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); } - if ( aSetPos == m_pImpl->m_aPropertySetCache.end() ) + if ( objectPos == m_pImpl->m_aPropertySetCache.end() ) return; // now we have access to the cached info about the set // let's see what we know about the property - AllProperties& rPropInfos = aSetPos->second; - AllPropertiesIterator aPropertyPos = rPropInfos.find( _rEvent.PropertyName ); - if (aPropertyPos == rPropInfos.end()) + ObjectInfo& rObjectInfo = objectPos->second; + PropertiesInfo::iterator aPropertyPos = rObjectInfo.aProperties.find( _rEvent.PropertyName ); + if ( aPropertyPos == rObjectInfo.aProperties.end() ) { // nothing 'til now ... have to change this .... // the attributes - INT32 nAttributes = xSet->getPropertySetInfo()->getPropertyByName( _rEvent.PropertyName ).Attributes; - bool bTransReadOnly = ((nAttributes & PropertyAttribute::READONLY) != 0) || ((nAttributes & PropertyAttribute::TRANSIENT) != 0); + Reference< XPropertySetInfo > xPSI( xSet->getPropertySetInfo(), UNO_SET_THROW ); + sal_Int32 nPropertyAttributes = 0; + try + { + if ( xPSI->hasPropertyByName( _rEvent.PropertyName ) ) + { + nPropertyAttributes = xPSI->getPropertyByName( _rEvent.PropertyName ).Attributes; + } + else + { + // it's perfectly valid for a component to notify a change in a property which it doesn't have - as long + // as it has an attribute with this name + if ( !rObjectInfo.xPropertyIntrospection.is() ) + { + if ( !m_pImpl->m_xIntrospection.is() ) + { + ::comphelper::ComponentContext aContext( m_pImpl->m_rModel.getController()->getORB() ); + OSL_VERIFY( aContext.createComponent( "com.sun.star.beans.Introspection", m_pImpl->m_xIntrospection ) ); + } + if ( m_pImpl->m_xIntrospection.is() ) + { + Reference< XIntrospectionAccess > xIntrospection( + m_pImpl->m_xIntrospection->inspect( makeAny( _rEvent.Source ) ), + UNO_SET_THROW + ); + rObjectInfo.xPropertyIntrospection.set( xIntrospection->queryAdapter( XPropertySet::static_type() ), UNO_QUERY_THROW ); + } + } + if ( rObjectInfo.xPropertyIntrospection.is() ) + { + xPSI.set( rObjectInfo.xPropertyIntrospection->getPropertySetInfo(), UNO_SET_THROW ); + nPropertyAttributes = xPSI->getPropertyByName( _rEvent.PropertyName ).Attributes; + } + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + const bool bTransReadOnly = + ( ( nPropertyAttributes & PropertyAttribute::READONLY ) != 0 ) + || ( ( nPropertyAttributes & PropertyAttribute::TRANSIENT ) != 0 ); // insert the new entry - aPropertyPos = rPropInfos.insert( AllProperties::value_type( _rEvent.PropertyName, bTransReadOnly ) ).first; - OSL_ENSURE(aPropertyPos != rPropInfos.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); + aPropertyPos = rObjectInfo.aProperties.insert( PropertiesInfo::value_type( + _rEvent.PropertyName, + PropertyInfo( bTransReadOnly ) + ) ).first; + DBG_ASSERT(aPropertyPos != rObjectInfo.aProperties.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); } implSetModified(); @@ -271,7 +347,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv // and are able to decide wether or not we need an undo action // no UNDO for transient/readonly properties - if ( aPropertyPos->second ) + if ( aPropertyPos->second.bIsReadonlyOrTransient ) return; // give components with sub responsibilities a chance @@ -304,7 +380,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv if ( pUndo == NULL ) pUndo = new ORptUndoPropertyAction( m_pImpl->m_rModel, _rEvent ); - pController->addUndoActionAndInvalidate(pUndo); + m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( pUndo ); pController->InvalidateAll(); } // ----------------------------------------------------------------------------- @@ -363,12 +439,9 @@ void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) thro uno::Reference< report::XFunctions> xContainer(evt.Source,uno::UNO_QUERY); if ( xContainer.is() ) { - dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController(); - pController->addUndoActionAndInvalidate(new OUndoContainerAction(m_pImpl->m_rModel - ,rptui::Inserted - ,xContainer.get() - ,xIface - ,RID_STR_UNDO_ADDFUNCTION)); + m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( + new OUndoContainerAction( m_pImpl->m_rModel, rptui::Inserted, xContainer.get(), + xIface, RID_STR_UNDO_ADDFUNCTION ) ); } } } @@ -433,12 +506,8 @@ void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw uno::Reference< report::XFunctions> xFunctions(evt.Source,uno::UNO_QUERY); if ( xFunctions.is() ) { - dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController(); - pController->addUndoActionAndInvalidate(new OUndoContainerAction(m_pImpl->m_rModel - ,rptui::Removed - ,xFunctions.get() - ,xIface - ,RID_STR_UNDO_ADDFUNCTION)); + m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( new OUndoContainerAction( + m_pImpl->m_rModel, rptui::Removed, xFunctions.get(), xIface, RID_STR_UNDO_ADDFUNCTION ) ); } } } diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx index 088ce7fe1..75edb69e0 100644 --- a/reportdesign/source/core/sdr/formatnormalizer.cxx +++ b/reportdesign/source/core/sdr/formatnormalizer.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/util/XNumberFormatTypes.hpp> /** === end UNO includes === **/ -#include <dbaccess/singledoccontroller.hxx> +#include <dbaccess/dbsubcomponentcontroller.hxx> #include <unotools/syslocale.hxx> #include <connectivity/statementcomposer.hxx> #include <connectivity/dbtools.hxx> @@ -187,7 +187,7 @@ namespace rptui if ( !m_xReportDefinition.is() ) return false; - ::dbaui::OSingleDocumentController* pController( m_rModel.getController() ); + ::dbaui::DBSubComponentController* pController( m_rModel.getController() ); OSL_ENSURE( pController, "FormatNormalizer::impl_ensureUpToDateFieldList_nothrow: no controller? how can *this* happen?!" ); if ( !pController ) return false; diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index f9186b9fd..db6d37b6c 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1382,7 +1382,7 @@ void ORptExport::_ExportAutoStyles() GetPageExport()->exportAutoStyles(); } // ----------------------------------------------------------------------------- -void ORptExport::_ExportStyles(BOOL bUsed) +void ORptExport::_ExportStyles(sal_Bool bUsed) { SvXMLExport::_ExportStyles(bUsed); diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx index 8e4f2f22a..cae6da3de 100644 --- a/reportdesign/source/filter/xml/xmlExport.hxx +++ b/reportdesign/source/filter/xml/xmlExport.hxx @@ -182,7 +182,7 @@ private: virtual void SetBodyAttributes(); protected: - virtual void _ExportStyles( BOOL bUsed ); + virtual void _ExportStyles( sal_Bool bUsed ); virtual void _ExportAutoStyles(); virtual void _ExportContent(); virtual void _ExportMasterStyles(); diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 743847bdf..f489fd304 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -509,7 +509,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) uno::Reference<XComponent> xCom(GetModel(),UNO_QUERY); SfxMediumRef pMedium = new SfxMedium( - sFileName, ( STREAM_READ | STREAM_NOCREATE ), FALSE, 0 ); + sFileName, ( STREAM_READ | STREAM_NOCREATE ), sal_False, 0 ); if( pMedium ) { diff --git a/reportdesign/source/filter/xml/xmlservices.cxx b/reportdesign/source/filter/xml/xmlservices.cxx index cf5d75300..c87c8873a 100644 --- a/reportdesign/source/filter/xml/xmlservices.cxx +++ b/reportdesign/source/filter/xml/xmlservices.cxx @@ -94,11 +94,5 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 181765337..b98cb408e 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -189,7 +189,7 @@ OAddFieldWindow::OAddFieldWindow(Window* pParent m_aActions.SetSelectHdl(LINK(this, OAddFieldWindow, OnSortAction)); setToolBox(&m_aActions); m_aActions.CheckItem(SID_FM_SORTUP); - m_aActions.EnableItem(SID_ADD_CONTROL_PAIR, FALSE); + m_aActions.EnableItem(SID_ADD_CONTROL_PAIR, sal_False); m_pListBox->SetDoubleClickHdl(LINK( this, OAddFieldWindow, OnDoubleClickHdl ) ); m_pListBox->SetSelectHdl(LINK( this, OAddFieldWindow, OnSelectHdl ) ); @@ -230,8 +230,8 @@ OAddFieldWindow::~OAddFieldWindow() if ( m_pListBox.get() ) { SvLBoxTreeList* pModel = m_pListBox->GetModel(); - ULONG nCount = pModel->GetEntryCount(); - for(ULONG i = 0; i< nCount;++i) + sal_uLong nCount = pModel->GetEntryCount(); + for(sal_uLong i = 0; i< nCount;++i) { delete static_cast<ColumnInfo*>(pModel->GetEntry(i)->GetUserData()); } @@ -291,7 +291,7 @@ namespace const ::rtl::OUString* pEntries = _rEntries.getConstArray(); sal_Int32 nEntries = _rEntries.getLength(); for ( sal_Int32 i = 0; i < nEntries; ++i, ++pEntries ) - _rListBox.InsertEntry( *pEntries,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries) ); + _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries) ); } void lcl_addToList( OAddFieldWindowListBox& _rListBox, const uno::Reference< container::XNameAccess>& i_xColumns ) { @@ -305,9 +305,9 @@ namespace if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) ) xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel; if ( sLabel.getLength() ) - _rListBox.InsertEntry( sLabel,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) ); + _rListBox.InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) ); else - _rListBox.InsertEntry( *pEntries,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) ); + _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) ); } } } @@ -324,10 +324,10 @@ void OAddFieldWindow::Update() { // ListBox loeschen m_pListBox->Clear(); - const USHORT nItemCount = m_aActions.GetItemCount(); - for (USHORT j = 0; j< nItemCount; ++j) + const sal_uInt16 nItemCount = m_aActions.GetItemCount(); + for (sal_uInt16 j = 0; j< nItemCount; ++j) { - m_aActions.EnableItem(m_aActions.GetItemId(j),FALSE); + m_aActions.EnableItem(m_aActions.GetItemId(j),sal_False); } String aTitle(ModuleRes(RID_STR_FIELDSELECTION)); @@ -372,7 +372,7 @@ void OAddFieldWindow::Update() SetText( aTitle ); if ( m_aCommandName.getLength() ) { - for (USHORT i = 0; i < nItemCount; ++i) + for (sal_uInt16 i = 0; i < nItemCount; ++i) { m_aActions.EnableItem(m_aActions.GetItemId(i)); } @@ -472,9 +472,9 @@ void OAddFieldWindow::_elementInserted( const container::ContainerEvent& _rEvent if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) ) xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel; if ( sLabel.getLength() ) - m_pListBox->InsertEntry( sLabel,NULL,FALSE,LIST_APPEND,new ColumnInfo(sName,sLabel) ); + m_pListBox->InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) ); else - m_pListBox->InsertEntry( sName,NULL,FALSE,LIST_APPEND,new ColumnInfo(sName,sLabel) ); + m_pListBox->InsertEntry( sName,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) ); } } } @@ -527,19 +527,19 @@ void OAddFieldWindow::resizeControls(const Size& _rDiff) //------------------------------------------------------------------ IMPL_LINK( OAddFieldWindow, OnSortAction, ToolBox*, /*NOTINTERESTEDIN*/ ) { - const USHORT nCurItem = m_aActions.GetCurItemId(); + const sal_uInt16 nCurItem = m_aActions.GetCurItemId(); if ( SID_ADD_CONTROL_PAIR == nCurItem ) OnDoubleClickHdl(NULL); else { if ( SID_FM_REMOVE_FILTER_SORT == nCurItem || !m_aActions.IsItemChecked(nCurItem) ) { - const USHORT nItemCount = m_aActions.GetItemCount(); - for (USHORT j = 0; j< nItemCount; ++j) + const sal_uInt16 nItemCount = m_aActions.GetItemCount(); + for (sal_uInt16 j = 0; j< nItemCount; ++j) { - const USHORT nItemId = m_aActions.GetItemId(j); + const sal_uInt16 nItemId = m_aActions.GetItemId(j); if ( nCurItem != nItemId ) - m_aActions.CheckItem(nItemId,FALSE); + m_aActions.CheckItem(nItemId,sal_False); } SvSortMode eSortMode = SortNone; if ( SID_FM_REMOVE_FILTER_SORT != nCurItem ) diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index a505e111b..32b9f8533 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -88,11 +88,11 @@ namespace rptui UpdateLocker( Window& _rWindow ) :m_rWindow( _rWindow ) { - _rWindow.SetUpdateMode( FALSE ); + _rWindow.SetUpdateMode( sal_False ); } ~UpdateLocker() { - m_rWindow.SetUpdateMode( TRUE ); + m_rWindow.SetUpdateMode( sal_True ); } }; @@ -401,7 +401,7 @@ namespace rptui } // ----------------------------------------------------------------------------- - void ConditionalFormattingDialog::applyCommand( size_t _nCondIndex, USHORT _nCommandId, const ::Color _aColor ) + void ConditionalFormattingDialog::applyCommand( size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color _aColor ) { OSL_PRECOND( _nCommandId, "ConditionalFormattingDialog::applyCommand: illegal command id!" ); try @@ -466,8 +466,8 @@ namespace rptui short nRet = ModalDialog::Execute(); if ( nRet == RET_OK ) { - String sUndoAction( ModuleRes( RID_STR_UNDO_CONDITIONAL_FORMATTING ) ); - UndoManagerListAction aListAction(*m_rController.getUndoMgr(),sUndoAction); + const String sUndoAction( ModuleRes( RID_STR_UNDO_CONDITIONAL_FORMATTING ) ); + const UndoContext aUndoContext( m_rController.getUndoManager(), sUndoAction ); try { sal_Int32 j(0), i(0);; diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index 2aba0c42a..3b979d964 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -72,7 +72,7 @@ ConditionField::ConditionField( Condition* _pParent, const ResId& _rResId ) : Ed { m_pSubEdit = new Edit(this,0); SetSubEdit(m_pSubEdit); - m_pSubEdit->EnableRTL( FALSE ); + m_pSubEdit->EnableRTL( sal_False ); m_pSubEdit->SetPosPixel( Point() ); m_aFormula.SetText(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("..."))); @@ -130,7 +130,7 @@ class OColorPopup : public FloatingWindow { DECL_LINK( SelectHdl, void * ); Condition* m_pCondition; - USHORT m_nSlotId; + sal_uInt16 m_nSlotId; public: OColorPopup(Window* _pParent,Condition* _pCondition); ValueSet m_aColorSet; @@ -139,7 +139,7 @@ public: virtual void Resize(); void StartSelection(); - void SetSlotId(USHORT _nSlotId); + void SetSlotId(sal_uInt16 _nSlotId); }; // ----------------------------------------------------------------------------- OColorPopup::OColorPopup(Window* _pParent,Condition* _pCondition) @@ -205,7 +205,7 @@ void OColorPopup::StartSelection() m_aColorSet.StartSelection(); } // ----------------------------------------------------------------------------- -void OColorPopup::SetSlotId(USHORT _nSlotId) +void OColorPopup::SetSlotId(sal_uInt16 _nSlotId) { m_nSlotId = _nSlotId; if ( SID_ATTR_CHAR_COLOR_BACKGROUND == _nSlotId || SID_BACKGROUND_COLOR == _nSlotId ) @@ -217,7 +217,7 @@ void OColorPopup::SetSlotId(USHORT _nSlotId) // ----------------------------------------------------------------------------- IMPL_LINK( OColorPopup, SelectHdl, void *, EMPTYARG ) { - USHORT nItemId = m_aColorSet.GetSelectItemId(); + sal_uInt16 nItemId = m_aColorSet.GetSelectItemId(); Color aColor( nItemId == 0 ? Color( COL_TRANSPARENT ) : m_aColorSet.GetItemColor( nItemId ) ); /* #i33380# Moved the following line above the Dispatch() calls. @@ -328,11 +328,11 @@ Condition::~Condition() // ----------------------------------------------------------------------------- IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ ) { - USHORT nId( m_aActions.GetCurItemId() ); + sal_uInt16 nId( m_aActions.GetCurItemId() ); if ( !m_pColorFloat ) m_pColorFloat = new OColorPopup(&m_aActions,this); - USHORT nTextId = 0; + sal_uInt16 nTextId = 0; switch(nId) { case SID_ATTR_CHAR_COLOR2: @@ -376,7 +376,7 @@ IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton ) } //------------------------------------------------------------------------------ -void Condition::ApplyCommand( USHORT _nCommandId, const ::Color& _rColor) +void Condition::ApplyCommand( sal_uInt16 _nCommandId, const ::Color& _rColor) { if ( _nCommandId == SID_ATTR_CHAR_COLOR2 ) m_pBtnUpdaterFontColor->Update( _rColor ); @@ -623,8 +623,8 @@ void Condition::impl_setCondition( const ::rtl::OUString& _rConditionFormula ) } // update UI - m_aConditionType.SelectEntryPos( (USHORT)eType ); - m_aOperationList.SelectEntryPos( (USHORT)eOperation ); + m_aConditionType.SelectEntryPos( (sal_uInt16)eType ); + m_aOperationList.SelectEntryPos( (sal_uInt16)eOperation ); m_aCondLHS.SetText( sLHS ); m_aCondRHS.SetText( sRHS ); @@ -659,10 +659,10 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat OSL_ENSURE(_xReportControlFormat.is(),"XReportControlFormat is NULL!"); if ( _xReportControlFormat.is() ) { - USHORT nItemCount = m_aActions.GetItemCount(); - for (USHORT j = 0; j< nItemCount; ++j) + sal_uInt16 nItemCount = m_aActions.GetItemCount(); + for (sal_uInt16 j = 0; j< nItemCount; ++j) { - USHORT nItemId = m_aActions.GetItemId(j); + sal_uInt16 nItemId = m_aActions.GetItemId(j); m_aActions.CheckItem( nItemId, m_rController.isFormatCommandEnabled( nItemId, _xReportControlFormat ) ); } diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx index 3413079de..f35e8ade3 100644 --- a/reportdesign/source/ui/dlg/Condition.hxx +++ b/reportdesign/source/ui/dlg/Condition.hxx @@ -147,7 +147,7 @@ namespace rptui /** forward to the parent class */ - void ApplyCommand(USHORT _nCommandId, const ::Color& _aColor ); + void ApplyCommand(sal_uInt16 _nCommandId, const ::Color& _aColor ); inline ::rptui::OReportController& getController() const { return m_rController; } diff --git a/reportdesign/source/ui/dlg/DateTime.src b/reportdesign/source/ui/dlg/DateTime.src index 4d5fb9958..227aad173 100644 --- a/reportdesign/source/ui/dlg/DateTime.src +++ b/reportdesign/source/ui/dlg/DateTime.src @@ -47,6 +47,7 @@ ModalDialog RID_DATETIME_DLG CheckBox CB_DATE { + HelpID = "reportdesign:CheckBox:RID_DATETIME_DLG:CB_DATE"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS , RELATED_CONTROLS /* + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT */) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*UNRELATED_CONTROLS, FIXEDTEXT_HEIGHT ) ; Check = TRUE; @@ -62,6 +63,7 @@ ModalDialog RID_DATETIME_DLG ListBox LB_DATE_TYPE { + HelpID = "reportdesign:ListBox:RID_DATETIME_DLG:LB_DATE_TYPE"; Pos = MAP_APPFONT ( 2 * UNRELATED_CONTROLS + BUTTON_WIDTH, RELATED_CONTROLS + UNRELATED_CONTROLS + CHECKBOX_HEIGHT) ; Size = MAP_APPFONT( PAGE_WIDTH - 3*UNRELATED_CONTROLS - BUTTON_WIDTH, 60 ); Border = TRUE; @@ -78,6 +80,7 @@ ModalDialog RID_DATETIME_DLG CheckBox CB_TIME { + HelpID = "reportdesign:CheckBox:RID_DATETIME_DLG:CB_TIME"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS, RELATED_CONTROLS + 3*UNRELATED_CONTROLS + CHECKBOX_HEIGHT + LISTBOX_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*UNRELATED_CONTROLS, FIXEDTEXT_HEIGHT ) ; Check = TRUE; @@ -93,6 +96,7 @@ ModalDialog RID_DATETIME_DLG ListBox LB_TIME_TYPE { + HelpID = "reportdesign:ListBox:RID_DATETIME_DLG:LB_TIME_TYPE"; Pos = MAP_APPFONT ( 2 * UNRELATED_CONTROLS + BUTTON_WIDTH, RELATED_CONTROLS + 4*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + LISTBOX_HEIGHT) ; Size = MAP_APPFONT( PAGE_WIDTH - 3*UNRELATED_CONTROLS - BUTTON_WIDTH, 60 ); Border = TRUE; diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index 7dcd550d7..0f86b3dd3 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -100,7 +100,7 @@ FormulaDialog::~FormulaDialog() { if ( m_pAddField ) { - SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( HID_RPT_FIELD_SEL_WIN ) ); + SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( HID_RPT_FIELD_SEL_WIN ) ); aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) ); ::std::auto_ptr<Window> aTemp2(m_pAddField); @@ -116,7 +116,7 @@ bool FormulaDialog::calculateValue( const String& rStrExp, String& rStrResult ) rStrResult = rStrExp; return false; } -void FormulaDialog::doClose(BOOL _bOk) +void FormulaDialog::doClose(sal_Bool _bOk) { EndDialog(_bOk ? RET_OK : RET_CANCEL); } @@ -126,10 +126,10 @@ void FormulaDialog::insertEntryToLRUList(const IFunctionDescription* /*_pDesc*/) void FormulaDialog::showReference(const String& /*_sFormula*/) { } -void FormulaDialog::dispatch(BOOL /*_bOK*/,BOOL /*_bMartixChecked*/) +void FormulaDialog::dispatch(sal_Bool /*_bOK*/,sal_Bool /*_bMartixChecked*/) { } -void FormulaDialog::setDispatcherLock( BOOL /*bLock*/ ) +void FormulaDialog::setDispatcherLock( sal_Bool /*bLock*/ ) { } void FormulaDialog::setReferenceInput(const FormEditData* /*_pData*/) @@ -189,7 +189,7 @@ void FormulaDialog::ShowReference(const String& /*_sRef*/) { } // ----------------------------------------------------------------------------- -void FormulaDialog::HideReference( BOOL /*bDoneRefMode*/) +void FormulaDialog::HideReference( sal_Bool /*bDoneRefMode*/) { } // ----------------------------------------------------------------------------- @@ -210,7 +210,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton) { m_pAddField = new OAddFieldWindow(this,m_xRowSet); m_pAddField->SetCreateHdl(LINK( this, FormulaDialog, OnClickHdl ) ); - SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( HID_RPT_FIELD_SEL_WIN ) ); + SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( HID_RPT_FIELD_SEL_WIN ) ); if ( aDlgOpt.Exists() ) { m_pAddField->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); @@ -243,7 +243,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg) } m_pEdit = NULL; _pAddFieldDlg->Hide(); - RefInputDoneAfter( TRUE ); + RefInputDoneAfter( sal_True ); return 0L; } diff --git a/reportdesign/source/ui/dlg/GroupExchange.cxx b/reportdesign/source/ui/dlg/GroupExchange.cxx index 0cb97b5bd..c68969686 100644 --- a/reportdesign/source/ui/dlg/GroupExchange.cxx +++ b/reportdesign/source/ui/dlg/GroupExchange.cxx @@ -61,7 +61,7 @@ namespace rptui // ----------------------------------------------------------------------------- sal_Bool OGroupExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) { - ULONG nFormat = SotExchange::GetFormat(rFlavor); + sal_uLong nFormat = SotExchange::GetFormat(rFlavor); if(nFormat == OGroupExchange::getReportGroupId() ) { return SetAny(uno::makeAny(m_aGroupRow),rFlavor); diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 664535e79..e6fbee861 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -103,13 +103,13 @@ class OFieldExpressionControl : public TContainerListenerBase ::svt::ComboBoxControl* m_pComboCell; sal_Int32 m_nDataPos; sal_Int32 m_nCurrentPos; - ULONG m_nPasteEvent; - ULONG m_nDeleteEvent; + sal_uLong m_nPasteEvent; + sal_uLong m_nDeleteEvent; OGroupsSortingDialog* m_pParent; bool m_bIgnoreEvent; - void fillListBox(const uno::Reference< beans::XPropertySet>& _xDest,long nRow,USHORT nColumnId); - BOOL SaveModified(bool _bAppend); + void fillListBox(const uno::Reference< beans::XPropertySet>& _xDest,long nRow,sal_uInt16 nColumnId); + sal_Bool SaveModified(bool _bAppend); OFieldExpressionControl(const OFieldExpressionControl&); // NO COPY void operator =(const OFieldExpressionControl&); // NO ASSIGN @@ -144,17 +144,17 @@ public: */ void moveGroups(const uno::Sequence<uno::Any>& _aGroups,sal_Int32 _nRow,sal_Bool _bSelect = sal_True); - virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol); + virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol); using OFieldExpressionControl_Base::GetRowCount; protected: - virtual BOOL IsTabAllowed(BOOL bForward) const; - - virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol ); - virtual ::svt::CellController* GetController( long nRow, USHORT nCol ); - virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const; - virtual BOOL SeekRow( long nRow ); - virtual BOOL SaveModified(); - virtual String GetCellText( long nRow, USHORT nColId ) const; + virtual sal_Bool IsTabAllowed(sal_Bool bForward) const; + + virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ); + virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ); + virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const; + virtual sal_Bool SeekRow( long nRow ); + virtual sal_Bool SaveModified(); + virtual String GetCellText( long nRow, sal_uInt16 nColId ) const; virtual RowStatus GetRowStatus(long nRow) const; virtual void KeyInput(const KeyEvent& rEvt); @@ -274,7 +274,7 @@ sal_Int8 OFieldExpressionControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt sal_Int8 nAction = DND_ACTION_NONE; if ( IsEditing() ) { - USHORT nPos = m_pComboCell->GetSelectEntryPos(); + sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos(); if ( COMBOBOX_ENTRY_NOTFOUND != nPos || m_pComboCell->GetText().Len() ) SaveModified(); DeactivateCell(); @@ -315,8 +315,8 @@ void OFieldExpressionControl::moveGroups(const uno::Sequence<uno::Any>& _aGroups m_bIgnoreEvent = true; { sal_Int32 nRow = _nRow; - String sUndoAction(ModuleRes(RID_STR_UNDO_MOVE_GROUP)); - UndoManagerListAction aListAction(*m_pParent->m_pController->getUndoMgr(),sUndoAction); + const String sUndoAction(ModuleRes(RID_STR_UNDO_MOVE_GROUP)); + const UndoContext aUndoContext( m_pParent->m_pController->getUndoManager(), sUndoAction ); uno::Reference< report::XGroups> xGroups = m_pParent->getGroups(); const uno::Any* pIter = _aGroups.getConstArray(); @@ -375,7 +375,7 @@ void OFieldExpressionControl::lateInit() aFont.SetWeight( WEIGHT_LIGHT ); SetFont(aFont); - InsertHandleColumn(static_cast<USHORT>(GetTextWidth('0') * 4)/*, TRUE */); + InsertHandleColumn(static_cast<sal_uInt16>(GetTextWidth('0') * 4)/*, sal_True */); InsertDataColumn( FIELD_EXPRESSION, String(ModuleRes(STR_RPT_EXPRESSION)), 100); m_pComboCell = new ComboBoxControl( &GetDataWindow() ); @@ -402,7 +402,7 @@ void OFieldExpressionControl::lateInit() // not the first call RowRemoved(0, GetRowCount()); - RowInserted(0, m_aGroupPositions.size(), TRUE); + RowInserted(0, m_aGroupPositions.size(), sal_True); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- @@ -428,19 +428,19 @@ IMPL_LINK(OFieldExpressionControl, AsynchDeactivate, void*, EMPTYARG) } //------------------------------------------------------------------------------ -BOOL OFieldExpressionControl::IsTabAllowed(BOOL /*bForward*/) const +sal_Bool OFieldExpressionControl::IsTabAllowed(sal_Bool /*bForward*/) const { DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL); - return FALSE; + return sal_False; } //------------------------------------------------------------------------------ -BOOL OFieldExpressionControl::SaveModified() +sal_Bool OFieldExpressionControl::SaveModified() { return SaveModified(true); } //------------------------------------------------------------------------------ -BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow) +sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow) { DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL); sal_Int32 nRow = GetCurRow(); @@ -454,7 +454,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow) { bAppend = sal_True; String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP)); - m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() ); + m_pParent->m_pController->getUndoManager().EnterListAction( sUndoAction, String() ); xGroup = m_pParent->getGroups()->createGroup(); xGroup->setHeaderOn(sal_True); @@ -485,7 +485,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow) xGroup = m_pParent->getGroup(m_aGroupPositions[nRow]); if ( xGroup.is() ) { - USHORT nPos = m_pComboCell->GetSelectEntryPos(); + sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos(); ::rtl::OUString sExpression; if ( COMBOBOX_ENTRY_NOTFOUND == nPos ) sExpression = m_pComboCell->GetText(); @@ -498,7 +498,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow) ::rptui::adjustSectionName(xGroup,nPos); if ( bAppend ) - m_pParent->m_pController->getUndoMgr()->LeaveListAction(); + m_pParent->m_pController->getUndoManager().LeaveListAction(); } if ( Controller() ) @@ -518,10 +518,10 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow) } } - return TRUE; + return sal_True; } //------------------------------------------------------------------------------ -String OFieldExpressionControl::GetCellText( long nRow, USHORT /*nColId*/ ) const +String OFieldExpressionControl::GetCellText( long nRow, sal_uInt16 /*nColId*/ ) const { DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL); String sText; @@ -552,7 +552,7 @@ String OFieldExpressionControl::GetCellText( long nRow, USHORT /*nColId*/ ) cons } //------------------------------------------------------------------------------ -void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, long nRow, USHORT nColumnId ) +void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId ) { DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL); @@ -575,7 +575,7 @@ sal_Bool OFieldExpressionControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol) return sal_True; } //------------------------------------------------------------------------------ -CellController* OFieldExpressionControl::GetController( long /*nRow*/, USHORT /*nColumnId*/ ) +CellController* OFieldExpressionControl::GetController( long /*nRow*/, sal_uInt16 /*nColumnId*/ ) { DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL); ComboBoxCellController* pCellController = new ComboBoxCellController( m_pComboCell ); @@ -584,17 +584,17 @@ CellController* OFieldExpressionControl::GetController( long /*nRow*/, USHORT /* } //------------------------------------------------------------------------------ -BOOL OFieldExpressionControl::SeekRow( long _nRow ) +sal_Bool OFieldExpressionControl::SeekRow( long _nRow ) { DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL); // die Basisklasse braucht den Aufruf, da sie sich dort merkt, welche Zeile gepainted wird EditBrowseBox::SeekRow(_nRow); m_nCurrentPos = _nRow; - return TRUE; + return sal_True; } //------------------------------------------------------------------------------ -void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId ) const +void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const { DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL); String aText =const_cast< OFieldExpressionControl*>(this)->GetCellText( m_nCurrentPos, nColumnId ); @@ -739,7 +739,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt) return; } - USHORT nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()); + sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()); if ( nColId == HANDLE_ID ) { @@ -810,7 +810,7 @@ void OFieldExpressionControl::DeleteRows() { bFirstTime = false; String sUndoAction(ModuleRes(RID_STR_UNDO_REMOVE_SELECTION)); - m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() ); + m_pParent->m_pController->getUndoManager().EnterListAction( sUndoAction, String() ); } sal_Int32 nGroupPos = m_aGroupPositions[nIndex]; @@ -830,7 +830,7 @@ void OFieldExpressionControl::DeleteRows() } if ( !bFirstTime ) - m_pParent->m_pController->getUndoMgr()->LeaveListAction(); + m_pParent->m_pController->getUndoManager().LeaveListAction(); m_nDataPos = GetCurRow(); InvalidateStatusCell( nOldDataPos ); @@ -916,8 +916,8 @@ void OFieldExpressionControl::InsertRows( long nRow ) { m_bIgnoreEvent = false; { - String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP)); - UndoManagerListAction aListAction(*m_pParent->m_pController->getUndoMgr(),sUndoAction); + const String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP)); + const UndoContext aUndoContext( m_pParent->m_pController->getUndoManager(), sUndoAction ); uno::Reference<report::XGroups> xGroups = m_pParent->getGroups(); sal_Int32 nGroupPos = 0; @@ -999,7 +999,7 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent { pControlsLst[i]->SetGetFocusHdl(LINK(this, OGroupsSortingDialog, OnControlFocusGot)); pControlsLst[i]->SetLoseFocusHdl(LINK(this, OGroupsSortingDialog, OnControlFocusLost)); - pControlsLst[i]->Show(TRUE); + pControlsLst[i]->Show(sal_True); } for (size_t i = 0; i < (SAL_N_ELEMENTS(pControlsLst))-1; ++i) @@ -1014,7 +1014,7 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) { - pControls[i]->Show(TRUE); + pControls[i]->Show(sal_True); String sText = pControls[i]->GetText(); if ( aMnemonicGenerator.CreateMnemonic(sText) ) pControls[i]->SetText(sText); @@ -1184,7 +1184,7 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusGot, Control*, pControl ) NumericField* pNumericField = dynamic_cast< NumericField* >( pControl ); if ( pNumericField ) pNumericField->SaveValue(); - showHelpText(static_cast<USHORT>(i+STR_RPT_HELP_FIELD)); + showHelpText(static_cast<sal_uInt16>(i+STR_RPT_HELP_FIELD)); break; } } @@ -1206,7 +1206,7 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ ) { DBG_CHKTHIS( rpt_OGroupsSortingDialog,NULL); - USHORT nCommand = m_aToolBox.GetCurItemId(); + sal_uInt16 nCommand = m_aToolBox.GetCurItemId(); if ( m_pFieldExpression ) { @@ -1281,7 +1281,7 @@ IMPL_LINK( OGroupsSortingDialog, LBChangeHdl, ListBox*, pListBox ) return 1L; } // ----------------------------------------------------------------------------- -void OGroupsSortingDialog::showHelpText(USHORT _nResId) +void OGroupsSortingDialog::showHelpText(sal_uInt16 _nResId) { m_aHelpWindow.SetText(String(ModuleRes(_nResId))); } @@ -1325,8 +1325,8 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x case sdbc::DataType::TIME: case sdbc::DataType::TIMESTAMP: { - USHORT nIds[] = { STR_RPT_YEAR, STR_RPT_QUARTER,STR_RPT_MONTH,STR_RPT_WEEK,STR_RPT_DAY,STR_RPT_HOUR,STR_RPT_MINUTE }; - for (USHORT i = 0; i < SAL_N_ELEMENTS(nIds); ++i) + sal_uInt16 nIds[] = { STR_RPT_YEAR, STR_RPT_QUARTER,STR_RPT_MONTH,STR_RPT_WEEK,STR_RPT_DAY,STR_RPT_HOUR,STR_RPT_MINUTE }; + for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS(nIds); ++i) { m_aGroupOnLst.InsertEntry(String(ModuleRes(nIds[i]))); m_aGroupOnLst.SetEntryData(i+1,reinterpret_cast<void*>(i+2)); @@ -1338,8 +1338,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::INTERVAL)); break; } - - USHORT nPos = 0; + sal_uInt16 nPos = 0; switch(_xGroup->getGroupOn()) { case report::GroupOn::DEFAULT: diff --git a/reportdesign/source/ui/dlg/GroupsSorting.src b/reportdesign/source/ui/dlg/GroupsSorting.src index 159a45701..3cb470933 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.src +++ b/reportdesign/source/ui/dlg/GroupsSorting.src @@ -120,6 +120,7 @@ FloatingWindow RID_GROUPS_SORTING ListBox LST_ORDER { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_ORDER"; Border = TRUE; Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 4*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + FIXEDTEXT_HEIGHT - 1 ); Size = MAP_APPFONT( LISTBOX_WIDTH, 60 ); @@ -146,6 +147,7 @@ FloatingWindow RID_GROUPS_SORTING ListBox LST_HEADERLST { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_HEADERLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 5*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 2*FIXEDTEXT_HEIGHT -1); @@ -171,6 +173,7 @@ FloatingWindow RID_GROUPS_SORTING ListBox LST_FOOTERLST { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_FOOTERLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 6*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 3*FIXEDTEXT_HEIGHT -1); @@ -196,6 +199,7 @@ FloatingWindow RID_GROUPS_SORTING ListBox LST_GROUPONLST { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_GROUPONLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 7*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 4*FIXEDTEXT_HEIGHT -1); @@ -219,6 +223,7 @@ FloatingWindow RID_GROUPS_SORTING NumericField ED_GROUPINTERVALLST { + HelpID = "reportdesign:NumericField:RID_GROUPS_SORTING:ED_GROUPINTERVALLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH , 8*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 5*FIXEDTEXT_HEIGHT -1); @@ -235,6 +240,7 @@ FloatingWindow RID_GROUPS_SORTING }; ListBox LST_KEEPTOGETHERLST { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_KEEPTOGETHERLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH , 9*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 6*FIXEDTEXT_HEIGHT -1); diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index 10db39347..0aa6e682a 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -32,7 +32,7 @@ #include "uistrings.hrc" #include "ReportController.hxx" #include "UITools.hxx" -#include "Undo.hxx" +#include "RptUndo.hxx" #include "reportformula.hxx" #include <com/sun/star/container/XContainerListener.hpp> #include <com/sun/star/report/XReportDefinition.hpp> @@ -74,9 +74,9 @@ using namespace ::com::sun::star; using namespace utl; using namespace ::comphelper; -USHORT lcl_getImageId(const uno::Reference< report::XReportComponent>& _xElement) +sal_uInt16 lcl_getImageId(const uno::Reference< report::XReportComponent>& _xElement) { - USHORT nId = 0; + sal_uInt16 nId = 0; uno::Reference< report::XFixedLine> xFixedLine(_xElement,uno::UNO_QUERY); if ( uno::Reference< report::XFixedText>(_xElement,uno::UNO_QUERY).is() ) nId = SID_FM_FIXEDTEXT; @@ -163,8 +163,8 @@ class NavigatorTree : public ::cppu::BaseMutex ::rtl::Reference< comphelper::OSelectionChangeMultiplexer> m_pSelectionListener; unsigned short m_nTimerCounter; - SvLBoxEntry* insertEntry(const ::rtl::OUString& _sName,SvLBoxEntry* _pParent,USHORT _nImageId,ULONG _nPosition,UserData* _pData); - void traverseSection(const uno::Reference< report::XSection>& _xSection,SvLBoxEntry* _pParent,USHORT _nImageId,ULONG _nPosition = LIST_APPEND); + SvLBoxEntry* insertEntry(const ::rtl::OUString& _sName,SvLBoxEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData); + void traverseSection(const uno::Reference< report::XSection>& _xSection,SvLBoxEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition = LIST_APPEND); void traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvLBoxEntry* _pParent); NavigatorTree(const NavigatorTree&); @@ -310,12 +310,12 @@ void NavigatorTree::Command( const CommandEvent& rEvt ) uno::Reference< report::XFunction>(pData->getContent(),uno::UNO_QUERY).is()); PopupMenu aContextMenu( ModuleRes( RID_MENU_NAVIGATOR ) ); - USHORT nCount = aContextMenu.GetItemCount(); - for (USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = aContextMenu.GetItemCount(); + for (sal_uInt16 i = 0; i < nCount; ++i) { if ( MENUITEM_SEPARATOR != aContextMenu.GetItemType(i)) { - USHORT nId = aContextMenu.GetItemId(i); + sal_uInt16 nId = aContextMenu.GetItemId(i); aContextMenu.CheckItem(nId,m_rController.isCommandChecked(nId)); sal_Bool bEnabled = m_rController.isCommandEnabled(nId); @@ -328,7 +328,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt ) aContextMenu.EnableItem(nId,bEnabled); } } - USHORT nId = aContextMenu.Execute(this, aWhere); + sal_uInt16 nId = aContextMenu.Execute(this, aWhere); if ( nId ) { uno::Sequence< beans::PropertyValue> aArgs; @@ -493,7 +493,7 @@ void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent ) throw ( SetCurEntry(pEntry); } else if ( !pEntry ) - SelectAll(FALSE,FALSE); + SelectAll(sal_False,sal_False); } else { @@ -512,20 +512,20 @@ void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent ) throw ( m_pSelectionListener->unlock(); } // ----------------------------------------------------------------------------- -SvLBoxEntry* NavigatorTree::insertEntry(const ::rtl::OUString& _sName,SvLBoxEntry* _pParent,USHORT _nImageId,ULONG _nPosition,UserData* _pData) +SvLBoxEntry* NavigatorTree::insertEntry(const ::rtl::OUString& _sName,SvLBoxEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData) { SvLBoxEntry* pEntry = NULL; if ( _nImageId ) { const Image aImage( m_aNavigatorImages.GetImage( _nImageId ) ); - pEntry = InsertEntry(_sName,aImage,aImage,_pParent,FALSE,_nPosition,_pData); + pEntry = InsertEntry(_sName,aImage,aImage,_pParent,sal_False,_nPosition,_pData); } else - pEntry = InsertEntry(_sName,_pParent,FALSE,_nPosition,_pData); + pEntry = InsertEntry(_sName,_pParent,sal_False,_nPosition,_pData); return pEntry; } // ----------------------------------------------------------------------------- -void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xSection,SvLBoxEntry* _pParent,USHORT _nImageId,ULONG _nPosition) +void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xSection,SvLBoxEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition) { SvLBoxEntry* pSection = insertEntry(_xSection->getName(),_pParent,_nImageId,_nPosition,new UserData(this,_xSection)); const sal_Int32 nCount = _xSection->getCount(); @@ -666,7 +666,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) SvLBoxEntry* pParent = find(xReport); if ( _rEvent.PropertyName == PROPERTY_REPORTHEADERON ) { - ULONG nPos = xReport->getReportHeaderOn() ? 2 : 1; + sal_uLong nPos = xReport->getReportHeaderOn() ? 2 : 1; traverseSection(xReport->getReportHeader(),pParent,SID_REPORTHEADERFOOTER,nPos); } else if ( _rEvent.PropertyName == PROPERTY_PAGEHEADERON ) @@ -677,7 +677,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) traverseSection(xReport->getPageFooter(),pParent, SID_PAGEHEADERFOOTER); else if ( _rEvent.PropertyName == PROPERTY_REPORTFOOTERON ) { - ULONG nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : LIST_APPEND; + sal_uLong nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : LIST_APPEND; traverseSection(xReport->getReportFooter(),pParent,SID_REPORTHEADERFOOTER,nPos); } } @@ -708,7 +708,7 @@ void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent ) uno::Reference< report::XReportComponent> xElement(xProp,uno::UNO_QUERY); if ( xProp.is() ) sName = lcl_getName(xProp); - insertEntry(sName,pEntry,(!xElement.is() ? USHORT(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),LIST_APPEND,new UserData(this,xProp)); + insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),LIST_APPEND,new UserData(this,xProp)); } if ( !IsExpanded(pEntry) ) Expand(pEntry); diff --git a/reportdesign/source/ui/dlg/Navigator.src b/reportdesign/source/ui/dlg/Navigator.src index a97f6f1fc..1c1af073b 100644 --- a/reportdesign/source/ui/dlg/Navigator.src +++ b/reportdesign/source/ui/dlg/Navigator.src @@ -103,7 +103,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_SORTINGANDGROUPING; - HelpId = SID_SORTINGANDGROUPING ; Command = ".uno:DbSortingAndGrouping"; Text [ en-US ] = "Sorting and Grouping..."; }; @@ -114,7 +113,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_PAGEHEADERFOOTER; - HelpId = SID_PAGEHEADERFOOTER ; Command = ".uno:PageHeaderFooter"; Checkable = TRUE; Text [ en-US ] = "Page Header/Footer..."; @@ -122,7 +120,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_REPORTHEADERFOOTER; - HelpId = SID_REPORTHEADERFOOTER ; Command = ".uno:ReportHeaderFooter"; Checkable = TRUE; Text [ en-US ] = "Report Header/Footer..."; @@ -134,7 +131,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_RPT_NEW_FUNCTION; - HelpId = SID_RPT_NEW_FUNCTION; Command = ".uno:NewFunction"; Text [ en-US ] = "New Function"; }; @@ -145,7 +141,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_SHOW_PROPERTYBROWSER; - HelpId = SID_SHOW_PROPERTYBROWSER ; Command = ".uno:FormProperties"; Text [ en-US ] = "Properties..."; }; diff --git a/reportdesign/source/ui/dlg/PageNumber.src b/reportdesign/source/ui/dlg/PageNumber.src index 751bb7c54..58d8c4a04 100644 --- a/reportdesign/source/ui/dlg/PageNumber.src +++ b/reportdesign/source/ui/dlg/PageNumber.src @@ -54,6 +54,7 @@ ModalDialog RID_PAGENUMBERS RadioButton RB_PAGE_N { + HelpID = "reportdesign:RadioButton:RID_PAGENUMBERS:RB_PAGE_N"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, 2*RELATED_CONTROLS + FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Group = TRUE; @@ -62,6 +63,7 @@ ModalDialog RID_PAGENUMBERS }; RadioButton RB_PAGE_N_OF_M { + HelpID = "reportdesign:RadioButton:RID_PAGENUMBERS:RB_PAGE_N_OF_M"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, 3*RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Text [ en-US ] = "Page N of M"; @@ -76,6 +78,7 @@ ModalDialog RID_PAGENUMBERS RadioButton RB_PAGE_TOPPAGE { + HelpID = "reportdesign:RadioButton:RID_PAGENUMBERS:RB_PAGE_TOPPAGE"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, 4*RELATED_CONTROLS + UNRELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Group = TRUE; @@ -84,6 +87,7 @@ ModalDialog RID_PAGENUMBERS }; RadioButton RB_PAGE_BOTTOMPAGE { + HelpID = "reportdesign:RadioButton:RID_PAGENUMBERS:RB_PAGE_BOTTOMPAGE"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, 5*RELATED_CONTROLS + UNRELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Text [ en-US ] = "Bottom of Page (Footer)"; @@ -104,6 +108,7 @@ ModalDialog RID_PAGENUMBERS }; ListBox LST_ALIGNMENT { + HelpID = "reportdesign:ListBox:RID_PAGENUMBERS:LST_ALIGNMENT"; Border = TRUE; Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH , 6*RELATED_CONTROLS + 2*UNRELATED_CONTROLS + 7*FIXEDTEXT_HEIGHT -1); Size = MAP_APPFONT( LISTBOX_WIDTH, 60 ); @@ -121,6 +126,7 @@ ModalDialog RID_PAGENUMBERS }; CheckBox CB_SHOWNUMBERONFIRSTPAGE { + HelpID = "reportdesign:CheckBox:RID_PAGENUMBERS:CB_SHOWNUMBERONFIRSTPAGE"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 6*RELATED_CONTROLS + 3*UNRELATED_CONTROLS + 8*FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Check = TRUE; diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx index 0217b4fce..101ab0aad 100644 --- a/reportdesign/source/ui/dlg/dlgpage.cxx +++ b/reportdesign/source/ui/dlg/dlgpage.cxx @@ -48,7 +48,7 @@ namespace rptui |* \************************************************************************/ -ORptPageDialog::ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,USHORT _nPageId) : +ORptPageDialog::ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,sal_uInt16 _nPageId) : SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ), rOutAttrs ( *pAttr ) { diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx index 1d775e19f..037c3ac0d 100644 --- a/reportdesign/source/ui/inc/CondFormat.hxx +++ b/reportdesign/source/ui/inc/CondFormat.hxx @@ -61,7 +61,7 @@ namespace rptui public: virtual void addCondition( size_t _nAddAfterIndex ) = 0; virtual void deleteCondition( size_t _nCondIndex ) = 0; - virtual void applyCommand( size_t _nCondIndex, USHORT _nCommandId, const ::Color _aColor ) = 0; + virtual void applyCommand( size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color _aColor ) = 0; virtual void moveConditionUp( size_t _nCondIndex ) = 0; virtual void moveConditionDown( size_t _nCondIndex ) = 0; virtual ::rtl::OUString getDataField() const = 0; @@ -110,7 +110,7 @@ namespace rptui // IConditionalFormatAction overridables virtual void addCondition( size_t _nAddAfterIndex ); virtual void deleteCondition( size_t _nCondIndex ); - virtual void applyCommand( size_t _nCondIndex, USHORT _nCommandId, const ::Color _aColor ); + virtual void applyCommand( size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color _aColor ); virtual void moveConditionUp( size_t _nCondIndex ); virtual void moveConditionDown( size_t _nCondIndex ); virtual ::rtl::OUString getDataField() const; diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index c355a6c46..27579d9ed 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -84,14 +84,14 @@ namespace rptui Timer m_aMarkTimer; Point m_aScrollOffset; DlgEdMode m_eMode; - USHORT m_nCurrentPosition; - USHORT m_eActObj; - BOOL m_bFirstDraw; + sal_uInt16 m_nCurrentPosition; + sal_uInt16 m_eActObj; + sal_Bool m_bFirstDraw; Size m_aGridSizeCoarse; Size m_aGridSizeFine; - BOOL m_bGridVisible; - BOOL m_bGridSnap; - BOOL m_bDeleted; + sal_Bool m_bGridVisible; + sal_Bool m_bGridSnap; + sal_Bool m_bDeleted; DECL_LINK( MarkTimeout, Timer * ); @@ -126,8 +126,8 @@ namespace rptui inline OReportController& getController() const { return m_rReportController; } void SetMode( DlgEdMode m_eMode ); - void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); - USHORT GetInsertObj() const; + void SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); + sal_uInt16 GetInsertObj() const; rtl::OUString GetInsertObjString() const; DlgEdMode GetMode() const { return m_eMode; } @@ -143,7 +143,7 @@ namespace rptui * * \return <TRUE/> if paste is allowed */ - BOOL IsPasteAllowed() const; + sal_Bool IsPasteAllowed() const; /** paste a new control in this section */ @@ -163,17 +163,17 @@ namespace rptui void SelectAll(const sal_uInt16 _nObjectType); /// checks if a selection exists - BOOL HasSelection() const; + sal_Bool HasSelection() const; void UpdatePropertyBrowserDelayed(OSectionView& _rView); - USHORT getSectionCount() const; + sal_uInt16 getSectionCount() const; /** removes the section at the given position. * * \param _nPosition Zero based. */ - void removeSection(USHORT _nPosition); + void removeSection(sal_uInt16 _nPosition); /** adds a new section at position _nPosition. If the section is <NULL/> nothing happens. @@ -181,13 +181,13 @@ namespace rptui */ void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection ,const ::rtl::OUString& _sColorEntry - ,USHORT _nPosition = USHRT_MAX); + ,sal_uInt16 _nPosition = USHRT_MAX); inline Size getGridSizeCoarse() const { return m_aGridSizeCoarse; } inline Size getGridSizeFine() const { return m_aGridSizeFine; } - inline BOOL isGridSnap() const { return m_bGridSnap; } - void setGridSnap(BOOL bOn); - void setDragStripes(BOOL bOn); + inline sal_Bool isGridSnap() const { return m_bGridSnap; } + void setGridSnap(sal_Bool bOn); + void setDragStripes(sal_Bool bOn); /** turns the grid on or off * * \param _bGridVisible @@ -196,10 +196,10 @@ namespace rptui void togglePropertyBrowser(sal_Bool _bToogleOn); - BOOL isAddFieldVisible() const; + sal_Bool isAddFieldVisible() const; void toggleAddField(); - BOOL isReportExplorerVisible() const; + sal_Bool isReportExplorerVisible() const; void toggleReportExplorer(); /** shows or hides the ruler. diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx index c4cc37087..c5950f8be 100644 --- a/reportdesign/source/ui/inc/Formula.hxx +++ b/reportdesign/source/ui/inc/Formula.hxx @@ -73,11 +73,11 @@ public: virtual void notifyChange(); virtual void fill(); virtual bool calculateValue(const String& _sExpression,String& _rResult); - virtual void doClose(BOOL _bOk); + virtual void doClose(sal_Bool _bOk); virtual void insertEntryToLRUList(const formula::IFunctionDescription* pDesc); virtual void showReference(const String& _sFormula); - virtual void dispatch(BOOL _bOK,BOOL _bMartixChecked); - virtual void setDispatcherLock( BOOL bLock ); + virtual void dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked); + virtual void setDispatcherLock( sal_Bool bLock ); virtual void setReferenceInput(const formula::FormEditData* _pData); virtual void deleteFormData(); virtual void clear(); @@ -97,7 +97,7 @@ public: // IControlReferenceHandler virtual void ShowReference(const String& _sRef); - virtual void HideReference( BOOL bDoneRefMode = TRUE ); + virtual void HideReference( sal_Bool bDoneRefMode = sal_True ); virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx index 207977fc4..08b80e024 100644 --- a/reportdesign/source/ui/inc/FunctionHelper.hxx +++ b/reportdesign/source/ui/inc/FunctionHelper.hxx @@ -79,10 +79,10 @@ public: virtual ::rtl::OUString getDescription() const ; virtual xub_StrLen getSuppressedArgumentCount() const ; virtual ::rtl::OUString getFormula(const ::std::vector< ::rtl::OUString >& _aArguments) const ; - virtual void fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments) const ; + virtual void fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const ; virtual void initArgumentInfo() const; virtual ::rtl::OUString getSignature() const ; - virtual long getHelpId() const ; + virtual rtl::OString getHelpId() const ; virtual sal_uInt32 getParameterCount() const ; virtual ::rtl::OUString getParameterName(sal_uInt32 _nPos) const ; virtual ::rtl::OUString getParameterDescription(sal_uInt32 _nPos) const ; diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx index 4c1b18ee5..ece943f76 100644 --- a/reportdesign/source/ui/inc/GeometryHandler.hxx +++ b/reportdesign/source/ui/inc/GeometryHandler.hxx @@ -196,7 +196,7 @@ namespace rptui * \param _sQuotedFunction the quoted function name * \param _Out_rDataField the data field which is used in the function * \param _xFunctionsSupplier teh function supplier to search or empty if not used - * \param _bSet If set to TRUE than the m_sDefaultFunction and m_sScope vars will be set if successful. + * \param _bSet If set to sal_True than the m_sDefaultFunction and m_sScope vars will be set if successful. * \return sal_True with known otherwise sal_False */ sal_Bool isDefaultFunction(const ::rtl::OUString& _sQuotedFunction diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx index eb86794d0..83ed6a42e 100644 --- a/reportdesign/source/ui/inc/GroupsSorting.hxx +++ b/reportdesign/source/ui/inc/GroupsSorting.hxx @@ -33,7 +33,7 @@ #include <vcl/lstbox.hxx> #include <vcl/edit.hxx> #include <vcl/field.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/toolbox.hxx> #include <com/sun/star/report/XGroups.hpp> #include <com/sun/star/report/XGroup.hpp> @@ -138,7 +138,7 @@ private: /** shows the text given by the id in the multiline edit @param _nResId the string id */ - void showHelpText(USHORT _nResId); + void showHelpText(sal_uInt16 _nResId); /** display the group props @param _xGroup the group to display */ diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index 1d5eb6488..9ac5d0e9d 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -28,48 +28,52 @@ #ifndef RPTUI_REPORTCONTROLLER_HXX #define RPTUI_REPORTCONTROLLER_HXX -#include <dbaccess/singledoccontroller.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/uno/Sequence.hxx> -#include <com/sun/star/sdbc/XConnection.hpp> -#include <com/sun/star/sdbc/XRowSet.hpp> +#include "DesignView.hxx" +#include "ModuleHelper.hxx" +#include "ReportControllerObserver.hxx" +#include "RptDef.hxx" + +/** === begin UNO includes === **/ #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertyChangeListener.hpp> -#include <com/sun/star/util/XNumberFormatter.hpp> -#include <com/sun/star/io/XObjectOutputStream.hpp> -#include <com/sun/star/io/XObjectInputStream.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/embed/XVisualObject.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/report/XReportDefinition.hpp> +#include <com/sun/star/io/XObjectInputStream.hpp> +#include <com/sun/star/io/XObjectOutputStream.hpp> #include <com/sun/star/report/XReportControlModel.hpp> +#include <com/sun/star/report/XReportDefinition.hpp> #include <com/sun/star/report/XReportEngine.hpp> #include <com/sun/star/report/XSection.hpp> +#include <com/sun/star/sdbc/XConnection.hpp> +#include <com/sun/star/sdbc/XRowSet.hpp> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/util/XModeSelector.hpp> +#include <com/sun/star/util/XNumberFormatter.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> -#include <com/sun/star/embed/XVisualObject.hpp> -#include <cppuhelper/implbase5.hxx> -#include <svtools/transfer.hxx> -#include <svl/lstner.hxx> -#include <svx/svdedtv.hxx> -#include <svx/zoomitem.hxx> -#include "ModuleHelper.hxx" +/** === end UNO includes === **/ -#include <comphelper/uno3.hxx> #include <comphelper/implementationreference.hxx> #include <comphelper/proparrhlp.hxx> #include <comphelper/propertystatecontainer.hxx> +#include <comphelper/uno3.hxx> +#include <cppuhelper/implbase5.hxx> +#include <dbaccess/dbsubcomponentcontroller.hxx> +#include <svl/lstner.hxx> +#include <svtools/transfer.hxx> +#include <svx/svdedtv.hxx> +#include <svx/zoomitem.hxx> -#include "RptDef.hxx" -#include "DesignView.hxx" -#include <functional> +#include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> -#include <com/sun/star/util/XModeSelector.hpp> -#include "ReportControllerObserver.hxx" +#include <functional> class TransferableHelper; class TransferableClipboardListener; class VclWindowEvent; +class SfxUndoManager; namespace rptui { class OGroupsSortingDialog; @@ -79,7 +83,7 @@ namespace rptui class OAddFieldWindow; class OSectionWindow; - typedef ::dbaui::OSingleDocumentController OReportController_BASE; + typedef ::dbaui::DBSubComponentController OReportController_BASE; typedef ::cppu::ImplHelper5 < ::com::sun::star::container::XContainerListener , ::com::sun::star::beans::XPropertyChangeListener , ::com::sun::star::view::XSelectionSupplier @@ -92,6 +96,7 @@ namespace rptui ,public SfxListener ,public ::comphelper::OPropertyStateContainer ,public ::comphelper::OPropertyArrayUsageHelper < OReportController_BASE > + ,public ::boost::noncopyable { private: OModuleClient m_aModuleClient; @@ -107,10 +112,10 @@ namespace rptui OXReportControllerObserver* m_pReportControllerObserver; ODesignView* getDesignView() const { return static_cast< ODesignView* >( getView() ); } - - ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition> m_xReportDefinition; - ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportEngine> m_xReportEngine; - ::com::sun::star::uno::Reference < ::com::sun::star::frame::XComponentLoader> m_xFrameLoader; + + ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition > m_xReportDefinition; + ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportEngine > m_xReportEngine; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XComponentLoader > m_xFrameLoader; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > m_xRowSetMediator; @@ -214,18 +219,23 @@ namespace rptui ,sal_Int32 _nGroupPos ,bool _bShow); - void executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun); - void alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false); + void executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun); + void alignControlsWithUndo(sal_uInt16 _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false); + + // open the help agent of report designer at start time + void doOpenHelpAgent(); + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getXFrame(); + /** shrink a section @param _nUndoStrId the string id of the string which is shown in undo menu @param _nShrinkId ID of what you would like to shrink. */ - protected: void shrinkSectionBottom(::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection); void shrinkSectionTop(::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection); + public: - - void shrinkSection(USHORT _nUndoStrId, ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection, sal_Int32 _nShrinkId); + void shrinkSection(sal_uInt16 _nUndoStrId, ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection, sal_Int32 _nShrinkId); /** opens the file open dialog to allow the user to select a image which will be * bound to a newly created image button. @@ -280,7 +290,7 @@ namespace rptui /** collapse or expand the currently selected section. * - * \param _bCollapse collapse if TRUE otherwise expand + * \param _bCollapse collapse if sal_True otherwise expand */ void collapseSection(const bool _bCollapse); @@ -293,14 +303,11 @@ namespace rptui */ void impl_zoom_nothrow(); - private: - OReportController(OReportController const&); - OReportController& operator =(OReportController const&); - public: - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getXFrame(); + virtual void impl_onModifyChanged(); - // open the help agent of report designer at start time - void doOpenHelpAgent(); + virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager ); + virtual void impl_initialize( ); + bool isUiVisible() const; /** creates a new default control for the currently set type when the modifier KEY_MOD1 was pressed * \param _aArgs must contain a properyvalue with name "KeyModifier" and value KEY_MOD1 when control should be created. @@ -334,16 +341,15 @@ namespace rptui // execute a feature virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); - virtual void losingConnection( ); - virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, ::com::sun::star::uno::Any& _rDefault ) const; virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception); + private: virtual ~OReportController(); + public: OReportController(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context); - DECL_LINK( NotifyUndoActionHdl, SfxUndoAction* ); DECL_LINK( EventLstHdl, VclWindowEvent* ); DECL_LINK( OnCreateHdl, OAddFieldWindow*); @@ -353,12 +359,6 @@ namespace rptui // SfxListener virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint); - virtual void impl_onModifyChanged(); - - // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();} - // need for undo's and redo's - SfxUndoManager* getUndoMgr(); - /** returns <TRUE/> when the command is enbaled @param _nCommand the command id @param _xControlFormat the report control format @@ -456,7 +456,7 @@ namespace rptui * * \return */ - ::boost::shared_ptr<rptui::OReportModel> getSdrModel(); + ::boost::shared_ptr<rptui::OReportModel> getSdrModel() const; inline ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getContext() const { return m_xContext; } inline sal_Int16 getZoomValue() const { return m_nZoomValue; } @@ -478,10 +478,9 @@ namespace rptui ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getColumns() const; ::rtl::OUString getColumnLabel_throw(const ::rtl::OUString& i_sColumnName) const; - private: - virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager ); - virtual void impl_initialize( ); - bool isUiVisible() const; + SfxUndoManager& getUndoManager() const; + void clearUndoManager() const; + void addUndoAction( SfxUndoAction* i_pAction ); }; } #endif // RPTUI_REPORTCONTROLLER_HXX diff --git a/reportdesign/source/ui/inc/ReportRuler.hxx b/reportdesign/source/ui/inc/ReportRuler.hxx index fd78308a5..930d6df43 100644 --- a/reportdesign/source/ui/inc/ReportRuler.hxx +++ b/reportdesign/source/ui/inc/ReportRuler.hxx @@ -56,7 +56,7 @@ namespace rptui * * \param _bVisible when <TRUE/> the grid is made visible */ - void SetGridVisible(BOOL _bVisible); + void SetGridVisible(sal_Bool _bVisible); }; //============================================================================== } // rptui diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx index f7a09c7e1..14293ebe3 100644 --- a/reportdesign/source/ui/inc/ReportSection.hxx +++ b/reportdesign/source/ui/inc/ReportSection.hxx @@ -62,7 +62,7 @@ namespace rptui ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection; DlgEdMode m_eMode; - BOOL m_bDialogModelChanged; + sal_Bool m_bDialogModelChanged; sal_Bool m_bInDrag; /** fills the section with all control from the report section @@ -118,15 +118,15 @@ namespace rptui * * \param _bVisible when <TRUE/> the grid is made visible */ - void SetGridVisible(BOOL _bVisible); + void SetGridVisible(sal_Bool _bVisible); inline OSectionWindow* getSectionWindow() const { return m_pParent; } inline OSectionView& getSectionView() const { return *m_pView; } inline OReportPage* getPage() const { return m_pPage; } inline ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > getSection() const { return m_xSection; } - void SetDialogModelChanged( BOOL bChanged = TRUE ) { m_bDialogModelChanged = bChanged; } - BOOL IsDialogModelChanged() const { return m_bDialogModelChanged; } + void SetDialogModelChanged( sal_Bool bChanged = sal_True ) { m_bDialogModelChanged = bChanged; } + sal_Bool IsDialogModelChanged() const { return m_bDialogModelChanged; } DlgEdMode GetMode() const { return m_eMode; } void SetMode( DlgEdMode m_eMode ); diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx index 573f92023..a53565d96 100644 --- a/reportdesign/source/ui/inc/ReportWindow.hxx +++ b/reportdesign/source/ui/inc/ReportWindow.hxx @@ -87,10 +87,10 @@ namespace rptui inline OScrollWindowHelper* getScrollWindow() const { return m_pParent; } void SetMode( DlgEdMode m_eMode ); - void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); + void SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); rtl::OUString GetInsertObjString() const; - void setGridSnap(BOOL bOn); - void setDragStripes(BOOL bOn); + void setGridSnap(sal_Bool bOn); + void setDragStripes(sal_Bool bOn); /** copies the current selection in this section */ @@ -100,7 +100,7 @@ namespace rptui * * \return <TRUE/> if paste is allowed */ - BOOL IsPasteAllowed() const; + sal_Bool IsPasteAllowed() const; /** paste a new control in this section */ @@ -117,7 +117,7 @@ namespace rptui /** returns <TRUE/> when a object is marked */ - BOOL HasSelection() const; + sal_Bool HasSelection() const; Point getThumbPos() const; @@ -125,7 +125,7 @@ namespace rptui * * \param _nPosition Zero based. */ - void removeSection(USHORT _nPosition); + void removeSection(sal_uInt16 _nPosition); /** adds a new section at position _nPosition. If the section is <NULL/> nothing happens. @@ -133,9 +133,9 @@ namespace rptui */ void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection ,const ::rtl::OUString& _sColorEntry - ,USHORT _nPosition = USHRT_MAX); + ,sal_uInt16 _nPosition = USHRT_MAX); - USHORT getSectionCount() const; + sal_uInt16 getSectionCount() const; /** turns the grid on or off * diff --git a/reportdesign/source/ui/inc/Undo.hxx b/reportdesign/source/ui/inc/RptUndo.hxx index 4e3a35e16..cd0a1ca22 100644 --- a/reportdesign/source/ui/inc/Undo.hxx +++ b/reportdesign/source/ui/inc/RptUndo.hxx @@ -68,7 +68,7 @@ namespace rptui OSectionUndo( OReportModel& rMod ,sal_uInt16 _nSlot ,Action _eAction - ,USHORT nCommentID); + ,sal_uInt16 nCommentID); virtual ~OSectionUndo(); virtual void Undo(); @@ -96,7 +96,7 @@ namespace rptui ,OReportHelper> _pMemberFunction ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReport ,Action _eAction - ,USHORT nCommentID); + ,sal_uInt16 nCommentID); virtual ~OReportSectionUndo(); }; @@ -123,7 +123,7 @@ namespace rptui ,OGroupHelper> _pMemberFunction ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup ,Action _eAction - ,USHORT nCommentID); + ,sal_uInt16 nCommentID); virtual String GetComment() const; }; @@ -143,7 +143,7 @@ namespace rptui public: TYPEINFO(); OGroupUndo(OReportModel& rMod - ,USHORT nCommentID + ,sal_uInt16 nCommentID ,Action _eAction ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReportDefinition); diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx index 8a74946d5..8fb110ac3 100644 --- a/reportdesign/source/ui/inc/ScrollHelper.hxx +++ b/reportdesign/source/ui/inc/ScrollHelper.hxx @@ -100,10 +100,10 @@ namespace rptui // forwards void SetMode( DlgEdMode _eMode ); - void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); + void SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); rtl::OUString GetInsertObjString() const; - void setGridSnap(BOOL bOn); - void setDragStripes(BOOL bOn); + void setGridSnap(sal_Bool bOn); + void setDragStripes(sal_Bool bOn); /** copies the current selection in this section */ void Copy(); @@ -112,7 +112,7 @@ namespace rptui * * \return <TRUE/> if paste is allowed */ - BOOL IsPasteAllowed() const; + sal_Bool IsPasteAllowed() const; /** paste a new control in this section */ @@ -129,13 +129,13 @@ namespace rptui /** returns <TRUE/> when a object is marked */ - BOOL HasSelection() const; + sal_Bool HasSelection() const; /** removes the section at the given position. * * \param _nPosition Zero based. */ - void removeSection(USHORT _nPosition); + void removeSection(sal_uInt16 _nPosition); /** adds a new section at position _nPosition. If the section is <NULL/> nothing happens. @@ -143,9 +143,9 @@ namespace rptui */ void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection ,const ::rtl::OUString& _sColorEntry - ,USHORT _nPosition = USHRT_MAX); + ,sal_uInt16 _nPosition = USHRT_MAX); - USHORT getSectionCount() const; + sal_uInt16 getSectionCount() const; /** turns the grid on or off * diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx index 7acbc96da..0bc99e097 100644 --- a/reportdesign/source/ui/inc/SectionWindow.hxx +++ b/reportdesign/source/ui/inc/SectionWindow.hxx @@ -76,9 +76,9 @@ namespace rptui * \param _nResId * \param _pGetSection * \param _pIsSectionOn - * @return TRUE when title was set otherwise FALSE + * @return sal_True when title was set otherwise FALSE */ - bool setGroupSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup,USHORT _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<sal_Bool, OGroupHelper> _pIsSectionOn); + bool setGroupSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup,sal_uInt16 _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<sal_Bool, OGroupHelper> _pIsSectionOn); /** set the title of the (report/page) header or footer * @@ -86,9 +86,9 @@ namespace rptui * \param _nResId * \param _pGetSection * \param _pIsSectionOn - * @return TRUE when title was set otherwise FALSE + * @return sal_True when title was set otherwise FALSE */ - bool setReportSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReport,USHORT _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<sal_Bool, OReportHelper> _pIsSectionOn); + bool setReportSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReport,sal_uInt16 _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<sal_Bool, OReportHelper> _pIsSectionOn); void ImplInitSettings(); DECL_LINK(Collapsed,OColorListener*); diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx index 49437bc89..4caf7b097 100644 --- a/reportdesign/source/ui/inc/UITools.hxx +++ b/reportdesign/source/ui/inc/UITools.hxx @@ -169,7 +169,7 @@ namespace rptui * * \param pControl the control which should place in the section without overlapping * \param _pReportSection the section - * \param _bInsert TRUE whe the control should be inserted, otherwise not. + * \param _bInsert sal_True whe the control should be inserted, otherwise not. */ void correctOverlapping(SdrObject* pControl,OReportSection& _aReportSection,bool _bInsert = true); diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index fc9f7ba60..23770d8c9 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -93,7 +93,7 @@ namespace rptui public: OWindowPositionCorrector(Window* _pWindow,long _nDeltaX, long _nDeltaY) :m_nDeltaX(_nDeltaX), m_nDeltaY(_nDeltaY) { - USHORT nCount = _pWindow->GetChildCount(); + sal_uInt16 nCount = _pWindow->GetChildCount(); m_aChildren.reserve(nCount); while( nCount ) { @@ -147,7 +147,7 @@ namespace rptui void ImplInitSettings(); /** returns the iterator at pos _nPos or the end() */ - TSectionsMap::iterator getIteratorAtPos(USHORT _nPos); + TSectionsMap::iterator getIteratorAtPos(sal_uInt16 _nPos); void collectRectangles(TRectangleMap& _rMap,bool _bBoundRects); void collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection,bool _bBoundRects,Rectangle& _rBound,Rectangle& _rResize); void impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Point& _rStartPoint,bool _bSet); @@ -182,7 +182,7 @@ namespace rptui * * \param _nPosition Zero based. */ - void removeSection(USHORT _nPosition); + void removeSection(sal_uInt16 _nPosition); /** adds a new section at position _nPosition. If the section is <NULL/> nothing happens. @@ -190,23 +190,23 @@ namespace rptui */ void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection ,const ::rtl::OUString& _sColorEntry - ,USHORT _nPosition = USHRT_MAX); + ,sal_uInt16 _nPosition = USHRT_MAX); - USHORT getSectionCount() const; + sal_uInt16 getSectionCount() const; /** return the section at the given position * * \param _nPos * \return the section at this pos or an empty section */ - ::boost::shared_ptr<OSectionWindow> getSectionWindow(const USHORT _nPos) const; + ::boost::shared_ptr<OSectionWindow> getSectionWindow(const sal_uInt16 _nPos) const; /** turns the grid on or off * * \param _bVisible */ void toggleGrid(sal_Bool _bVisible); - void setGridSnap(BOOL bOn); - void setDragStripes(BOOL bOn); + void setGridSnap(sal_Bool bOn); + void setDragStripes(sal_Bool bOn); /** returns the total accumulated height of all sections until _pSection is reached */ @@ -214,7 +214,7 @@ namespace rptui inline bool empty() const { return m_aSections.empty(); } void SetMode( DlgEdMode m_eMode ); - void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); + void SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); rtl::OUString GetInsertObjString() const; /** copies the current selection in this section */ @@ -224,7 +224,7 @@ namespace rptui * * \return <TRUE/> if paste is allowed */ - BOOL IsPasteAllowed() const; + sal_Bool IsPasteAllowed() const; /** paste a new control in this section */ @@ -241,7 +241,7 @@ namespace rptui /** returns <TRUE/> when a object is marked */ - BOOL HasSelection() const; + sal_Bool HasSelection() const; /** unmark all objects on the views without the given one. * @@ -293,7 +293,7 @@ namespace rptui /** returns the current position in the list */ - USHORT getPosition(const OSectionWindow* _pSectionWindow = NULL) const; + sal_uInt16 getPosition(const OSectionWindow* _pSectionWindow = NULL) const; /** calls on every section BrkAction * @@ -309,12 +309,12 @@ namespace rptui bool isObjectInMyTempList(SdrObject *); public: void BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionView* _pSection); - void EndDragObj(BOOL _bDragIntoNewSection,const OSectionView* _pSection,const Point& _aPnt); + void EndDragObj(sal_Bool _bDragIntoNewSection,const OSectionView* _pSection,const Point& _aPnt); void EndAction(); void ForceMarkedToAnotherPage(); - BOOL IsAction() const; - BOOL IsDragObj() const; + sal_Bool IsAction() const; + sal_Bool IsDragObj() const; void handleKey(const KeyCode& _rCode); void stopScrollTimer(); diff --git a/reportdesign/source/ui/inc/dlgedfunc.hxx b/reportdesign/source/ui/inc/dlgedfunc.hxx index 327c4a78c..b2812d0cb 100644 --- a/reportdesign/source/ui/inc/dlgedfunc.hxx +++ b/reportdesign/source/ui/inc/dlgedfunc.hxx @@ -94,9 +94,9 @@ public: DlgEdFunc( OReportSection* pParent ); virtual ~DlgEdFunc(); - virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); - virtual BOOL MouseButtonUp( const MouseEvent& rMEvt ); - virtual BOOL MouseMove( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); /** checks if the keycode is known by the child windows @param _rCode the keycode @@ -135,9 +135,9 @@ public: DlgEdFuncInsert( OReportSection* pParent ); ~DlgEdFuncInsert(); - virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); - virtual BOOL MouseButtonUp( const MouseEvent& rMEvt ); - virtual BOOL MouseMove( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); }; //============================================================================ @@ -150,11 +150,11 @@ public: DlgEdFuncSelect( OReportSection* pParent ); ~DlgEdFuncSelect(); - virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); - virtual BOOL MouseButtonUp( const MouseEvent& rMEvt ); - virtual BOOL MouseMove( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); - void SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, BOOL bQuickDrag); + void SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, sal_Bool bQuickDrag); }; } diff --git a/reportdesign/source/ui/inc/dlgpage.hxx b/reportdesign/source/ui/inc/dlgpage.hxx index 680452cbb..4a6bbe461 100644 --- a/reportdesign/source/ui/inc/dlgpage.hxx +++ b/reportdesign/source/ui/inc/dlgpage.hxx @@ -46,7 +46,7 @@ private: void operator =(const ORptPageDialog&); public: - ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,USHORT _nPageId); + ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,sal_uInt16 _nPageId); virtual ~ORptPageDialog() {} }; // ============================================================================= diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx index 84d9d8c79..1b41edae7 100644 --- a/reportdesign/source/ui/inc/metadata.hxx +++ b/reportdesign/source/ui/inc/metadata.hxx @@ -63,7 +63,7 @@ namespace rptui // IPropertyInfoService sal_Int32 getPropertyId(const String& _rName) const; String getPropertyTranslation(sal_Int32 _nId) const; - sal_Int32 getPropertyHelpId(sal_Int32 _nId) const; + rtl::OString getPropertyHelpId(sal_Int32 _nId) const; sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const; static void getExcludeProperties(::std::vector< com::sun::star::beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler); @@ -86,7 +86,7 @@ namespace rptui class HelpIdUrl { public: - static ::rtl::OUString getHelpURL( sal_uInt32 _nHelpId ); + static ::rtl::OUString getHelpURL( const rtl::OString& _sHelpId ); }; //======================================================================== diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index b8475fb45..0ed59b0bb 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -52,7 +52,7 @@ #include <com/sun/star/inspection/XNumericControl.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/util/MeasureUnit.hpp> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include "metadata.hxx" #include <vcl/svapp.hxx> #include <osl/mutex.hxx> @@ -279,7 +279,7 @@ inspection::LineDescriptor SAL_CALL DataProviderHandler::describePropertyLine(co switch(nId) { case PROPERTY_ID_CHARTTYPE: - aOut.PrimaryButtonId = UID_RPT_PROP_CHARTTYPE_DLG; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_CHARTTYPE_DLG); aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::TextField , sal_True); aOut.HasPrimaryButton = sal_True; break; @@ -289,7 +289,7 @@ inspection::LineDescriptor SAL_CALL DataProviderHandler::describePropertyLine(co case PROPERTY_ID_MASTERFIELDS: case PROPERTY_ID_DETAILFIELDS: aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::StringListField , sal_False); - aOut.PrimaryButtonId = UID_RPT_PROP_DLG_LINKFIELDS; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_DLG_LINKFIELDS); aOut.HasPrimaryButton = sal_True; break; default: diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx index b82f11071..69c565883 100644 --- a/reportdesign/source/ui/inspection/DefaultInspection.cxx +++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx @@ -38,17 +38,20 @@ #include <rtl/ustrbuf.hxx> #include <tools/debug.hxx> #include "metadata.hxx" +#include <tools/urlobj.hxx> //........................................................................ namespace rptui { //........................................................................ //------------------------------------------------------------------------ - ::rtl::OUString HelpIdUrl::getHelpURL( sal_uInt32 _nHelpId ) + ::rtl::OUString HelpIdUrl::getHelpURL( const rtl::OString& sHelpId ) { ::rtl::OUStringBuffer aBuffer; - aBuffer.appendAscii( "HID:" ); - aBuffer.append( (sal_Int32)_nHelpId ); + ::rtl::OUString aTmp( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 ); + DBG_ASSERT( INetURLObject( aTmp ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" ); + aBuffer.appendAscii( INET_HID_SCHEME ); + aBuffer.append( aTmp.getStr() ); return aBuffer.makeStringAndClear(); } @@ -231,8 +234,8 @@ namespace rptui const struct { const sal_Char* programmaticName; - USHORT uiNameResId; - sal_uInt32 helpId; + sal_uInt16 uiNameResId; + rtl::OString helpId; } aCategories[] = { { "General", RID_STR_PROPPAGE_DEFAULT, HID_RPT_PROPDLG_TAB_GENERAL }, { "Data", RID_STR_PROPPAGE_DATA, HID_RPT_PROPDLG_TAB_DATA }, diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index e4b1c53de..58fdd89aa 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -67,7 +67,7 @@ #include <vcl/msgbox.hxx> #include <vcl/waitobj.hxx> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <vcl/stdtext.hxx> #include "ModuleHelper.hxx" @@ -779,12 +779,12 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const break; case PROPERTY_ID_INITIALFORMULA: case PROPERTY_ID_FORMULA: - aOut.PrimaryButtonId = UID_RPT_PROP_FORMULA; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_FORMULA); aOut.HasPrimaryButton = sal_True; aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::MultiLineTextField , sal_False); break; case PROPERTY_ID_CONDITIONALPRINTEXPRESSION: - aOut.PrimaryButtonId = UID_RPT_PROP_FORMULA; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_FORMULA); aOut.HasPrimaryButton = sal_True; aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::MultiLineTextField , sal_False); break; @@ -799,7 +799,7 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const if ( m_nDataFieldType == DATA_OR_FORMULA ) { - aOut.PrimaryButtonId = UID_RPT_PROP_FORMULA; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_FORMULA); aOut.HasPrimaryButton = sal_True; } @@ -826,12 +826,12 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::ColorListBox, sal_False ); break; case PROPERTY_ID_FONT: - aOut.PrimaryButtonId = UID_RPT_RPT_PROP_DLG_FONT_TYPE; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_RPT_PROP_DLG_FONT_TYPE); aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::TextField, sal_True ); aOut.HasPrimaryButton = sal_True; break; case PROPERTY_ID_AREA: - aOut.PrimaryButtonId = UID_RPT_RPT_PROP_DLG_AREA; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_RPT_PROP_DLG_AREA); aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::TextField, sal_True ); aOut.HasPrimaryButton = sal_True; break; diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx index c923879bc..555e3695b 100644 --- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx +++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/inspection/XNumericControl.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/util/MeasureUnit.hpp> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include "metadata.hxx" //........................................................................ diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx index bc866d9c1..d9ae78cc6 100644 --- a/reportdesign/source/ui/inspection/metadata.cxx +++ b/reportdesign/source/ui/inspection/metadata.cxx @@ -30,7 +30,7 @@ #include <svtools/localresaccess.hxx> #include "com/sun/star/inspection/XPropertyHandler.hpp" #include <tools/debug.hxx> -#include <cppuhelper/extract.hxx> +#include <comphelper/extract.hxx> #include "helpids.hrc" #include "RptResId.hrc" #include "uistrings.hrc" @@ -53,7 +53,7 @@ namespace rptui { String sName; String sTranslation; - sal_uInt32 nHelpId; + rtl::OString sHelpId; sal_Int32 nId; sal_uInt16 nPos; sal_uInt32 nUIFlags; @@ -63,16 +63,16 @@ namespace rptui sal_Int32 _nId, const String& aTranslation, sal_uInt16 nPosId, - sal_uInt32 nHelpId, + const rtl::OString& _sHelpId, sal_uInt32 _nUIFlags); }; //------------------------------------------------------------------------ OPropertyInfoImpl::OPropertyInfoImpl(const ::rtl::OUString& _rName, sal_Int32 _nId, - const String& aString, sal_uInt16 nP, sal_uInt32 nHid, sal_uInt32 _nUIFlags) + const String& aString, sal_uInt16 nP, const rtl::OString& sHid, sal_uInt32 _nUIFlags) :sName(_rName) ,sTranslation(aString) - ,nHelpId(nHid) + ,sHelpId(sHid) ,nId(_nId) ,nPos(nP) ,nUIFlags(_nUIFlags) @@ -194,10 +194,10 @@ namespace rptui } //------------------------------------------------------------------------ - sal_Int32 OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) const + rtl::OString OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) const { const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId); - return (pInfo) ? pInfo->nHelpId : 0; + return (pInfo) ? pInfo->sHelpId : rtl::OString(); } //------------------------------------------------------------------------ @@ -213,7 +213,7 @@ namespace rptui // intialisierung if(!s_pPropertyInfos) getPropertyInfo(); - OPropertyInfoImpl aSearch(_rName, 0L, String(), 0, 0, 0); + OPropertyInfoImpl aSearch(_rName, 0L, String(), 0, "", 0); const OPropertyInfoImpl* pPropInfo = ::std::lower_bound( s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() ); diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx index 0c81a42a5..e0b28e409 100644 --- a/reportdesign/source/ui/misc/FunctionHelper.cxx +++ b/reportdesign/source/ui/misc/FunctionHelper.cxx @@ -199,10 +199,10 @@ xub_StrLen FunctionDescription::getSuppressedArgumentCount() const return sFormula; } // ----------------------------------------------------------------------------- -void FunctionDescription::fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments) const +void FunctionDescription::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const { const sal_Int32 nCount = m_aParameter.getLength(); - for(USHORT i = 0;i < nCount; ++i) + for(sal_uInt16 i = 0;i < nCount; ++i) { _rArguments.push_back(i); } @@ -217,9 +217,9 @@ void FunctionDescription::initArgumentInfo() const return m_xFunctionDescription->getSignature(); } // ----------------------------------------------------------------------------- -long FunctionDescription::getHelpId() const +rtl::OString FunctionDescription::getHelpId() const { - return 0; + return rtl::OString(); } // ----------------------------------------------------------------------------- sal_uInt32 FunctionDescription::getParameterCount() const diff --git a/reportdesign/source/ui/misc/Undo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx index e76b3a9f7..ad94c95a4 100644 --- a/reportdesign/source/ui/misc/Undo.cxx +++ b/reportdesign/source/ui/misc/RptUndo.cxx @@ -27,15 +27,16 @@ ************************************************************************/ #include "precompiled_reportdesign.hxx" -#include "Undo.hxx" +#include "RptUndo.hxx" #include "uistrings.hrc" #include "rptui_slotid.hrc" #include "UITools.hxx" +#include "UndoEnv.hxx" + #include <dbaccess/IController.hxx> #include <com/sun/star/report/XSection.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> -#include "UndoEnv.hxx" #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Size.hpp> #include <svx/unoshape.hxx> @@ -124,7 +125,7 @@ DBG_NAME(rpt_OSectionUndo) OSectionUndo::OSectionUndo(OReportModel& _rMod ,sal_uInt16 _nSlot ,Action _eAction - ,USHORT nCommentID) + ,sal_uInt16 nCommentID) : OCommentUndoAction(_rMod,nCommentID) ,m_eAction(_eAction) ,m_nSlot(_nSlot) @@ -234,7 +235,7 @@ OReportSectionUndo::OReportSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot ,OReportHelper> _pMemberFunction ,const uno::Reference< report::XReportDefinition >& _xReport ,Action _eAction - ,USHORT nCommentID) + ,sal_uInt16 nCommentID) : OSectionUndo(_rMod,_nSlot,_eAction,nCommentID) ,m_aReportHelper(_xReport) ,m_pMemberFunction(_pMemberFunction) @@ -273,7 +274,7 @@ OGroupSectionUndo::OGroupSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot ,OGroupHelper> _pMemberFunction ,const uno::Reference< report::XGroup >& _xGroup ,Action _eAction - ,USHORT nCommentID) + ,sal_uInt16 nCommentID) : OSectionUndo(_rMod,_nSlot,_eAction,nCommentID) ,m_aGroupHelper(_xGroup) ,m_pMemberFunction(_pMemberFunction) @@ -339,7 +340,7 @@ void OGroupSectionUndo::implReRemove( ) TYPEINIT1( OGroupUndo, OCommentUndoAction ); //---------------------------------------------------------------------------- OGroupUndo::OGroupUndo(OReportModel& _rMod - ,USHORT nCommentID + ,sal_uInt16 nCommentID ,Action _eAction ,const uno::Reference< report::XGroup>& _xGroup ,const uno::Reference< report::XReportDefinition >& _xReportDefinition) diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 414065bf8..106f503a8 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -207,7 +207,7 @@ void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32 namespace { // ------------------------------------------------------------------------- - Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, awt::FontDescriptor& _out_rControlFont ,USHORT _nWichFont) + Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, awt::FontDescriptor& _out_rControlFont ,sal_uInt16 _nWichFont) { if ( !_rxReportControlFormat.is() ) throw uno::RuntimeException(); @@ -231,14 +231,14 @@ namespace } // ------------------------------------------------------------------------- - Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,USHORT _nWhich ) + Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,sal_uInt16 _nWhich ) { awt::FontDescriptor aAwtFont; return lcl_getReportControlFont( _rxReportControlFormat, aAwtFont, _nWhich ); } // ------------------------------------------------------------------------- const Font lcl_setFont(const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, - SfxItemSet& _rItemSet,USHORT _nWhich,USHORT _nFont, USHORT _nFontHeight,USHORT _nLanguage,USHORT _nPosture, USHORT _nWeight) + SfxItemSet& _rItemSet,sal_uInt16 _nWhich,sal_uInt16 _nFont, sal_uInt16 _nFontHeight,sal_uInt16 _nLanguage,sal_uInt16 _nPosture, sal_uInt16 _nWeight) { // fill it awt::FontDescriptor aControlFont; @@ -383,7 +383,7 @@ namespace // ------------------------------------------------------------------------- void lcl_initAwtFont( const Font& _rOriginalFont, const SfxItemSet& _rItemSet, awt::FontDescriptor& _out_rAwtFont, - USHORT _nFont, USHORT _nFontHeight,USHORT _nPosture, USHORT _nWeight) + sal_uInt16 _nFont, sal_uInt16 _nFontHeight,sal_uInt16 _nPosture, sal_uInt16 _nWeight) { Font aNewFont( _rOriginalFont ); const SfxPoolItem* pItem( NULL ); @@ -543,7 +543,7 @@ namespace lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::makeAny( pFontItem->GetValue() ) ); } struct Items { - USHORT nWhich; + sal_uInt16 nWhich; ::rtl::OUString sPropertyName; }; const Items pItems[] = { {ITEMID_LANGUAGE,PROPERTY_CHARLOCALE} @@ -666,9 +666,9 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep new SvxPostureItem(ITALIC_NONE,ITEMID_POSTURE), new SvxWeightItem(WEIGHT_NORMAL,ITEMID_WEIGHT), - new SvxShadowedItem(FALSE,ITEMID_SHADOWED), - new SvxWordLineModeItem(FALSE,ITEMID_WORDLINEMODE), - new SvxContourItem(FALSE,ITEMID_CONTOUR), + new SvxShadowedItem(sal_False,ITEMID_SHADOWED), + new SvxWordLineModeItem(sal_False,ITEMID_WORDLINEMODE), + new SvxContourItem(sal_False,ITEMID_CONTOUR), new SvxCrossedOutItem(STRIKEOUT_NONE,ITEMID_CROSSEDOUT), new SvxUnderlineItem(UNDERLINE_NONE,ITEMID_UNDERLINE), @@ -677,15 +677,15 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep new SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED,ITEMID_CASEMAP), new SvxEscapementItem(ITEMID_ESCAPEMENT), new SvxFontListItem(pFontList.get(),ITEMID_FONTLIST), - new SvxAutoKernItem(FALSE,ITEMID_AUTOKERN), + new SvxAutoKernItem(sal_False,ITEMID_AUTOKERN), new SvxColorTableItem(pColorTable.get(),ITEMID_COLOR_TABLE), - new SvxBlinkItem(FALSE,ITEMID_BLINK), + new SvxBlinkItem(sal_False,ITEMID_BLINK), new SvxEmphasisMarkItem(EMPHASISMARK_NONE,ITEMID_EMPHASISMARK), - new SvxTwoLinesItem(TRUE,0,0,ITEMID_TWOLINES), + new SvxTwoLinesItem(sal_True,0,0,ITEMID_TWOLINES), new SvxCharRotateItem(0,sal_False,ITEMID_CHARROTATE), new SvxCharScaleWidthItem(100,ITEMID_CHARSCALE_W), new SvxCharReliefItem(RELIEF_NONE,ITEMID_CHARRELIEF), - new SvxCharHiddenItem(FALSE,ITEMID_CHARHIDDEN), + new SvxCharHiddenItem(sal_False,ITEMID_CHARHIDDEN), new SvxBrushItem(ITEMID_BRUSH), new SvxHorJustifyItem(ITEMID_HORJUSTIFY), new SvxVerJustifyItem(ITEMID_VERJUSTIFY), @@ -706,7 +706,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep OSL_ASSERT((SAL_N_ELEMENTS(pDefaults)) == (SAL_N_ELEMENTS(aItemInfos))); - static USHORT pRanges[] = + static sal_uInt16 pRanges[] = { ITEMID_FONT,ITEMID_WEIGHT_COMPLEX, 0 diff --git a/reportdesign/source/ui/misc/makefile.mk b/reportdesign/source/ui/misc/makefile.mk index b12bafdc7..494b68023 100644 --- a/reportdesign/source/ui/misc/makefile.mk +++ b/reportdesign/source/ui/misc/makefile.mk @@ -44,7 +44,7 @@ VISIBILITY_HIDDEN=TRUE # ... object files ............................ EXCEPTIONSFILES= \ - $(SLO)$/Undo.obj \ + $(SLO)$/RptUndo.obj \ $(SLO)$/ColorListener.obj \ $(SLO)$/UITools.obj \ $(SLO)$/rptuiservices.obj \ diff --git a/reportdesign/source/ui/misc/rptuiservices.cxx b/reportdesign/source/ui/misc/rptuiservices.cxx index 444ae268e..4d40808cd 100644 --- a/reportdesign/source/ui/misc/rptuiservices.cxx +++ b/reportdesign/source/ui/misc/rptuiservices.cxx @@ -82,11 +82,5 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx index 2e863fc18..ecb54f816 100644 --- a/reportdesign/source/ui/misc/statusbarcontroller.cxx +++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx @@ -100,10 +100,10 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen StatusBar* pStatusBar = static_cast<StatusBar*>(VCLUnoHelper::GetWindow(m_xParentWindow)); if ( pStatusBar ) { - const USHORT nCount = pStatusBar->GetItemCount(); - for (USHORT nPos = 0; nPos < nCount; ++nPos) + const sal_uInt16 nCount = pStatusBar->GetItemCount(); + for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos) { - const USHORT nItemId = pStatusBar->GetItemId(nPos); + const sal_uInt16 nItemId = pStatusBar->GetItemId(nPos); if ( pStatusBar->GetItemCommand(nItemId) == String(m_aCommandURL) ) { m_nId = nItemId; diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index 135c4d0dd..f4804c672 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -149,10 +149,10 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent())); if ( pToolBox ) { - const USHORT nCount = pToolBox->GetItemCount(); - for (USHORT nPos = 0; nPos < nCount; ++nPos) + const sal_uInt16 nCount = pToolBox->GetItemCount(); + for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos) { - const USHORT nItemId = pToolBox->GetItemId(nPos); + const sal_uInt16 nItemId = pToolBox->GetItemId(nPos); if ( pToolBox->GetItemCommand(nItemId) == String(m_aCommandURL) ) { m_nToolBoxId = nItemId; @@ -231,9 +231,9 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event sal_Bool bCheckmark = sal_False; //m_pToolbarController->GetToolBox().Enable(Event.IsEnabled); ToolBox& rTb = m_pToolbarController->GetToolBox(); - for ( USHORT i = 0; i < rTb.GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < rTb.GetItemCount(); i++ ) { - USHORT nId = rTb.GetItemId( i ); + sal_uInt16 nId = rTb.GetItemId( i ); if ( nId == 0 ) continue; diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 968154d27..613b016ea 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -114,20 +114,20 @@ public: long nReportSize = GetItemSize( REPORT_ID ); long nTaskPaneSize = GetItemSize( TASKPANE_ID ); - BOOL bMod = FALSE; + sal_Bool bMod = sal_False; if( nReportSize < nReportMinSplitSize ) { nReportSize = nReportMinSplitSize; nTaskPaneSize = 99 - nReportMinSplitSize; - bMod = TRUE; + bMod = sal_True; } else if( nTaskPaneSize < nTaskPaneMinSplitSize ) { nTaskPaneSize = nTaskPaneMinSplitSize; nReportSize = 99 - nTaskPaneMinSplitSize; - bMod = TRUE; + bMod = sal_True; } if( bMod ) @@ -156,12 +156,12 @@ ODesignView::ODesignView( Window* pParent, ,m_eMode( RPTUI_SELECT ) ,m_nCurrentPosition(USHRT_MAX) ,m_eActObj( OBJ_NONE ) - ,m_bFirstDraw(FALSE) + ,m_bFirstDraw(sal_False) ,m_aGridSizeCoarse( 1000, 1000 ) // #i93595# 100TH_MM changed to grid using coarse 1 cm grid ,m_aGridSizeFine( 250, 250 ) // and a 0,25 cm subdivision for better visualisation - ,m_bGridVisible(TRUE) - ,m_bGridSnap(TRUE) - ,m_bDeleted( FALSE ) + ,m_bGridVisible(sal_True) + ,m_bGridSnap(sal_True) + ,m_bDeleted( sal_False ) { DBG_CTOR( rpt_ODesignView,NULL); SetHelpId(UID_RPT_RPT_APP_VIEW); @@ -189,7 +189,7 @@ ODesignView::ODesignView( Window* pParent, ODesignView::~ODesignView() { DBG_DTOR( rpt_ODesignView,NULL); - m_bDeleted = TRUE; + m_bDeleted = sal_True; Hide(); m_aScrollWindow.Hide(); m_aMarkTimer.Stop(); @@ -201,7 +201,7 @@ ODesignView::~ODesignView() } if ( m_pAddField ) { - SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) ); + SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( UID_RPT_RPT_APP_VIEW ) ); aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState(WINDOWSTATE_MASK_ALL).GetBuffer() ) ); notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); ::std::auto_ptr<Window> aTemp2(m_pAddField); @@ -246,6 +246,12 @@ long ODesignView::PreNotify( NotifyEvent& rNEvt ) switch(rNEvt.GetType()) { case EVENT_KEYINPUT: + if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) ) + return 0L; + if ( (m_pAddField && m_pAddField->HasChildPathFocus()) ) + return 0L; + if ( (m_pReportExplorer && m_pReportExplorer->HasChildPathFocus()) ) + return 0L; { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); if ( handleKeyEvent(*pKeyEvent) ) @@ -355,7 +361,7 @@ void ODesignView::SetMode( DlgEdMode _eNewMode ) m_aScrollWindow.SetMode(_eNewMode); } //---------------------------------------------------------------------------- -void ODesignView::SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType ) +void ODesignView::SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType ) { m_eActObj = eObj; m_aScrollWindow.SetInsertObj( eObj,_sShapeType ); @@ -367,7 +373,7 @@ rtl::OUString ODesignView::GetInsertObjString() const } //---------------------------------------------------------------------------- -USHORT ODesignView::GetInsertObj() const +sal_uInt16 ODesignView::GetInsertObj() const { return m_eActObj; } @@ -398,13 +404,13 @@ void ODesignView::Delete() m_aScrollWindow.Delete(); } //---------------------------------------------------------------------------- -BOOL ODesignView::HasSelection() const +sal_Bool ODesignView::HasSelection() const { return m_aScrollWindow.HasSelection(); } //---------------------------------------------------------------------------- -BOOL ODesignView::IsPasteAllowed() const +sal_Bool ODesignView::IsPasteAllowed() const { return m_aScrollWindow.IsPasteAllowed(); } @@ -432,7 +438,7 @@ void ODesignView::toggleGrid(sal_Bool _bGridVisible) m_aScrollWindow.toggleGrid(_bGridVisible); } //---------------------------------------------------------------------------- -USHORT ODesignView::getSectionCount() const +sal_uInt16 ODesignView::getSectionCount() const { return m_aScrollWindow.getSectionCount(); } @@ -442,12 +448,12 @@ void ODesignView::showRuler(sal_Bool _bShow) m_aScrollWindow.showRuler(_bShow); } //---------------------------------------------------------------------------- -void ODesignView::removeSection(USHORT _nPosition) +void ODesignView::removeSection(sal_uInt16 _nPosition) { m_aScrollWindow.removeSection(_nPosition); } //---------------------------------------------------------------------------- -void ODesignView::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,USHORT _nPosition) +void ODesignView::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,sal_uInt16 _nPosition) { m_aScrollWindow.addSection(_xSection,_sColorEntry,_nPosition); } @@ -543,7 +549,7 @@ void ODesignView::showProperties(const uno::Reference< uno::XInterface>& _xRepor } } //----------------------------------------------------------------------------- -BOOL ODesignView::isReportExplorerVisible() const +sal_Bool ODesignView::isReportExplorerVisible() const { return m_pReportExplorer && m_pReportExplorer->IsVisible(); } @@ -564,7 +570,7 @@ void ODesignView::toggleReportExplorer() m_pReportExplorer->Show(!m_pReportExplorer->IsVisible()); } //----------------------------------------------------------------------------- -BOOL ODesignView::isAddFieldVisible() const +sal_Bool ODesignView::isAddFieldVisible() const { return m_pAddField && m_pAddField->IsVisible(); } @@ -591,7 +597,7 @@ void ODesignView::toggleAddField() uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY); m_pAddField = new OAddFieldWindow(this,xSet); m_pAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) ); - SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) ); + SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( UID_RPT_RPT_APP_VIEW ) ); if ( aDlgOpt.Exists() ) m_pAddField->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); m_pAddField->Update(); @@ -729,13 +735,13 @@ void ODesignView::fillControlModelSelection(::std::vector< uno::Reference< uno:: m_aScrollWindow.fillControlModelSelection(_rSelection); } // ----------------------------------------------------------------------------- -void ODesignView::setGridSnap(BOOL bOn) +void ODesignView::setGridSnap(sal_Bool bOn) { m_aScrollWindow.setGridSnap(bOn); } // ----------------------------------------------------------------------------- -void ODesignView::setDragStripes(BOOL bOn) +void ODesignView::setDragStripes(sal_Bool bOn) { m_aScrollWindow.setDragStripes(bOn); } diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index 686bb65da..e0f1e90d3 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -47,7 +47,7 @@ OEndMarker::OEndMarker(Window* _pParent ,const ::rtl::OUString& _sColorEntry) DBG_CTOR( rpt_OEndMarker,NULL); SetUniqueId(HID_RPT_ENDMARKER); ImplInitSettings(); - SetPaintTransparent(TRUE); + SetPaintTransparent(sal_True); } // ----------------------------------------------------------------------------- OEndMarker::~OEndMarker() @@ -69,14 +69,14 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ ) Color aStartColor(m_nColor); aStartColor.IncreaseLuminance(10); - USHORT nHue = 0; - USHORT nSat = 0; - USHORT nBri = 0; + sal_uInt16 nHue = 0; + sal_uInt16 nSat = 0; + sal_uInt16 nBri = 0; aStartColor.RGBtoHSB(nHue, nSat, nBri); nSat += 40; Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri)); Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor); - aGradient.SetSteps(static_cast<USHORT>(aSize.Height())); + aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height())); DrawGradient(PixelToLogic(aPoly) ,aGradient); if ( m_bMarked ) diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx index e7f830eb4..54ae44acc 100644 --- a/reportdesign/source/ui/report/FixedTextColor.cxx +++ b/reportdesign/source/ui/report/FixedTextColor.cxx @@ -179,7 +179,7 @@ namespace rptui if ( xSection.is() ) { OReportPage *pPage = pModel->getPage(xSection); - ULONG nIndex = pPage->getIndexOf(_xFixedText.get()); + sal_uLong nIndex = pPage->getIndexOf(_xFixedText.get()); if (nIndex < pPage->GetObjCount() ) { SdrObject *pObject = pPage->GetObj(nIndex); diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index 61eed84a2..daa449176 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -180,7 +180,7 @@ namespace rptui if ( xSection.is() ) { OReportPage *pPage = pModel->getPage(xSection); - ULONG nIndex = pPage->getIndexOf(_xComponent); + sal_uLong nIndex = pPage->getIndexOf(_xComponent); if (nIndex < pPage->GetObjCount() ) { SdrObject *pObject = pPage->GetObj(nIndex); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 6ebc2deba..a929ba8a8 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -100,6 +100,7 @@ #include <com/sun/star/sdb/SQLContext.hpp> #include <com/sun/star/sdbc/SQLWarning.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/document/XUndoManagerSupplier.hpp> #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> @@ -127,7 +128,7 @@ #include "DesignView.hxx" #include "ModuleHelper.hxx" #include "RptObject.hxx" -#include "Undo.hxx" +#include "RptUndo.hxx" #include "uistrings.hrc" #include "RptDef.hxx" #include "ReportSection.hxx" @@ -153,10 +154,12 @@ #include <toolkit/helper/vclunohelper.hxx> #include "UndoEnv.hxx" #include "InsertFunctions.hxx" +#include "ReportControllerObserver.hxx" #include <boost/mem_fn.hpp> #include <boost/bind.hpp> #include <boost/utility.hpp> +#include <boost/scoped_ptr.hpp> #include <cppuhelper/exc_hlp.hxx> #include <unotools/confignode.hxx> @@ -164,7 +167,7 @@ #include <ReportControllerObserver.hxx> -#define MAX_ROWS_FOR_PREVIEW 50 +#define MAX_ROWS_FOR_PREVIEW 20 using namespace ::com::sun::star; using namespace uno; @@ -247,12 +250,15 @@ void lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs, xReportControlFormat = aMap.getUnpackedValueOrDefault(REPORTCONTROLFORMAT,uno::Reference< report::XReportControlFormat>()); _xWindow = aMap.getUnpackedValueOrDefault(CURRENT_WINDOW,uno::Reference< awt::XWindow>()); } + if ( !xReportControlFormat.is() ) { _pView->fillControlModelSelection(_rControlsFormats); } else + { _rControlsFormats.push_back(xReportControlFormat); + } if ( !_xWindow.is() ) _xWindow = VCLUnoHelper::GetInterface(_pView); @@ -372,14 +378,15 @@ void OReportController::disposing() pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow ) pSectionWindow->getReportSection().deactivateOle(); - getUndoMgr()->Clear(); // clear all undo redo things + clearUndoManager(); if ( m_aReportModel ) listen(false); m_pReportControllerObserver->Clear(); m_pReportControllerObserver->release(); } - catch(uno::Exception&) + catch ( const uno::Exception& ) { + DBG_UNHANDLED_EXCEPTION(); } } @@ -456,8 +463,20 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const break; case SID_REDO: case SID_UNDO: - aReturn = OReportController_BASE::GetState(_nId); - aReturn.bEnabled = aReturn.bEnabled; + { + size_t ( SfxUndoManager::*retrieveCount )( bool const ) const = + ( _nId == SID_UNDO ) ? &SfxUndoManager::GetUndoActionCount : &SfxUndoManager::GetRedoActionCount; + + SfxUndoManager& rUndoManager( getUndoManager() ); + aReturn.bEnabled = ( rUndoManager.*retrieveCount )( ::svl::IUndoManager::TopLevel ) > 0; + if ( aReturn.bEnabled ) + { + // TODO: add "Undo/Redo: prefix" + String ( SfxUndoManager::*retrieveComment )( size_t, bool const ) const = + ( _nId == SID_UNDO ) ? &SfxUndoManager::GetUndoActionComment : &SfxUndoManager::GetRedoActionComment; + aReturn.sTitle = (rUndoManager.*retrieveComment)( 0, ::svl::IUndoManager::TopLevel ); + } + } break; case SID_OBJECT_RESIZING: case SID_OBJECT_SMALLESTWIDTH: @@ -562,7 +581,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_EXPAND_SECTION: case SID_NEXT_MARK: case SID_PREV_MARK: - aReturn.bEnabled = isEditable(); + aReturn.bEnabled = isEditable() && !getDesignView()->isHandleEvent(_nId); break; case SID_SELECT: case SID_SELECT_REPORT: @@ -981,37 +1000,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); - if ( !getView() ) - { - switch(_nId) - { - case SID_RULER: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_bShowRuler; - break; - case SID_HELPLINES_MOVE: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_bHelplinesMove; - break; - case SID_GRID_VISIBLE: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_bGridVisible; - break; - case SID_SHOW_PROPERTYBROWSER: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_bShowProperties; - break; - case SID_PROPERTYBROWSER_LAST_PAGE: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_sLastActivePage; - break; - case SID_SPLIT_POSITION: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_nSplitPos; - break; - } - return; // return without execution - } + sal_Bool bForceBroadcast = sal_False; switch(_nId) { @@ -1051,9 +1040,12 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > case SID_REDO: case SID_UNDO: { - // We would like to know if we are in undo mode const OXUndoEnvironment::OUndoMode aLock( m_aReportModel->GetUndoEnv() ); - OReportController_BASE::Execute( _nId, aArgs ); + sal_Bool ( SfxUndoManager::*doXDo )() = + ( _nId == SID_UNDO ) ? &SfxUndoManager::Undo : &SfxUndoManager::Redo; + + SfxUndoManager& rUndoManager( getUndoManager() ); + (rUndoManager.*doXDo)(); InvalidateAll(); updateFloater(); } @@ -1191,7 +1183,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > uno::Reference< report::XFunctions> xFunctions(xFunction->getParent(),uno::UNO_QUERY_THROW); sal_Int32 nIndex = getPositionInIndexAccess(xFunctions.get(),xFunction); const String sUndoAction = String((ModuleRes(RID_STR_UNDO_REMOVE_FUNCTION))); - UndoManagerListAction aListAction(m_aUndoManager,sUndoAction); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); xFunctions->removeByIndex(nIndex); select(uno::makeAny(xFunctions->getParent())); InvalidateFeature( SID_SAVEDOC ); @@ -1469,19 +1461,16 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > case SID_ATTR_CHAR_POSTURE: case SID_ATTR_CHAR_UNDERLINE: { - ::std::auto_ptr<UndoManagerListAction> pListAction; uno::Reference< awt::XWindow> xWindow; ::std::vector< uno::Reference< uno::XInterface > > aControlsFormats; lcl_getReportControlFormat( aArgs, getDesignView(), xWindow, aControlsFormats ); - bool bMulti = aControlsFormats.size() > 1; + + const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT)); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); + ::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aControlsFormats.begin(); for(; aIter != aControlsFormats.end();++aIter) { - if ( !pListAction.get() && bMulti) - { - const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT)); - pListAction.reset(new UndoManagerListAction(m_aUndoManager,sUndoAction)); - } uno::Reference< report::XReportControlFormat> xReportControlFormat(*aIter,uno::UNO_QUERY); lcl_setFontWPU_nothrow(xReportControlFormat,_nId); } @@ -1545,28 +1534,35 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > break; case SID_CHAR_DLG: { - ::std::auto_ptr<UndoManagerListAction> pListAction; uno::Sequence< beans::NamedValue > aSettings; uno::Reference< awt::XWindow> xWindow; ::std::vector< uno::Reference< uno::XInterface > > aControlsFormats; lcl_getReportControlFormat( aArgs, getDesignView(), xWindow, aControlsFormats ); - ::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aControlsFormats.begin(); - for(; aIter != aControlsFormats.end();++aIter) + + if ( !aControlsFormats.empty() ) { - uno::Reference< report::XReportControlFormat > xFormat(*aIter,uno::UNO_QUERY); - if ( xFormat.is() ) + const String sUndoAction( ModuleRes( RID_STR_UNDO_CHANGEFONT ) ); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); + + ::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aControlsFormats.begin(); + for(; aIter != aControlsFormats.end();++aIter) { - if ( !pListAction.get() ) + uno::Reference< report::XReportControlFormat > xFormat( *aIter, uno::UNO_QUERY ); + if ( !xFormat.is() ) + continue; + + if ( aSettings.getLength() == 0 ) { - const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT)); - pListAction.reset(new UndoManagerListAction(m_aUndoManager,sUndoAction)); - rptui::openCharDialog(xFormat,xWindow,aSettings); + ::rptui::openCharDialog( xFormat, xWindow, aSettings ); + if ( aSettings.getLength() == 0 ) + break; } + applyCharacterSettings( xFormat, aSettings ); } - } - if ( !aControlsFormats.empty() ) + InvalidateAll(); + } } break; case SID_INSERT_GRAPHIC: @@ -1670,6 +1666,7 @@ short OReportController::saveModified() { return RET_NO; } + // ----------------------------------------------------------------------------- void OReportController::impl_initialize( ) { @@ -1686,10 +1683,14 @@ void OReportController::impl_initialize( ) if ( m_xReportDefinition.is() ) { getView()->initialize(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things - getSdrModel(); + + m_aReportModel = reportdesign::OReportDefinition::getSdrModel(m_xReportDefinition); if ( !m_aReportModel ) - throw Exception(); + throw RuntimeException(); + m_aReportModel->attachController( *this ); + + clearUndoManager(); + UndoSuppressor aSuppressUndo( getUndoManager() ); ::comphelper::NamedValueCollection aArgs(getModel()->getArgs()); setMode(aArgs.getOrDefault("Mode", ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal")))); @@ -1766,7 +1767,7 @@ void OReportController::impl_initialize( ) } catch(const SQLException&) { - OSL_ENSURE(sal_False, "OReportController::initialize: caught an exception!"); + DBG_UNHANDLED_EXCEPTION(); } } // ----------------------------------------------------------------------------- @@ -1837,7 +1838,7 @@ sal_Bool SAL_CALL OReportController::suspend(sal_Bool /*_bSuspend*/) throw( Runt // ----------------------------------------------------------------------------- void OReportController::describeSupportedFeatures() { - OSingleDocumentController::describeSupportedFeatures(); + DBSubComponentController::describeSupportedFeatures(); implDescribeSupportedFeature( ".uno:TextDocument", SID_RPT_TEXTDOCUMENT, CommandGroup::APPLICATION ); implDescribeSupportedFeature( ".uno:Spreadsheet", SID_RPT_SPREADSHEET, CommandGroup::APPLICATION ); @@ -2097,18 +2098,13 @@ void OReportController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:ExpandSection", SID_EXPAND_SECTION); } // ----------------------------------------------------------------------------- -SfxUndoManager* OReportController::getUndoMgr() -{ - return &m_aUndoManager; -} -// ----------------------------------------------------------------------------- void OReportController::impl_onModifyChanged() { try { if ( m_xReportDefinition.is() ) m_xReportDefinition->setModified( impl_isModified() ); - OSingleDocumentController::impl_onModifyChanged(); + DBSubComponentController::impl_onModifyChanged(); } catch(uno::Exception) { @@ -2116,14 +2112,6 @@ void OReportController::impl_onModifyChanged() } } // ----------------------------------------------------------------------------- -void OReportController::losingConnection( ) -{ - // let the base class do it's reconnect - OReportController_BASE::losingConnection( ); - - InvalidateAll(); -} -// ----------------------------------------------------------------------------- void OReportController::onLoadedMenu(const Reference< frame::XLayoutManager >& _xLayoutManager) { if ( _xLayoutManager.is() ) @@ -2224,7 +2212,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven { if ( evt.PropertyName.equals( PROPERTY_REPORTHEADERON ) ) { - const USHORT nPosition = m_xReportDefinition->getPageHeaderOn() ? 1 : 0; + const sal_uInt16 nPosition = m_xReportDefinition->getPageHeaderOn() ? 1 : 0; if ( bShow ) { getDesignView()->addSection(m_xReportDefinition->getReportHeader(),DBREPORTHEADER,nPosition); @@ -2237,7 +2225,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven } else if ( evt.PropertyName.equals( PROPERTY_REPORTFOOTERON ) ) { - USHORT nPosition = getDesignView()->getSectionCount(); + sal_uInt16 nPosition = getDesignView()->getSectionCount(); if ( m_xReportDefinition->getPageFooterOn() ) --nPosition; if ( bShow ) @@ -2259,7 +2247,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven } else { - getDesignView()->removeSection(USHORT(0)); + getDesignView()->removeSection(sal_uInt16(0)); } } else if ( evt.PropertyName.equals( PROPERTY_PAGEFOOTERON ) ) @@ -2310,16 +2298,17 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven // ----------------------------------------------------------------------------- void SAL_CALL OReportController::disposing( const lang::EventObject& Source ) throw(uno::RuntimeException) { + // simply disambiguate OReportController_BASE::disposing(Source); } // ----------------------------------------------------------------------------- -USHORT lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>& _xGroups +sal_uInt16 lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>& _xGroups ,sal_Int32 _nGroupPos ,::std::mem_fun_t<sal_Bool,OGroupHelper>&_pGroupMemberFunction) { uno::Reference< report::XGroup> xGroup; - USHORT nNonVisibleGroups = 0; + sal_uInt16 nNonVisibleGroups = 0; sal_Int32 nCount = _xGroups->getCount(); for( sal_Int32 i = 0; i < _nGroupPos && i < nCount; ++i) { @@ -2337,12 +2326,12 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr ::std::mem_fun_t<sal_Bool,OGroupHelper> pMemFun = ::std::mem_fun(&OGroupHelper::getHeaderOn); ::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> pMemFunSection = ::std::mem_fun(&OGroupHelper::getHeader); ::rtl::OUString sColor(DBGROUPHEADER); - USHORT nPosition = 0; + sal_uInt16 nPosition = 0; bool bHandle = false; if ( _sPropName.equals( PROPERTY_HEADERON ) ) { nPosition = m_xReportDefinition->getPageHeaderOn() ? (m_xReportDefinition->getReportHeaderOn() ? 2 : 1) : (m_xReportDefinition->getReportHeaderOn() ? 1 : 0); - nPosition += (static_cast<USHORT>(_nGroupPos) - lcl_getNonVisbleGroupsBefore(m_xReportDefinition->getGroups(),_nGroupPos,pMemFun)); + nPosition += (static_cast<sal_uInt16>(_nGroupPos) - lcl_getNonVisbleGroupsBefore(m_xReportDefinition->getGroups(),_nGroupPos,pMemFun)); bHandle = true; } else if ( _sPropName.equals( PROPERTY_FOOTERON ) ) @@ -2356,7 +2345,7 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr if ( m_xReportDefinition->getReportFooterOn() ) --nPosition; sColor = DBGROUPFOOTER; - nPosition -= (static_cast<USHORT>(_nGroupPos) - lcl_getNonVisbleGroupsBefore(m_xReportDefinition->getGroups(),_nGroupPos,pMemFun)); + nPosition -= (static_cast<sal_uInt16>(_nGroupPos) - lcl_getNonVisbleGroupsBefore(m_xReportDefinition->getGroups(),_nGroupPos,pMemFun)); if ( !_bShow ) --nPosition; bHandle = true; @@ -2380,13 +2369,6 @@ IMPL_LINK( OReportController, OnClipboardChanged, void*, EMPTYARG ) return OnInvalidateClipboard( NULL ); } //------------------------------------------------------------------------------ -IMPL_LINK( OReportController, NotifyUndoActionHdl, SfxUndoAction*, _pUndoAction ) -{ - OSL_ENSURE(_pUndoAction,"UndoAction is NULL!"); - addUndoActionAndInvalidate(_pUndoAction); - return 0L; -} -//------------------------------------------------------------------------------ IMPL_LINK(OReportController, OnInvalidateClipboard, void*, EMPTYARG) { InvalidateFeature(SID_CUT); @@ -2427,10 +2409,10 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ new SfxAllEnumItem(RPTUI_ID_START,PAPER_A4), new SfxAllEnumItem(RPTUI_ID_END,PAPER_E), new SvxBrushItem(ITEMID_BRUSH), - new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<UINT16>(eUserMetric)) + new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<sal_uInt16>(eUserMetric)) }; - static USHORT pRanges[] = + static sal_uInt16 pRanges[] = { RPTUI_ID_LRSPACE,RPTUI_ID_BRUSH, SID_ATTR_METRIC,SID_ATTR_METRIC, @@ -2451,9 +2433,9 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ pDescriptor->Put(SvxSizeItem(RPTUI_ID_SIZE,VCLSize(getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE)))); pDescriptor->Put(SvxLRSpaceItem(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_LEFTMARGIN) ,getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN),0,0,RPTUI_ID_LRSPACE)); - pDescriptor->Put(SvxULSpaceItem(static_cast<USHORT>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_TOPMARGIN)) - ,static_cast<USHORT>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BOTTOMMARGIN)),RPTUI_ID_ULSPACE)); - pDescriptor->Put(SfxUInt16Item(SID_ATTR_METRIC,static_cast<UINT16>(eUserMetric))); + pDescriptor->Put(SvxULSpaceItem(static_cast<sal_uInt16>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_TOPMARGIN)) + ,static_cast<sal_uInt16>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BOTTOMMARGIN)),RPTUI_ID_ULSPACE)); + pDescriptor->Put(SfxUInt16Item(SID_ATTR_METRIC,static_cast<sal_uInt16>(eUserMetric))); uno::Reference< style::XStyle> xPageStyle(getUsedStyle(m_xReportDefinition)); if ( xPageStyle.is() ) @@ -2487,7 +2469,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ { uno::Reference< beans::XPropertySet> xProp(getUsedStyle(m_xReportDefinition),uno::UNO_QUERY_THROW); const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEPAGE)); - UndoManagerListAction aListAction(m_aUndoManager,sUndoAction); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); const SfxPoolItem* pItem = NULL; if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_SIZE,sal_True,&pItem)) { @@ -2537,13 +2519,24 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ delete pDefaults[i]; } + // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OReportController::attachModel(const uno::Reference< frame::XModel > & xModel) throw( uno::RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); - m_xReportDefinition.set(xModel,uno::UNO_QUERY); - return m_xReportDefinition.is(); + + uno::Reference< report::XReportDefinition > xReportDefinition( xModel, UNO_QUERY ); + if ( !xReportDefinition.is() ) + return sal_False; + + uno::Reference< document::XUndoManagerSupplier > xTestSuppUndo( xModel, UNO_QUERY ); + if ( !xTestSuppUndo.is() ) + return sal_False; + + m_xReportDefinition = xReportDefinition; + return sal_True; } + // ----------------------------------------------------------------------------- void OReportController::openSortingAndGroupingDialog() { @@ -2597,19 +2590,19 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi } } // ----------------------------------------------------------------------------- -void OReportController::executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun) +void OReportController::executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun) { const String sUndoAction = String((ModuleRes(_nUndoStrId))); - UndoManagerListAction aListAction(m_aUndoManager,sUndoAction); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); _pMemfun( getDesignView() ); InvalidateFeature( SID_SAVEDOC ); InvalidateFeature( SID_UNDO ); } // ----------------------------------------------------------------------------- -void OReportController::alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection) +void OReportController::alignControlsWithUndo(sal_uInt16 _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection) { const String sUndoAction = String((ModuleRes(_nUndoStrId))); - UndoManagerListAction aListAction(m_aUndoManager,sUndoAction); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); getDesignView()->alignMarkedObjects(_nControlModification,_bAlignAtSection); InvalidateFeature( SID_SAVEDOC ); InvalidateFeature( SID_UNDO ); @@ -2683,12 +2676,12 @@ void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSect _xSection->setHeight(nNewSectionHeight); } -void OReportController::shrinkSection(USHORT _nUndoStrId, uno::Reference<report::XSection> _xSection, sal_Int32 _nSid) +void OReportController::shrinkSection(sal_uInt16 _nUndoStrId, uno::Reference<report::XSection> _xSection, sal_Int32 _nSid) { if ( _xSection.is() ) { const String sUndoAction = String((ModuleRes(_nUndoStrId))); - UndoManagerListAction aListAction(m_aUndoManager,sUndoAction); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); if (_nSid == SID_SECTION_SHRINK) { @@ -2713,35 +2706,38 @@ void OReportController::shrinkSection(USHORT _nUndoStrId, uno::Reference<report: uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); - typedef ::std::pair< ::rtl::OUString,sal_uInt16> TStringIntPair; - const TStringIntPair pViewDataList[] = + + sal_Int32 nCommandIDs[] = { - TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GridVisible")), SID_GRID_VISIBLE) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GridUse")), SID_GRID_USE) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelplinesMove")), SID_HELPLINES_MOVE) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowRuler")), SID_RULER) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlProperties")), SID_SHOW_PROPERTYBROWSER) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LastPropertyBrowserPage")),SID_PROPERTYBROWSER_LAST_PAGE) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SplitPosition")), SID_SPLIT_POSITION) + SID_GRID_VISIBLE, + SID_GRID_USE, + SID_HELPLINES_MOVE, + SID_RULER, + SID_SHOW_PROPERTYBROWSER, + SID_PROPERTYBROWSER_LAST_PAGE, + SID_SPLIT_POSITION }; - uno::Sequence<beans::PropertyValue> aCommandProps(SAL_N_ELEMENTS(pViewDataList)); - beans::PropertyValue* pIter = aCommandProps.getArray(); - beans::PropertyValue* pEnd = pIter + aCommandProps.getLength(); - for (sal_Int32 i = 0; pIter != pEnd; ++pIter,++i) + ::comphelper::NamedValueCollection aCommandProperties; + for ( size_t i=0; i < SAL_N_ELEMENTS(nCommandIDs); ++i ) { - FeatureState aFeatureState = GetState(pViewDataList[i].second); - pIter->Name = pViewDataList[i].first; + const FeatureState aFeatureState = GetState( nCommandIDs[i] ); + + ::rtl::OUString sCommandURL( getURLForId( nCommandIDs[i] ).Main ); + OSL_ENSURE( sCommandURL.indexOfAsciiL( ".uno:", 5 ) == 0, "OReportController::getViewData: illegal command URL!" ); + sCommandURL = sCommandURL.copy( 5 ); + + Any aCommandState; if ( !!aFeatureState.bChecked ) - pIter->Value <<= (*aFeatureState.bChecked) ? sal_True : sal_False; + aCommandState <<= (*aFeatureState.bChecked) ? sal_True : sal_False; else if ( aFeatureState.aValue.hasValue() ) - pIter->Value = aFeatureState.aValue; + aCommandState = aFeatureState.aValue; + aCommandProperties.put( sCommandURL, aCommandState ); } - uno::Sequence<beans::PropertyValue> aProps(1); - aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CommandProperties")); - aProps[0].Value <<= aCommandProps; + ::comphelper::NamedValueCollection aViewData; + aViewData.put( "CommandProperties", aCommandProperties.getPropertyValues() ); if ( getDesignView() ) { @@ -2758,68 +2754,83 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept pCollapsedIter->Name = PROPERTY_SECTION + ::rtl::OUString::valueOf(i); pCollapsedIter->Value <<= static_cast<sal_Int32>(*aIter); } - const sal_Int32 nCount = aProps.getLength(); - aProps.realloc( nCount + 1 ); - aProps[nCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CollapsedSections")); - aProps[nCount].Value <<= aCollapsedSections; + + aViewData.put( "CollapsedSections", aCollapsedSections ); } ::boost::shared_ptr<OSectionWindow> pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow.get() ) { - const sal_Int32 nCount = aProps.getLength(); - aProps.realloc( nCount + 1 ); - aProps[nCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MarkedSection")); - aProps[nCount].Value <<= (sal_Int32)pSectionWindow->getReportSection().getPage()->GetPageNum(); + aViewData.put( "MarkedSection", (sal_Int32)pSectionWindow->getReportSection().getPage()->GetPageNum() ); } } - const sal_Int32 nCount = aProps.getLength(); - aProps.realloc( nCount + 1 ); - aProps[nCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZoomFactor")); - aProps[nCount].Value <<= m_nZoomValue; - return uno::makeAny(aProps); + + aViewData.put( "ZoomFactor", m_nZoomValue ); + return uno::makeAny( aViewData.getPropertyValues() ); } // ----------------------------------------------------------------------------- -void SAL_CALL OReportController::restoreViewData(const uno::Any& Data) throw( uno::RuntimeException ) +void SAL_CALL OReportController::restoreViewData(const uno::Any& i_data) throw( uno::RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); - uno::Sequence<beans::PropertyValue> aProps; - if ( Data >>= aProps ) + + try { - const beans::PropertyValue* pPropsIter = aProps.getConstArray(); - const beans::PropertyValue* pPropsEnd = pPropsIter + aProps.getLength(); - for (sal_Int32 i = 0; pPropsIter != pPropsEnd; ++pPropsIter,++i) + const ::comphelper::NamedValueCollection aViewData( i_data ); + + m_aCollapsedSections = aViewData.getOrDefault( "CollapsedSections", m_aCollapsedSections ); + m_nPageNum = aViewData.getOrDefault( "MarkedSection", m_nPageNum ); + m_nZoomValue = aViewData.getOrDefault( "ZoomFactor", m_nZoomValue ); + // TODO: setting those 3 members is not enough - in theory, restoreViewData can be called when the + // view is fully alive, so we need to reflect those 3 values in the view. + // (At the moment, the method is called only during construction phase) + + + ::comphelper::NamedValueCollection aCommandProperties( aViewData.get( "CommandProperties" ) ); + const ::std::vector< ::rtl::OUString > aCommandNames( aCommandProperties.getNames() ); + + for ( ::std::vector< ::rtl::OUString >::const_iterator commandName = aCommandNames.begin(); + commandName != aCommandNames.end(); + ++commandName + ) { - if ( pPropsIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CommandProperties")) ) + const Any& rCommandValue = aCommandProperties.get( *commandName ); + if ( !rCommandValue.hasValue() ) + continue; + + if ( getView() ) { util::URL aCommand; - uno::Sequence< beans::PropertyValue> aArgs(1); - beans::PropertyValue* pArg = aArgs.getArray(); - pArg->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); - uno::Sequence< beans::PropertyValue> aCommandProps; - if ( pPropsIter->Value >>= aCommandProps ) - { - const beans::PropertyValue* pIter = aCommandProps.getConstArray(); - const beans::PropertyValue* pEnd = pIter + aCommandProps.getLength(); - for (; pIter != pEnd; ++pIter) - { - pArg->Value = pIter->Value; - if ( pArg->Value.hasValue() ) - { - aCommand.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:")) + pIter->Name; - executeUnChecked(aCommand,aArgs); - } - } - } + aCommand.Complete = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ) ) + *commandName; + + Sequence< PropertyValue > aCommandArgs(1); + aCommandArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value" ) ); + aCommandArgs[0].Value = rCommandValue; + + executeUnChecked( aCommand, aCommandArgs ); + } + else + { + if ( commandName->equalsAscii( "ShowRuler" ) ) + OSL_VERIFY( rCommandValue >>= m_bShowRuler ); + else if ( commandName->equalsAscii( "HelplinesMove" ) ) + OSL_VERIFY( rCommandValue >>= m_bHelplinesMove ); + else if ( commandName->equalsAscii( "GridVisible" ) ) + OSL_VERIFY( rCommandValue >>= m_bGridVisible ); + else if ( commandName->equalsAscii( "GridUse" ) ) + OSL_VERIFY( rCommandValue >>= m_bGridUse ); + else if ( commandName->equalsAscii( "ControlProperties" ) ) + OSL_VERIFY( rCommandValue >>= m_bShowProperties ); + else if ( commandName->equalsAscii( "LastPropertyBrowserPage" ) ) + OSL_VERIFY( rCommandValue >>= m_sLastActivePage ); + else if ( commandName->equalsAscii( "SplitPosition" ) ) + OSL_VERIFY( rCommandValue >>= m_nSplitPos ); } - else if ( pPropsIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CollapsedSections")) ) - pPropsIter->Value >>= m_aCollapsedSections; - else if ( pPropsIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MarkedSection")) ) - pPropsIter->Value >>= m_nPageNum; - else if ( pPropsIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ZoomFactor")) ) - pPropsIter->Value >>= m_nZoomValue; } } + catch ( const IllegalArgumentException& e ) + { + DBG_UNHANDLED_EXCEPTION(); + } } // ----------------------------------------------------------------------------- void OReportController::updateFloater() @@ -3030,17 +3041,8 @@ void OReportController::insertGraphic() } } // ----------------------------------------------------------------------------- -::boost::shared_ptr<rptui::OReportModel> OReportController::getSdrModel() +::boost::shared_ptr<rptui::OReportModel> OReportController::getSdrModel() const { - if ( !m_aReportModel ) - { - m_aReportModel = reportdesign::OReportDefinition::getSdrModel(m_xReportDefinition); - if ( m_aReportModel ) - { - m_aReportModel->attachController( *this ); - m_aReportModel->SetNotifyUndoActionHdl(LINK( this, OReportController, NotifyUndoActionHdl )); - } - } return m_aReportModel; } // ----------------------------------------------------------------------------- @@ -3243,7 +3245,7 @@ void OReportController::createDateTime(const Sequence< PropertyValue >& _aArgs) getDesignView()->unmarkAllObjects(NULL); const String sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL)); - UndoManagerListAction aListAction(m_aUndoManager,sUndoAction); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); SequenceAsHashMap aMap(_aArgs); aMap.createItemIfMissing(PROPERTY_FORMATKEY,aMap.getUnpackedValueOrDefault(PROPERTY_FORMATKEYDATE,sal_Int32(0))); @@ -3271,7 +3273,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs getDesignView()->unmarkAllObjects(NULL); const String sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL)); - UndoManagerListAction aListAction(m_aUndoManager,sUndoAction); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); if ( !m_xReportDefinition->getPageHeaderOn() ) { @@ -3315,7 +3317,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) } uno::Reference<report::XSection> xCurrentSection = getDesignView()->getCurrentSection(); - UndoManagerListAction aUndo( *getUndoMgr(), String( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) ); + UndoContext aUndoContext( getUndoManager(), String( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) ); try { @@ -3765,19 +3767,21 @@ void OReportController::switchReportSection(const sal_Int16 _nId) { const OXUndoEnvironment::OUndoEnvLock aLock( m_aReportModel->GetUndoEnv() ); const bool bSwitchOn = !m_xReportDefinition->getReportHeaderOn(); + + ::boost::scoped_ptr< UndoContext > pUndoContext; if ( SID_REPORTHEADERFOOTER == _nId ) { const String sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); - getUndoMgr()->EnterListAction( sUndoAction, String() ); + pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) ); - addUndoActionAndInvalidate(new OReportSectionUndo(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO + addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO ,::std::mem_fun(&OReportHelper::getReportHeader) ,m_xReportDefinition ,bSwitchOn ? Inserted : Removed ,0 )); - addUndoActionAndInvalidate(new OReportSectionUndo(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO + addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO ,::std::mem_fun(&OReportHelper::getReportFooter) ,m_xReportDefinition ,bSwitchOn ? Inserted : Removed @@ -3800,7 +3804,7 @@ void OReportController::switchReportSection(const sal_Int16 _nId) } if ( SID_REPORTHEADERFOOTER == _nId ) - getUndoMgr()->LeaveListAction(); + pUndoContext.reset(); getView()->Resize(); } } @@ -3813,12 +3817,13 @@ void OReportController::switchPageSection(const sal_Int16 _nId) const OXUndoEnvironment::OUndoEnvLock aLock( m_aReportModel->GetUndoEnv() ); const bool bSwitchOn = !m_xReportDefinition->getPageHeaderOn(); + ::boost::scoped_ptr< UndoContext > pUndoContext; if ( SID_PAGEHEADERFOOTER == _nId ) { const String sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); - getUndoMgr()->EnterListAction( sUndoAction, String() ); + pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) ); - addUndoActionAndInvalidate(new OReportSectionUndo(*m_aReportModel + addUndoAction(new OReportSectionUndo(*m_aReportModel ,SID_PAGEHEADER_WITHOUT_UNDO ,::std::mem_fun(&OReportHelper::getPageHeader) ,m_xReportDefinition @@ -3826,7 +3831,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId) ,0 )); - addUndoActionAndInvalidate(new OReportSectionUndo(*m_aReportModel + addUndoAction(new OReportSectionUndo(*m_aReportModel ,SID_PAGEFOOTER_WITHOUT_UNDO ,::std::mem_fun(&OReportHelper::getPageFooter) ,m_xReportDefinition @@ -3848,7 +3853,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId) break; } if ( SID_PAGEHEADERFOOTER == _nId ) - getUndoMgr()->LeaveListAction(); + pUndoContext.reset(); getView()->Resize(); } } @@ -3874,7 +3879,7 @@ void OReportController::modifyGroup(const bool _bAppend, const Sequence< Propert rUndoEnv.AddElement( xGroup->getFunctions() ); } - addUndoActionAndInvalidate( new OGroupUndo( + addUndoAction( new OGroupUndo( *m_aReportModel, _bAppend ? RID_STR_UNDO_APPEND_GROUP : RID_STR_UNDO_REMOVE_GROUP, _bAppend ? Inserted : Removed, @@ -3908,7 +3913,7 @@ void OReportController::createGroupSection(const bool _bUndo,const bool _bHeader { const OXUndoEnvironment::OUndoEnvLock aLock(m_aReportModel->GetUndoEnv()); if ( _bUndo ) - addUndoActionAndInvalidate(new OGroupSectionUndo(*m_aReportModel + addUndoAction(new OGroupSectionUndo(*m_aReportModel ,_bHeader ? SID_GROUPHEADER_WITHOUT_UNDO : SID_GROUPFOOTER_WITHOUT_UNDO ,_bHeader ? ::std::mem_fun(&OGroupHelper::getHeader) : ::std::mem_fun(&OGroupHelper::getFooter) ,xGroup @@ -4161,23 +4166,21 @@ sal_Bool OReportController::isFormatCommandEnabled(sal_uInt16 _nCommand,const un // ----------------------------------------------------------------------------- bool OReportController::impl_setPropertyAtControls_throw(const sal_uInt16 _nUndoResId,const ::rtl::OUString& _sProperty,const uno::Any& _aValue,const Sequence< PropertyValue >& _aArgs) { - ::std::auto_ptr<UndoManagerListAction> pListAction; ::std::vector< uno::Reference< uno::XInterface > > aSelection; uno::Reference< awt::XWindow> xWindow; lcl_getReportControlFormat( _aArgs, getDesignView(), xWindow, aSelection ); - const bool bMultiSet = aSelection.size() > 1; ::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aSelection.begin(); + + const String sUndoAction = String( ModuleRes( _nUndoResId ) ); + UndoContext aUndoContext( getUndoManager(), sUndoAction ); + for(; aIter != aSelection.end();++aIter) { - if ( !pListAction.get() && _nUndoResId && bMultiSet ) - { - const String sUndoAction = String(ModuleRes(_nUndoResId)); - pListAction.reset(new UndoManagerListAction(m_aUndoManager,sUndoAction)); - } const uno::Reference< beans::XPropertySet > xControlModel(*aIter,uno::UNO_QUERY); if ( xControlModel.is() ) xControlModel->setPropertyValue(_sProperty,_aValue); } + return !aSelection.empty(); } // ----------------------------------------------------------------------------- @@ -4215,7 +4218,7 @@ void OReportController::openZoomDialog() { new SvxZoomItem() }; - static USHORT pRanges[] = + static sal_uInt16 pRanges[] = { SID_ATTR_ZOOM,SID_ATTR_ZOOM, 0 @@ -4343,6 +4346,34 @@ uno::Reference< container::XNameAccess > OReportController::getColumns() const } return sLabel; } + // ----------------------------------------------------------------------------- +SfxUndoManager& OReportController::getUndoManager() const +{ + DBG_TESTSOLARMUTEX(); + // this is expected to be called during UI actions, so the SM is assumed to be locked + + ::boost::shared_ptr< OReportModel > pReportModel( getSdrModel() ); + ENSURE_OR_THROW( !!pReportModel, "no access to our model" ); + + SfxUndoManager* pUndoManager( pReportModel->GetSdrUndoManager() ); + ENSURE_OR_THROW( pUndoManager != NULL, "no access to our model's UndoManager" ); + + return *pUndoManager; +} + +// ----------------------------------------------------------------------------- +void OReportController::clearUndoManager() const +{ + getUndoManager().Clear(); +} +// ----------------------------------------------------------------------------- +void OReportController::addUndoAction( SfxUndoAction* i_pAction ) +{ + getUndoManager().AddUndoAction( i_pAction ); + + InvalidateFeature( SID_UNDO ); + InvalidateFeature( SID_REDO ); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ReportRuler.cxx b/reportdesign/source/ui/report/ReportRuler.cxx index a345d0055..80c44c950 100644 --- a/reportdesign/source/ui/report/ReportRuler.cxx +++ b/reportdesign/source/ui/report/ReportRuler.cxx @@ -54,7 +54,7 @@ void OReportRuler::Resize() m_pSection->SetPosSizePixel(Point(0,0),GetOutputSize()); } //------------------------------------------------------------------------------ -void OReportRuler::SetGridVisible(BOOL _bVisible) +void OReportRuler::SetGridVisible(sal_Bool _bVisible) { m_pSection->SetGridVisible( _bVisible ); } diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index fbd722647..b88898867 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -97,7 +97,7 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re ,m_pReportListener(NULL) ,m_xSection(_xSection) ,m_eMode(RPTUI_SELECT) -,m_bDialogModelChanged(FALSE) +,m_bDialogModelChanged(sal_False) ,m_bInDrag(sal_False) { DBG_CTOR( rpt_OReportSection,NULL); @@ -210,7 +210,7 @@ void OReportSection::fill() // without the following call, no grid is painted m_pView->ShowSdrPage( m_pPage ); - m_pView->SetMoveSnapOnlyTopLeft( TRUE ); + m_pView->SetMoveSnapOnlyTopLeft( sal_True ); ODesignView* pDesignView = m_pParent->getViewsWindow()->getView()->getReportView(); // #i93595# Adapted grid to a more coarse grid and subdivisions for better visualisation. This @@ -226,8 +226,8 @@ void OReportSection::fill() m_pView->SetSnapGridWidth(aX, aY); m_pView->SetGridSnap( pDesignView->isGridSnap() ); - m_pView->SetGridFront( FALSE ); - m_pView->SetDragStripes( TRUE ); + m_pView->SetGridFront( sal_False ); + m_pView->SetDragStripes( sal_True ); m_pView->SetPageVisible(); sal_Int32 nColor = m_xSection->getBackColor(); if ( nColor == (sal_Int32)COL_TRANSPARENT ) @@ -242,7 +242,7 @@ void OReportSection::fill() // LLA: TODO // m_pPage->SetUppBorder(-10000); - m_pView->SetDesignMode( TRUE ); + m_pView->SetDesignMode( sal_True ); m_pView->StartListening( *m_pModel ); if ( m_xSection.is() && m_pPage && m_pView ) @@ -364,14 +364,14 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb // insert control models of marked objects into clipboard dialog model const SdrMarkList& rMarkedList = m_pView->GetMarkedObjectList(); - const ULONG nMark = rMarkedList.GetMarkCount(); + const sal_uLong nMark = rMarkedList.GetMarkCount(); ::std::vector< uno::Reference<report::XReportComponent> > aCopies; aCopies.reserve(nMark); SdrUndoFactory& rUndo = m_pView->GetModel()->GetSdrUndoFactory(); - for( ULONG i = nMark; i > 0; ) + for( sal_uLong i = nMark; i > 0; ) { --i; SdrObject* pSdrObject = rMarkedList.GetMark(i)->GetMarkedSdrObj(); @@ -428,7 +428,7 @@ void OReportSection::MouseMove( const MouseEvent& rMEvt ) } //---------------------------------------------------------------------------- -void OReportSection::SetGridVisible(BOOL _bVisible) +void OReportSection::SetGridVisible(sal_Bool _bVisible) { m_pView->SetGridVisible( _bVisible ); } @@ -458,12 +458,12 @@ void lcl_insertMenuItemImages( const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame ) { - const USHORT nCount = rContextMenu.GetItemCount(); - for (USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = rContextMenu.GetItemCount(); + for (sal_uInt16 i = 0; i < nCount; ++i) { if ( MENUITEM_SEPARATOR != rContextMenu.GetItemType(i)) { - const USHORT nId = rContextMenu.GetItemId(i); + const sal_uInt16 nId = rContextMenu.GetItemId(i); PopupMenu* pPopupMenu = rContextMenu.GetPopupMenu( nId ); if ( pPopupMenu ) { @@ -472,7 +472,7 @@ void lcl_insertMenuItemImages( else { const ::rtl::OUString sCommand = rContextMenu.GetItemCommand(nId); - rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,FALSE)); + rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,sal_False)); if ( nId == SID_PAGEHEADERFOOTER ) { String sText = String(ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT)); @@ -506,7 +506,7 @@ void OReportSection::Command( const CommandEvent& _rCEvt ) Point aPos = _rCEvt.GetMousePosPixel(); m_pView->EndAction(); - const USHORT nId = aContextMenu.Execute(this, aPos); + const sal_uInt16 nId = aContextMenu.Execute(this, aPos); if ( nId ) { uno::Sequence< beans::PropertyValue> aArgs; @@ -745,7 +745,7 @@ sal_Int8 OReportSection::AcceptDrop( const AcceptDropEvent& _rEvt ) ) { if (!m_pParent) return DND_ACTION_NONE; - USHORT nCurrentPosition = 0; + sal_uInt16 nCurrentPosition = 0; nCurrentPosition = m_pParent->getViewsWindow()->getPosition(m_pParent); if (_rEvt.mnAction == DND_ACTION_COPY ) { diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index fcb668a0b..41ff6abfd 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -101,7 +101,7 @@ void OReportWindow::initialize() m_aViewsWindow.initialize(); } //---------------------------------------------------------------------------- -void OReportWindow::SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType ) +void OReportWindow::SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType ) { m_aViewsWindow.SetInsertObj( eObj,_sShapeType); } @@ -117,14 +117,14 @@ void OReportWindow::SetMode( DlgEdMode eNewMode ) m_aViewsWindow.SetMode(eNewMode); } //---------------------------------------------------------------------------- -void OReportWindow::removeSection(USHORT _nPosition) +void OReportWindow::removeSection(sal_uInt16 _nPosition) { m_aViewsWindow.removeSection(_nPosition); m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight()); m_aViewsWindow.Invalidate(INVALIDATE_TRANSPARENT); } //---------------------------------------------------------------------------- -void OReportWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,USHORT _nPosition) +void OReportWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,sal_uInt16 _nPosition) { if ( !_xSection.is() ) return; @@ -250,7 +250,7 @@ void OReportWindow::ScrollChildren(const Point& _aThumbPos) m_aViewsWindow.scrollChildren(_aThumbPos); } //---------------------------------------------------------------------------- -USHORT OReportWindow::getSectionCount() const +sal_uInt16 OReportWindow::getSectionCount() const { return m_aViewsWindow.getSectionCount(); } @@ -260,7 +260,7 @@ void OReportWindow::notifySizeChanged() m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight()); } //---------------------------------------------------------------------------- -BOOL OReportWindow::HasSelection() const +sal_Bool OReportWindow::HasSelection() const { return m_aViewsWindow.HasSelection(); } @@ -283,7 +283,7 @@ void OReportWindow::Paste() m_aViewsWindow.Paste(); } //---------------------------------------------------------------------------- -BOOL OReportWindow::IsPasteAllowed() const +sal_Bool OReportWindow::IsPasteAllowed() const { return m_aViewsWindow.IsPasteAllowed(); } @@ -363,13 +363,13 @@ void OReportWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAl m_aViewsWindow.alignMarkedObjects(_nControlModification, _bAlignAtSection, bBoundRects); } // ----------------------------------------------------------------------------- -void OReportWindow::setGridSnap(BOOL bOn) +void OReportWindow::setGridSnap(sal_Bool bOn) { m_aViewsWindow.setGridSnap(bOn); } // ----------------------------------------------------------------------------- -void OReportWindow::setDragStripes(BOOL bOn) +void OReportWindow::setDragStripes(sal_Bool bOn) { m_aViewsWindow.setDragStripes(bOn); } @@ -421,14 +421,14 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const break; case SVX_ZOOM_WHOLEPAGE: { - nZoom = (USHORT)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth()); + nZoom = (sal_uInt16)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth()); MapMode aMap( MAP_100TH_MM ); const Size aHeight = m_aViewsWindow.LogicToPixel(m_aViewsWindow.PixelToLogic(Size(0,GetTotalHeight() + m_aHRuler.GetSizePixel().Height())),aMap); - nZoom = ::std::min(nZoom,(USHORT)(long)Fraction(aSize.Height()*100,aHeight.Height())); + nZoom = ::std::min(nZoom,(sal_uInt16)(long)Fraction(aSize.Height()*100,aHeight.Height())); } break; case SVX_ZOOM_PAGEWIDTH: - nZoom = (USHORT)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth()); + nZoom = (sal_uInt16)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth()); break; default: break; diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 64a8fb498..9acddf5e1 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -203,12 +203,12 @@ IMPL_LINK( OScrollWindowHelper, ScrollHdl, ScrollBar*, /*pScroll*/ ) //------------------------------------------------------------------------------ void OScrollWindowHelper::addSection(const uno::Reference< report::XSection >& _xSection ,const ::rtl::OUString& _sColorEntry - ,USHORT _nPosition) + ,sal_uInt16 _nPosition) { m_aReportWindow.addSection(_xSection,_sColorEntry,_nPosition); } //------------------------------------------------------------------------------ -void OScrollWindowHelper::removeSection(USHORT _nPosition) +void OScrollWindowHelper::removeSection(sal_uInt16 _nPosition) { m_aReportWindow.removeSection(_nPosition); } @@ -218,12 +218,12 @@ void OScrollWindowHelper::toggleGrid(sal_Bool _bVisible) m_aReportWindow.toggleGrid(_bVisible); } //------------------------------------------------------------------------------ -USHORT OScrollWindowHelper::getSectionCount() const +sal_uInt16 OScrollWindowHelper::getSectionCount() const { return m_aReportWindow.getSectionCount(); } //------------------------------------------------------------------------------ -void OScrollWindowHelper::SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType ) +void OScrollWindowHelper::SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType ) { m_aReportWindow.SetInsertObj(eObj,_sShapeType); } @@ -238,7 +238,7 @@ void OScrollWindowHelper::SetMode( DlgEdMode _eNewMode ) m_aReportWindow.SetMode(_eNewMode); } //------------------------------------------------------------------------------ -BOOL OScrollWindowHelper::HasSelection() const +sal_Bool OScrollWindowHelper::HasSelection() const { return m_aReportWindow.HasSelection(); } @@ -258,7 +258,7 @@ void OScrollWindowHelper::Paste() m_aReportWindow.Paste(); } //---------------------------------------------------------------------------- -BOOL OScrollWindowHelper::IsPasteAllowed() const +sal_Bool OScrollWindowHelper::IsPasteAllowed() const { return m_aReportWindow.IsPasteAllowed(); } @@ -379,12 +379,12 @@ void OScrollWindowHelper::_propertyChanged(const beans::PropertyChangeEvent& /*_ m_aReportWindow.notifySizeChanged(); } // ----------------------------------------------------------------------------- -void OScrollWindowHelper::setGridSnap(BOOL bOn) +void OScrollWindowHelper::setGridSnap(sal_Bool bOn) { m_aReportWindow.setGridSnap(bOn); } // ----------------------------------------------------------------------------- -void OScrollWindowHelper::setDragStripes(BOOL bOn) +void OScrollWindowHelper::setDragStripes(sal_Bool bOn) { m_aReportWindow.setDragStripes(bOn); } diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index e90e15ec7..4ee3df033 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -57,7 +57,7 @@ OSectionView::OSectionView( SdrModel* pModel, OReportSection* _pSectionWindow, O SetBufferedOverlayAllowed(true); SetPageBorderVisible(false); SetBordVisible(); - SetQuickTextEditMode(FALSE); + SetQuickTextEditMode(sal_False); } //---------------------------------------------------------------------------- @@ -162,16 +162,16 @@ void OSectionView::ObjectRemovedInAliveMode( const SdrObject* _pObject ) { DBG_CHKTHIS( rpt_OSectionView,NULL); const SdrMarkList& rMarkedList = GetMarkedObjectList(); - const ULONG nMark = rMarkedList.GetMarkCount(); + const sal_uLong nMark = rMarkedList.GetMarkCount(); - for( ULONG i = 0; i < nMark; i++ ) + for( sal_uLong i = 0; i < nMark; i++ ) { SdrObject* pSdrObj = rMarkedList.GetMark(i)->GetMarkedSdrObj(); if (_pObject == pSdrObj) { SdrPageView* pPgView = GetSdrPageView(); BrkAction(); - MarkObj( pSdrObj, pPgView, TRUE ); + MarkObj( pSdrObj, pPgView, sal_True ); break; } } @@ -187,8 +187,8 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo ) BegUndo( ); const SdrMarkList& rMark = GetMarkedObjectList(); - ULONG nCount = rMark.GetMarkCount(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rMark.GetMarkCount(); + for (sal_uLong i=0; i<nCount; i++) { SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj(); if ( pObj->ISA(OCustomShape) ) @@ -218,10 +218,10 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo ) bool OSectionView::OnlyShapesMarked() const { const SdrMarkList& rMark = GetMarkedObjectList(); - const ULONG nCount = rMark.GetMarkCount(); + const sal_uLong nCount = rMark.GetMarkCount(); if ( !nCount ) return false; - ULONG i=0; + sal_uLong i=0; for (; i<nCount; i++) { SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj(); @@ -253,7 +253,7 @@ short OSectionView::GetLayerIdOfMarkedObjects() const { short nRet = SHRT_MAX; const SdrMarkList &rMrkList = GetMarkedObjectList(); - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( nRet == SHRT_MAX ) diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index f7ef23f32..14d3c5a6b 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -110,7 +110,7 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep } _propertyChanged(aEvent); - SetPaintTransparent(TRUE); + SetPaintTransparent(sal_True); } // ----------------------------------------------------------------------------- OSectionWindow::~OSectionWindow() @@ -136,11 +136,11 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) const uno::Reference< report::XSection> xCurrentSection = m_aReportSection.getSection(); if ( _rEvent.PropertyName.equals(PROPERTY_HEIGHT) ) { - m_pParent->getView()->SetUpdateMode(FALSE); + m_pParent->getView()->SetUpdateMode(sal_False); Resize(); m_pParent->getView()->notifySizeChanged(); m_pParent->resize(*this); - m_pParent->getView()->SetUpdateMode(TRUE); + m_pParent->getView()->SetUpdateMode(sal_True); m_aStartMarker.Invalidate(INVALIDATE_NOERASE); m_aEndMarker.Invalidate(INVALIDATE_NOERASE); m_aReportSection.Invalidate(/*INVALIDATE_NOERASE*/); @@ -173,7 +173,7 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) } } // ----------------------------------------------------------------------------- -bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,USHORT _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<sal_Bool,OReportHelper> _pIsSectionOn) +bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,sal_uInt16 _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<sal_Bool,OReportHelper> _pIsSectionOn) { OReportHelper aReportHelper(_xReport); const bool bRet = _pIsSectionOn(&aReportHelper) && _pGetSection(&aReportHelper) == m_aReportSection.getSection(); @@ -186,7 +186,7 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport return bRet; } // ----------------------------------------------------------------------------- -bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,USHORT _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<sal_Bool,OGroupHelper> _pIsSectionOn) +bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,sal_uInt16 _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<sal_Bool,OGroupHelper> _pIsSectionOn) { OGroupHelper aGroupHelper(_xGroup); const bool bRet = _pIsSectionOn(&aGroupHelper) && _pGetSection(&aGroupHelper) == m_aReportSection.getSection() ; @@ -323,14 +323,14 @@ void OSectionWindow::zoom(const Fraction& _aZoom) //----------------------------------------------------------------------------- IMPL_LINK( OSectionWindow, StartSplitHdl, Splitter*, ) { - const String sEmpty(ModuleRes(RID_STR_UNDO_CHANGE_SIZE)); - getViewsWindow()->getView()->getReportView()->getController().getUndoMgr()->EnterListAction(sEmpty,String()); + const String sUndoAction( ModuleRes( RID_STR_UNDO_CHANGE_SIZE ) ); + getViewsWindow()->getView()->getReportView()->getController().getUndoManager().EnterListAction( sUndoAction, String() ); return 0L; } //------------------------------------------------------------------------------ IMPL_LINK( OSectionWindow, EndSplitHdl, Splitter*, ) { - getViewsWindow()->getView()->getReportView()->getController().getUndoMgr()->LeaveListAction(); + getViewsWindow()->getView()->getReportView()->getController().getUndoManager().LeaveListAction(); return 0L; } //----------------------------------------------------------------------------- diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 63d947133..34d2014e7 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -82,7 +82,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol m_aVRuler.SetMargin2(); const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH); - SetPaintTransparent(TRUE); + SetPaintTransparent(sal_True); } // ----------------------------------------------------------------------------- OStartMarker::~OStartMarker() @@ -128,14 +128,14 @@ void OStartMarker::Paint( const Rectangle& rRect ) Color aStartColor(m_nColor); aStartColor.IncreaseLuminance(10); - USHORT nHue = 0; - USHORT nSat = 0; - USHORT nBri = 0; + sal_uInt16 nHue = 0; + sal_uInt16 nSat = 0; + sal_uInt16 nBri = 0; aStartColor.RGBtoHSB(nHue, nSat, nBri); nSat += 40; Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri)); Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor); - aGradient.SetSteps(static_cast<USHORT>(aSize.Height())); + aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height())); DrawGradient(PixelToLogic(aPoly) ,aGradient); } @@ -200,10 +200,10 @@ void OStartMarker::initDefaultNodeImages() Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; m_aImage.SetImage(*pImage); - m_aImage.SetMouseTransparent(TRUE); + m_aImage.SetMouseTransparent(sal_True); m_aImage.SetBackground(); m_aText.SetBackground(); - m_aText.SetMouseTransparent(TRUE); + m_aText.SetMouseTransparent(sal_True); } // ----------------------------------------------------------------------- void OStartMarker::ImplInitSettings() diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index cc005f599..b2601e135 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -186,7 +186,7 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow) ,m_bInUnmark(sal_False) { DBG_CTOR( rpt_OViewsWindow,NULL); - SetPaintTransparent(TRUE); + SetPaintTransparent(sal_True); SetUniqueId(UID_RPT_VIEWSWINDOW); SetMapMode( MapMode( MAP_100TH_MM ) ); m_aColorConfig.AddListener(this); @@ -313,7 +313,7 @@ void OViewsWindow::DataChanged( const DataChangedEvent& rDCEvt ) } } //---------------------------------------------------------------------------- -void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,USHORT _nPosition) +void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,sal_uInt16 _nPosition) { ::boost::shared_ptr<OSectionWindow> pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) ); m_aSections.insert(getIteratorAtPos(_nPosition) , TSectionsMap::value_type(pSectionWindow)); @@ -322,7 +322,7 @@ void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSectio Resize(); } //---------------------------------------------------------------------------- -void OViewsWindow::removeSection(USHORT _nPosition) +void OViewsWindow::removeSection(sal_uInt16 _nPosition) { if ( _nPosition < m_aSections.size() ) { @@ -336,7 +336,7 @@ void OViewsWindow::removeSection(USHORT _nPosition) } } //------------------------------------------------------------------------------ -void OViewsWindow::toggleGrid(BOOL _bVisible) +void OViewsWindow::toggleGrid(sal_Bool _bVisible) { ::std::for_each(m_aSections.begin(),m_aSections.end(), ::o3tl::compose1(::boost::bind(&OReportSection::SetGridVisible,_1,_bVisible),TReportPairHelper())); @@ -356,12 +356,12 @@ sal_Int32 OViewsWindow::getTotalHeight() const return nHeight; } //---------------------------------------------------------------------------- -USHORT OViewsWindow::getSectionCount() const +sal_uInt16 OViewsWindow::getSectionCount() const { - return static_cast<USHORT>(m_aSections.size()); + return static_cast<sal_uInt16>(m_aSections.size()); } //---------------------------------------------------------------------------- -void OViewsWindow::SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType ) +void OViewsWindow::SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType ) { TSectionsMap::iterator aIter = m_aSections.begin(); TSectionsMap::iterator aEnd = m_aSections.end(); @@ -383,7 +383,7 @@ void OViewsWindow::SetMode( DlgEdMode eNewMode ) ::o3tl::compose1(::boost::bind(&OReportSection::SetMode,_1,eNewMode),TReportPairHelper())); } //---------------------------------------------------------------------------- -BOOL OViewsWindow::HasSelection() const +sal_Bool OViewsWindow::HasSelection() const { TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); @@ -509,7 +509,7 @@ void OViewsWindow::markSection(const sal_uInt16 _nPos) m_pParent->setMarked(m_aSections[_nPos]->getReportSection().getSection(),sal_True); } //---------------------------------------------------------------------------- -BOOL OViewsWindow::IsPasteAllowed() const +sal_Bool OViewsWindow::IsPasteAllowed() const { TransferableDataHelper aTransferData( TransferableDataHelper::CreateFromSystemClipboard( const_cast< OViewsWindow* >( this ) ) ); return aTransferData.HasFormat(OReportExchange::getDescriptorFormatId()); @@ -564,7 +564,7 @@ void OViewsWindow::showRuler(sal_Bool _bShow) ::std::for_each(m_aSections.begin(),m_aSections.end(), ::o3tl::compose1(::boost::bind(&OStartMarker::showRuler,_1,_bShow),TStartMarkerHelper())); ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::o3tl::compose1(::boost::bind(&OStartMarker::Window::Invalidate,_1,USHORT(INVALIDATE_NOERASE)),TStartMarkerHelper())); + ::o3tl::compose1(::boost::bind(&OStartMarker::Window::Invalidate, _1, sal_uInt16(INVALIDATE_NOERASE)), TStartMarkerHelper())); } //---------------------------------------------------------------------------- void OViewsWindow::MouseButtonUp( const MouseEvent& rMEvt ) @@ -605,7 +605,7 @@ sal_Bool OViewsWindow::handleKeyEvent(const KeyEvent& _rEvent) return bRet; } //---------------------------------------------------------------------------- -OViewsWindow::TSectionsMap::iterator OViewsWindow::getIteratorAtPos(USHORT _nPos) +OViewsWindow::TSectionsMap::iterator OViewsWindow::getIteratorAtPos(sal_uInt16 _nPos) { TSectionsMap::iterator aRet = m_aSections.end(); if ( _nPos < m_aSections.size() ) @@ -720,7 +720,7 @@ void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles, SdrObjTransformInfoRec aInfo; const SdrObject* pObj = aRectIter->second.first; pObj->TakeObjInfo(aInfo); - BOOL bHasFixed = !aInfo.bMoveAllowed || pObj->IsMoveProtect(); + sal_Bool bHasFixed = !aInfo.bMoveAllowed || pObj->IsMoveProtect(); if ( bHasFixed ) _rBound.Union(aObjRect); else @@ -914,7 +914,7 @@ void OViewsWindow::createDefault() pMarkedSection->getReportSection().createDefault(m_sShapeType); } // ----------------------------------------------------------------------------- -void OViewsWindow::setGridSnap(BOOL bOn) +void OViewsWindow::setGridSnap(sal_Bool bOn) { TSectionsMap::iterator aIter = m_aSections.begin(); TSectionsMap::iterator aEnd = m_aSections.end(); @@ -925,7 +925,7 @@ void OViewsWindow::setGridSnap(BOOL bOn) } } // ----------------------------------------------------------------------------- -void OViewsWindow::setDragStripes(BOOL bOn) +void OViewsWindow::setDragStripes(sal_Bool bOn) { TSectionsMap::iterator aIter = m_aSections.begin(); TSectionsMap::iterator aEnd = m_aSections.end(); @@ -933,11 +933,11 @@ void OViewsWindow::setDragStripes(BOOL bOn) (*aIter)->getReportSection().getSectionView().SetDragStripes(bOn); } // ----------------------------------------------------------------------------- -USHORT OViewsWindow::getPosition(const OSectionWindow* _pSectionWindow) const +sal_uInt16 OViewsWindow::getPosition(const OSectionWindow* _pSectionWindow) const { TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); - USHORT nPosition = 0; + sal_uInt16 nPosition = 0; for (; aIter != aEnd ; ++aIter) { if ( _pSectionWindow == (*aIter).get() ) @@ -949,7 +949,7 @@ USHORT OViewsWindow::getPosition(const OSectionWindow* _pSectionWindow) const return nPosition; } // ----------------------------------------------------------------------------- -::boost::shared_ptr<OSectionWindow> OViewsWindow::getSectionWindow(const USHORT _nPos) const +::boost::shared_ptr<OSectionWindow> OViewsWindow::getSectionWindow(const sal_uInt16 _nPos) const { ::boost::shared_ptr<OSectionWindow> aReturn; @@ -1040,7 +1040,7 @@ void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _ pNewObj->SetLogicRect(_aRect); pNewObj->Move(Size(0, aNewPos.Y())); - BOOL bChanged = rView.GetModel()->IsChanged(); + sal_Bool bChanged = rView.GetModel()->IsChanged(); rReportSection.getPage()->InsertObject(pNewObj); rView.GetModel()->SetChanged(bChanged); m_aBegDragTempList.push_back(pNewObj); @@ -1253,10 +1253,10 @@ void OViewsWindow::EndDragObj_removeInvisibleObjects() } } // ----------------------------------------------------------------------------- -void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSection,const Point& _aPnt) +void OViewsWindow::EndDragObj(sal_Bool _bControlKeyPressed, const OSectionView* _pSection,const Point& _aPnt) { const String sUndoAction = String((ModuleRes(RID_STR_UNDO_CHANGEPOSITION))); - UndoManagerListAction aListAction(*getView()->getReportView()->getController().getUndoMgr(),sUndoAction); + const UndoContext aUndoContext( getView()->getReportView()->getController().getUndoManager(), sUndoAction ); Point aNewPos = _aPnt; OSectionView* pInSection = getSectionRelativeToPosition(_pSection, aNewPos); @@ -1281,7 +1281,7 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe rReportSection.Copy(aAllreadyCopiedObjects,true); } else - pInSection->EndDragObj(FALSE); + pInSection->EndDragObj(sal_False); } if ( aAllreadyCopiedObjects.getLength() ) @@ -1352,7 +1352,7 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe } else { - ::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction( FALSE ) ); + ::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction( sal_False ) ); EndDragObj_removeInvisibleObjects(); } m_aDragDelta = Point(SAL_MAX_INT32, SAL_MAX_INT32); @@ -1431,9 +1431,9 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo } } // ----------------------------------------------------------------------------- -BOOL OViewsWindow::IsAction() const +sal_Bool OViewsWindow::IsAction() const { - BOOL bAction = FALSE; + sal_Bool bAction = sal_False; TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); for (; !bAction && aIter != aEnd; ++aIter) @@ -1441,9 +1441,9 @@ BOOL OViewsWindow::IsAction() const return bAction; } // ----------------------------------------------------------------------------- -BOOL OViewsWindow::IsDragObj() const +sal_Bool OViewsWindow::IsDragObj() const { - BOOL bAction = FALSE; + sal_Bool bAction = sal_False; TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); for (; !bAction && aIter != aEnd; ++aIter) @@ -1463,7 +1463,7 @@ sal_uInt32 OViewsWindow::getMarkedObjectCount() const // ----------------------------------------------------------------------------- void OViewsWindow::handleKey(const KeyCode& _rCode) { - const USHORT nCode = _rCode.GetCode(); + const sal_uInt16 nCode = _rCode.GetCode(); if ( _rCode.IsMod1() ) { // scroll page @@ -1573,13 +1573,13 @@ void OViewsWindow::handleKey(const KeyCode& _rCode) if ( rView.IsDragObj() ) { const bool bWasNoSnap = rDragStat.IsNoSnap(); - const BOOL bWasSnapEnabled = rView.IsSnapEnabled(); + const sal_Bool bWasSnapEnabled = rView.IsSnapEnabled(); // switch snapping off if ( !bWasNoSnap ) - ((SdrDragStat&)rDragStat).SetNoSnap( TRUE ); + ((SdrDragStat&)rDragStat).SetNoSnap( sal_True ); if ( bWasSnapEnabled ) - rView.SetSnapEnabled( FALSE ); + rView.SetSnapEnabled( sal_False ); Rectangle aNewRect; bool bCheck = false; diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 221c9b2c3..9acf262d4 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -174,11 +174,11 @@ DlgEdFunc::~DlgEdFunc() //---------------------------------------------------------------------------- -BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) { m_aMDPos = m_pParent->PixelToLogic( rMEvt.GetPosPixel() ); m_pParent->GrabFocus(); - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; if ( rMEvt.IsLeft() ) { if ( rMEvt.GetClicks() > 1 ) @@ -195,8 +195,8 @@ BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) // SdrViewEvent aVEvt; // m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); // if ( aVEvt.pRootObj && aVEvt.pRootObj->ISA(SdrTextObj) ) - // SetInEditMode(static_cast<SdrTextObj *>(aVEvt.pRootObj),rMEvt, FALSE); - bHandled = TRUE; + // SetInEditMode(static_cast<SdrTextObj *>(aVEvt.pRootObj),rMEvt, sal_False); + bHandled = sal_True; } } else @@ -206,7 +206,7 @@ BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) // if selected object was hit, drag object if ( pHdl!=NULL || m_rView.IsMarkedHit(m_aMDPos) ) { - bHandled = TRUE; + bHandled = sal_True; m_pParent->CaptureMouse(); m_pParent->getSectionWindow()->getViewsWindow()->BegDragObj(m_aMDPos, pHdl,&m_rView); } @@ -223,10 +223,10 @@ BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) else m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); - bHandled = TRUE; + bHandled = sal_True; } else if( !rMEvt.IsLeft() ) - bHandled = TRUE; + bHandled = sal_True; if ( !bHandled ) m_pParent->CaptureMouse(); return bHandled; @@ -234,9 +234,9 @@ BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) //---------------------------------------------------------------------------- -BOOL DlgEdFunc::MouseButtonUp( const MouseEvent& /*rMEvt*/ ) +sal_Bool DlgEdFunc::MouseButtonUp( const MouseEvent& /*rMEvt*/ ) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; m_pParent->getSectionWindow()->getViewsWindow()->stopScrollTimer(); return bHandled; } @@ -245,7 +245,7 @@ void DlgEdFunc::checkTwoCklicks(const MouseEvent& rMEvt) { deactivateOle(); - const USHORT nClicks = rMEvt.GetClicks(); + const sal_uInt16 nClicks = rMEvt.GetClicks(); if ( nClicks == 2 && rMEvt.IsLeft() ) { if ( m_rView.AreObjectsMarked() ) @@ -270,19 +270,19 @@ void DlgEdFunc::stopScrollTimer() } //---------------------------------------------------------------------------- -BOOL DlgEdFunc::MouseMove( const MouseEvent& /*rMEvt*/ ) +sal_Bool DlgEdFunc::MouseMove( const MouseEvent& /*rMEvt*/ ) { - return FALSE; + return sal_False; } //------------------------------------------------------------------------------ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( !m_bUiActive ) { const KeyCode& rCode = _rEvent.GetKeyCode(); - USHORT nCode = rCode.GetCode(); + sal_uInt16 nCode = rCode.GetCode(); switch ( nCode ) { @@ -291,12 +291,12 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) if ( m_pParent->getSectionWindow()->getViewsWindow()->IsAction() ) { m_pParent->getSectionWindow()->getViewsWindow()->BrkAction(); - bReturn = TRUE; + bReturn = sal_True; } else if ( m_rView.IsTextEdit() ) { m_rView.SdrEndTextEdit(); - bReturn = TRUE; + bReturn = sal_True; } else if ( m_rView.AreObjectsMarked() ) { @@ -308,7 +308,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); deactivateOle(true); - bReturn = FALSE; + bReturn = sal_False; } else { @@ -331,7 +331,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) if ( m_rView.AreObjectsMarked() ) m_rView.MakeVisible( m_rView.GetAllMarkedRect(), *m_pParent); - bReturn = TRUE; + bReturn = sal_True; } else if ( rCode.IsMod1() && rCode.IsMod2()) { @@ -348,7 +348,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) m_rView.MakeVisible( aVisRect, *m_pParent); } - bReturn = TRUE; + bReturn = sal_True; } } break; @@ -358,7 +358,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) case KEY_RIGHT: { m_pParent->getSectionWindow()->getViewsWindow()->handleKey(rCode); - bReturn = TRUE; + bReturn = sal_True; } break; case KEY_RETURN: @@ -375,7 +375,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) case KEY_DELETE: if ( !rCode.IsMod1() && !rCode.IsMod2() ) { - bReturn = TRUE; + bReturn = sal_True; break; } // run through @@ -397,7 +397,7 @@ void DlgEdFunc::activateOle(SdrObject* _pObj) { if ( _pObj ) { - const UINT16 nSdrObjKind = _pObj->GetObjIdentifier(); + const sal_uInt16 nSdrObjKind = _pObj->GetObjIdentifier(); // // OLE: activate // @@ -438,8 +438,8 @@ void DlgEdFunc::activateOle(SdrObject* _pObj) void DlgEdFunc::deactivateOle(bool _bSelect) { OLEObjCache& rObjCache = GetSdrGlobalData().GetOLEObjCache(); - const ULONG nCount = rObjCache.Count(); - for(ULONG i = 0 ; i< nCount;++i) + const sal_uLong nCount = rObjCache.Count(); + for(sal_uLong i = 0 ; i< nCount;++i) { SdrOle2Obj* pObj = reinterpret_cast<SdrOle2Obj*>(rObjCache.GetObject(i)); if ( m_pParent->getPage() == pObj->GetPage() ) @@ -658,22 +658,22 @@ bool DlgEdFunc::setMovementPointer(const MouseEvent& rMEvt) DlgEdFuncInsert::DlgEdFuncInsert( OReportSection* _pParent ) : DlgEdFunc( _pParent ) { - m_rView.SetCreateMode( TRUE ); + m_rView.SetCreateMode( sal_True ); } //---------------------------------------------------------------------------- DlgEdFuncInsert::~DlgEdFuncInsert() { - m_rView.SetEditMode( TRUE ); + m_rView.SetEditMode( sal_True ); } //---------------------------------------------------------------------------- -BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) { if ( DlgEdFunc::MouseButtonDown(rMEvt) ) - return TRUE; + return sal_True; SdrViewEvent aVEvt; sal_Int16 nId = m_rView.GetCurrentObjIdentifier(); @@ -685,7 +685,7 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) { // there is an object under the mouse cursor, but not a customshape m_pParent->getSectionWindow()->getViewsWindow()->BrkAction(); - return FALSE; + return sal_False; } if( eHit != SDRHIT_UNMARKEDOBJECT || nId == OBJ_CUSTOMSHAPE) @@ -710,19 +710,19 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) m_pParent->getSectionWindow()->getViewsWindow()->BegMarkObj( m_aMDPos,&m_rView ); } - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) { if ( DlgEdFunc::MouseButtonUp( rMEvt ) ) - return TRUE; + return sal_True; const Point aPos( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) ); - const USHORT nHitLog = USHORT ( m_pParent->PixelToLogic(Size(3,0)).Width() ); + const sal_uInt16 nHitLog = sal_uInt16 ( m_pParent->PixelToLogic(Size(3,0)).Width() ); - BOOL bReturn = TRUE; + sal_Bool bReturn = sal_True; // object creation active? if ( m_rView.IsCreateObj() ) { @@ -730,8 +730,8 @@ BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) { m_pParent->getSectionWindow()->getViewsWindow()->BrkAction(); // BrkAction disables the create mode - m_rView.SetCreateMode( TRUE ); - return TRUE; + m_rView.SetCreateMode( sal_True ); + return sal_True; } m_rView.EndCreateObj(SDRCREATE_FORCEEND); @@ -777,10 +777,10 @@ BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) //---------------------------------------------------------------------------- -BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) { if ( DlgEdFunc::MouseMove(rMEvt ) ) - return TRUE; + return sal_True; Point aPos( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) ); if ( m_rView.IsCreateObj() ) @@ -808,7 +808,7 @@ BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) if ( !bIsSetPoint ) m_pParent->SetPointer( m_rView.GetPreferedPointer( aPos, m_pParent) ); - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- @@ -826,11 +826,11 @@ DlgEdFuncSelect::~DlgEdFuncSelect() //---------------------------------------------------------------------------- -BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) { m_bSelectionMode = false; if ( DlgEdFunc::MouseButtonDown(rMEvt) ) - return TRUE; + return sal_True; SdrViewEvent aVEvt; const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); @@ -867,15 +867,15 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) } } - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) { if ( DlgEdFunc::MouseButtonUp( rMEvt ) ) - return TRUE; + return sal_True; // get view from parent const Point aPnt( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) ); @@ -891,15 +891,15 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) if ( !m_bUiActive ) m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView); m_bSelectionMode = false; - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) { if ( DlgEdFunc::MouseMove(rMEvt ) ) - return TRUE; + return sal_True; Point aPnt( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) ); bool bIsSetPoint = false; @@ -937,7 +937,7 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) unColorizeOverlappedObj(); } - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index b0e2e8890..9f5b6cebf 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -299,7 +299,7 @@ sal_Bool PropBrw::Close() m_pDesignView->getController().executeUnChecked(SID_PROPERTYBROWSER_LAST_PAGE,uno::Sequence< beans::PropertyValue>()); - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- @@ -531,8 +531,8 @@ void PropBrw::Update( OSectionView* pNewView ) uno::Sequence< Reference<uno::XInterface> > aMarkedObjects; OViewsWindow* pViews = m_pView->getReportSection()->getSectionWindow()->getViewsWindow(); - const USHORT nSectionCount = pViews->getSectionCount(); - for (USHORT i = 0; i < nSectionCount; ++i) + const sal_uInt16 nSectionCount = pViews->getSectionCount(); + for (sal_uInt16 i = 0; i < nSectionCount; ++i) { ::boost::shared_ptr<OSectionWindow> pSectionWindow = pViews->getSectionWindow(i); if ( pSectionWindow ) diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src index 52f5fe402..c4c64b83d 100644 --- a/reportdesign/source/ui/report/report.src +++ b/reportdesign/source/ui/report/report.src @@ -32,7 +32,7 @@ #ifndef _SBASLTID_HRC #include <svx/svxids.hrc> #endif - +#include "helpids.hrc" // Dialog Controls --------------------------------------------------------------- @@ -286,7 +286,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_SORTINGANDGROUPING; - HelpId = SID_SORTINGANDGROUPING ; Command = ".uno:DbSortingAndGrouping"; Text [ en-US ] = "Sorting and Grouping..."; }; @@ -297,14 +296,12 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_ATTR_CHAR_COLOR_BACKGROUND; - HelpId = SID_ATTR_CHAR_COLOR_BACKGROUND ; Command = ".uno:DBBackgroundColor"; Text [ en-US ] = "Background Color..."; }; MenuItem { Identifier = SID_RULER; - HelpId = SID_RULER ; Command = ".uno:ShowRuler"; Checkable = TRUE; Text [ en-US ] = "Ruler..."; @@ -312,7 +309,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_GRID_VISIBLE; - HelpId = SID_GRID_VISIBLE ; Command = ".uno:GridVisible"; Checkable = TRUE; Text [ en-US ] = "Grid..."; @@ -324,14 +320,12 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_PAGEHEADERFOOTER; - HelpId = SID_PAGEHEADERFOOTER ; Command = ".uno:PageHeaderFooter"; Checkable = TRUE; }; MenuItem { Identifier = SID_REPORTHEADERFOOTER; - HelpId = SID_REPORTHEADERFOOTER ; Command = ".uno:ReportHeaderFooter"; Checkable = TRUE; }; @@ -342,7 +336,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_ARRANGEMENU ; - HelpID = SID_ARRANGEMENU ; Command = ".uno:ArrangeMenu" ; Text [ en-US ] = "~Arrange" ; SubMenu = Menu @@ -356,13 +349,13 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_FRAME_UP ; - HelpID = SID_FRAME_UP ; + HelpId = ".uno:ObjectForwardOne"; Text [ en-US ] = "Bring ~Forward" ; }; MenuItem { Identifier = SID_FRAME_DOWN ; - HelpID = SID_FRAME_DOWN ; + HelpId = ".uno:ObjectBackOne"; Text [ en-US ] = "Send Back~ward" ; }; MenuItem @@ -431,7 +424,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_RESIZING ; Command = ".uno:ObjectResize" ; - HelpID = SID_OBJECT_RESIZING ; Text [ en-US ] = "~Object Resizing" ; Text [ x-comment ] = " "; SubMenu = Menu @@ -442,7 +434,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_SMALLESTWIDTH ; Command = ".uno:SmallestWidth" ; - HelpID = SID_OBJECT_SMALLESTWIDTH ; Text [ en-US ] = "~Fit to smallest width" ; Text [ x-comment ] = " "; }; @@ -450,7 +441,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_GREATESTWIDTH ; Command = ".uno:GreatestWidth" ; - HelpID = SID_OBJECT_GREATESTWIDTH ; Text [ en-US ] = "~Fit to greatest width" ; Text [ x-comment ] = " "; }; @@ -462,7 +452,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_SMALLESTHEIGHT ; Command = ".uno:SmallestHeight" ; - HelpID = SID_OBJECT_SMALLESTHEIGHT ; Text [ en-US ] = "~Fit to smallest height" ; Text [ x-comment ] = " "; }; @@ -470,7 +459,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_GREATESTHEIGHT ; Command = ".uno:GreatestHeight" ; - HelpID = SID_OBJECT_GREATESTHEIGHT ; Text [ en-US ] = "~Fit to greatest height" ; Text [ x-comment ] = " "; }; @@ -486,7 +474,6 @@ Menu RID_MENU_REPORT { Identifier = SID_SECTION_SHRINK_MENU ; Command = ".uno:SectionShrinkMenu" ; - HelpID = SID_SECTION_SHRINK_MENU ; Text [ en-US ] = "Section" ; Text [ x-comment ] = " "; SubMenu = Menu @@ -497,7 +484,6 @@ Menu RID_MENU_REPORT { Identifier = SID_SECTION_SHRINK ; Command = ".uno:SectionShrink" ; - HelpID = SID_SECTION_SHRINK ; Text [ en-US ] = "Shrink" ; Text [ x-comment ] = " "; }; @@ -505,7 +491,6 @@ Menu RID_MENU_REPORT { Identifier = SID_SECTION_SHRINK_TOP ; Command = ".uno:SectionShrinkTop" ; - HelpID = SID_SECTION_SHRINK_TOP ; Text [ en-US ] = "Shrink from top" ; Text [ x-comment ] = " "; }; @@ -513,7 +498,6 @@ Menu RID_MENU_REPORT { Identifier = SID_SECTION_SHRINK_BOTTOM ; Command = ".uno:SectionShrinkBottom" ; - HelpID = SID_SECTION_SHRINK_BOTTOM ; Text [ en-US ] = "Shrink from bottom" ; Text [ x-comment ] = " "; }; @@ -527,7 +511,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_DISTRIBUTION; - HelpId = SID_DISTRIBUTION ; Command = ".uno:Distribution"; Text [ en-US ] = "Distribution..." ; }; @@ -538,7 +521,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_SHOW_PROPERTYBROWSER; - HelpId = SID_SHOW_PROPERTYBROWSER ; Command = ".uno:FormProperties"; Text [ en-US ] = "Properties..."; }; |