summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-17 16:09:38 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-17 16:09:38 +0100
commit41bc9ff8d750b4af10d20a36539c57da14695dcf (patch)
treedc2ee437c54daba12ac442fd0e10baf97eadf184 /reportdesign
parentf6ccb8354a350fce31f8c6c7d04b86d5c0a126d1 (diff)
parente35c56815d43a06c53488e3efa35f062a6a2d60c (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: dbaccess/source/core/misc/services.cxx dbaccess/source/filter/migration/cfgimport.cxx reportdesign/source/core/api/ReportDefinition.cxx
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/inc/ModuleHelper.hxx2
-rwxr-xr-x[-rw-r--r--]reportdesign/inc/ReportDefinition.hxx77
-rw-r--r--reportdesign/inc/RptDef.hxx18
-rw-r--r--reportdesign/inc/RptModel.hxx10
-rw-r--r--reportdesign/inc/RptObject.hxx20
-rw-r--r--reportdesign/inc/RptPage.hxx6
-rw-r--r--reportdesign/inc/UndoActions.hxx60
-rw-r--r--reportdesign/inc/helpids.hrc174
-rw-r--r--reportdesign/prj/build.lst5
-rw-r--r--reportdesign/prj/d.lst3
-rw-r--r--reportdesign/qa/complex/reportdesign/FileURL.java62
-rw-r--r--reportdesign/qa/complex/reportdesign/ReportDesignerTest.java (renamed from reportdesign/qa/complex/ReportDesignerTest.java)343
-rw-r--r--reportdesign/qa/complex/reportdesign/TestDocument.java41
-rwxr-xr-xreportdesign/qa/complex/reportdesign/makefile.mk (renamed from reportdesign/qa/complex/makefile.mk)44
-rw-r--r--reportdesign/qa/complex/reportdesign/mysql-connector-exists.pl (renamed from reportdesign/qa/complex/mysql-connector-exists.pl)0
-rwxr-xr-xreportdesign/qa/complex/reportdesign/runner.props (renamed from reportdesign/qa/complex/runner.props)0
-rwxr-xr-xreportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb (renamed from reportdesign/qa/complex/RPTCalcTests.odb)bin6715 -> 6715 bytes
-rwxr-xr-xreportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb (renamed from reportdesign/qa/complex/RPTWriterTests.odb)bin5886 -> 5762 bytes
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx175
-rw-r--r--reportdesign/source/core/api/services.cxx6
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx2
-rw-r--r--reportdesign/source/core/sdr/ReportUndoFactory.cxx10
-rw-r--r--reportdesign/source/core/sdr/RptModel.cxx8
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx22
-rw-r--r--reportdesign/source/core/sdr/RptPage.cxx16
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx10
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx133
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExport.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlservices.cxx8
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx34
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx10
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx26
-rw-r--r--reportdesign/source/ui/dlg/Condition.hxx2
-rw-r--r--reportdesign/source/ui/dlg/DateTime.src4
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx14
-rw-r--r--reportdesign/source/ui/dlg/GroupExchange.cxx2
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx91
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.src6
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx34
-rw-r--r--reportdesign/source/ui/dlg/Navigator.src5
-rw-r--r--reportdesign/source/ui/dlg/PageNumber.src6
-rw-r--r--reportdesign/source/ui/dlg/dlgpage.cxx2
-rw-r--r--reportdesign/source/ui/inc/CondFormat.hxx4
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx36
-rw-r--r--reportdesign/source/ui/inc/Formula.hxx8
-rw-r--r--reportdesign/source/ui/inc/FunctionHelper.hxx4
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx2
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx4
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx109
-rw-r--r--reportdesign/source/ui/inc/ReportRuler.hxx2
-rw-r--r--reportdesign/source/ui/inc/ReportSection.hxx8
-rw-r--r--reportdesign/source/ui/inc/ReportWindow.hxx16
-rw-r--r--reportdesign/source/ui/inc/RptUndo.hxx (renamed from reportdesign/source/ui/inc/Undo.hxx)8
-rw-r--r--reportdesign/source/ui/inc/ScrollHelper.hxx16
-rw-r--r--reportdesign/source/ui/inc/SectionWindow.hxx8
-rw-r--r--reportdesign/source/ui/inc/UITools.hxx2
-rw-r--r--reportdesign/source/ui/inc/ViewsWindow.hxx30
-rw-r--r--reportdesign/source/ui/inc/dlgedfunc.hxx20
-rw-r--r--reportdesign/source/ui/inc/dlgpage.hxx2
-rw-r--r--reportdesign/source/ui/inc/metadata.hxx4
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx6
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx13
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx12
-rw-r--r--reportdesign/source/ui/inspection/ReportComponentHandler.cxx2
-rw-r--r--reportdesign/source/ui/inspection/metadata.cxx16
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx8
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx (renamed from reportdesign/source/ui/misc/Undo.cxx)13
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx26
-rw-r--r--reportdesign/source/ui/misc/makefile.mk2
-rw-r--r--reportdesign/source/ui/misc/rptuiservices.cxx8
-rw-r--r--reportdesign/source/ui/misc/statusbarcontroller.cxx6
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx10
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx48
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx10
-rw-r--r--reportdesign/source/ui/report/FixedTextColor.cxx2
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx435
-rw-r--r--reportdesign/source/ui/report/ReportRuler.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx28
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx22
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx16
-rw-r--r--reportdesign/source/ui/report/SectionView.cxx18
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx16
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx14
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx60
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx96
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx6
-rw-r--r--reportdesign/source/ui/report/report.src24
-rw-r--r--reportdesign/util/hidother.src22
-rw-r--r--reportdesign/util/makefile.mk20
-rw-r--r--reportdesign/util/rpt.component58
-rw-r--r--reportdesign/util/rptui.component52
-rw-r--r--reportdesign/util/rptxml.component73
96 files changed, 1725 insertions, 1205 deletions
diff --git a/reportdesign/inc/ModuleHelper.hxx b/reportdesign/inc/ModuleHelper.hxx
index cf3ccafded7d..b3ed01738b36 100644
--- a/reportdesign/inc/ModuleHelper.hxx
+++ b/reportdesign/inc/ModuleHelper.hxx
@@ -90,7 +90,7 @@ namespace rptui
class REPORTDESIGN_DLLPUBLIC ModuleRes : public ::ResId
{
public:
- inline ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { }
+ inline ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { }
};
//.........................................................................
} // namespace rptui
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index 79582a215b3f..70a771746b24 100644..100755
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -30,25 +30,36 @@
#define REPORTDESIGN_API_REPORTDEFINITION_HXX
#include "dllapi.h"
-#include <com/sun/star/report/XReportDefinition.hpp>
-#include <cppuhelper/compbase12.hxx>
-#include <cppuhelper/basemutex.hxx>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
+
+#include "ReportHelperDefines.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/datatransfer/XTransferable.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XUndoManagerSupplier.hpp>
+#include <com/sun/star/frame/XModule.hpp>
#include <com/sun/star/frame/XTitle.hpp>
#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
#include <com/sun/star/frame/XUntitledNumbers.hpp>
-#include <com/sun/star/frame/XModule.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#include <com/sun/star/datatransfer/XTransferable.hpp>
-#include <cppuhelper/propertysetmixin.hxx>
-#include <comphelper/uno3.hxx>
+/** === end UNO includes === **/
+
#include <comphelper/embeddedobjectcontainer.hxx>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/propertysetmixin.hxx>
#include <svx/unomod.hxx>
-#include "ReportHelperDefines.hxx"
+#if !defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13)
+#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13
+#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 13
+#include <comphelper/implbase_var.hxx>
+#endif
+
#include <boost/shared_ptr.hpp>
@@ -63,32 +74,37 @@ namespace comphelper
namespace reportdesign
{
class OReportComponentProperties;
- typedef ::cppu::WeakComponentImplHelper12< com::sun::star::report::XReportDefinition
- ,com::sun::star::document::XEventBroadcaster
- ,com::sun::star::lang::XServiceInfo
- ,com::sun::star::frame::XModule
- ,com::sun::star::lang::XUnoTunnel
- ,com::sun::star::util::XNumberFormatsSupplier
- ,::com::sun::star::frame::XTitle
- ,::com::sun::star::frame::XTitleChangeBroadcaster
- ,::com::sun::star::frame::XUntitledNumbers
- ,::com::sun::star::document::XDocumentPropertiesSupplier
- ,::com::sun::star::datatransfer::XTransferable
- ,SvxUnoDrawMSFactory> ReportDefinitionBase;
- typedef ::cppu::PropertySetMixin<com::sun::star::report::XReportDefinition> ReportDefinitionPropertySet;
+ typedef ::comphelper::WeakComponentImplHelper13 < ::com::sun::star::report::XReportDefinition
+ , ::com::sun::star::document::XEventBroadcaster
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::frame::XModule
+ , ::com::sun::star::lang::XUnoTunnel
+ , ::com::sun::star::util::XNumberFormatsSupplier
+ , ::com::sun::star::frame::XTitle
+ , ::com::sun::star::frame::XTitleChangeBroadcaster
+ , ::com::sun::star::frame::XUntitledNumbers
+ , ::com::sun::star::document::XDocumentPropertiesSupplier
+ , ::com::sun::star::datatransfer::XTransferable
+ , ::com::sun::star::document::XUndoManagerSupplier
+ , SvxUnoDrawMSFactory
+ > ReportDefinitionBase;
+
+ typedef ::cppu::PropertySetMixin< ::com::sun::star::report::XReportDefinition > ReportDefinitionPropertySet;
struct OReportDefinitionImpl;
/** \class OReportDefinition Defines the implementation of a \interface com:::sun::star::report::XReportDefinition
* \ingroup reportdesign_api
*
*/
- class REPORTDESIGN_DLLPUBLIC OReportDefinition : public ::cppu::BaseMutex,
- public ReportDefinitionBase,
- public ReportDefinitionPropertySet,
- public ::comphelper::IEmbeddedHelper
+ class REPORTDESIGN_DLLPUBLIC OReportDefinition :public ::cppu::BaseMutex
+ ,public ReportDefinitionBase
+ ,public ReportDefinitionPropertySet
+ ,public ::comphelper::IEmbeddedHelper
{
+ private:
::boost::shared_ptr<OReportComponentProperties> m_aProps;
::boost::shared_ptr<OReportDefinitionImpl> m_pImpl;
+
private:
OReportDefinition(const OReportDefinition&);
OReportDefinition& operator=(const OReportDefinition&);
@@ -381,6 +397,9 @@ namespace reportdesign
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) throw (::com::sun::star::uno::RuntimeException);
+ // XUndoManagerSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > SAL_CALL getUndoManager( ) throw (::com::sun::star::uno::RuntimeException);
+
// comphelper::IEmbeddedHelper
virtual com::sun::star::uno::Reference < com::sun::star::embed::XStorage > getStorage() const;
virtual ::comphelper::EmbeddedObjectContainer& getEmbeddedObjectContainer() const;
diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx
index 2e86a5d80e04..c3bbd9cd1edc 100644
--- a/reportdesign/inc/RptDef.hxx
+++ b/reportdesign/inc/RptDef.hxx
@@ -51,18 +51,18 @@ namespace rptui
#define RPT_LAYER_HIDDEN 2
-const UINT32 ReportInventor = UINT32('R')*0x00000001+
- UINT32('P')*0x00000100+
- UINT32('T')*0x00010000+
- UINT32('1')*0x01000000;
+const sal_uInt32 ReportInventor = sal_uInt32('R')*0x00000001+
+ sal_uInt32('P')*0x00000100+
+ sal_uInt32('T')*0x00010000+
+ sal_uInt32('1')*0x01000000;
-#define OBJ_DLG_FIXEDTEXT ((UINT16) OBJ_MAXI + 1)
+#define OBJ_DLG_FIXEDTEXT ((sal_uInt16) OBJ_MAXI + 1)
#define OBJ_DLG_IMAGECONTROL OBJ_FM_IMAGECONTROL
-#define OBJ_DLG_FORMATTEDFIELD ((UINT16) OBJ_MAXI + 3)
-#define OBJ_DLG_HFIXEDLINE ((UINT16) OBJ_MAXI + 4)
-#define OBJ_DLG_VFIXEDLINE ((UINT16) OBJ_MAXI + 5)
-#define OBJ_DLG_SUBREPORT ((UINT16) OBJ_MAXI + 6)
+#define OBJ_DLG_FORMATTEDFIELD ((sal_uInt16) OBJ_MAXI + 3)
+#define OBJ_DLG_HFIXEDLINE ((sal_uInt16) OBJ_MAXI + 4)
+#define OBJ_DLG_VFIXEDLINE ((sal_uInt16) OBJ_MAXI + 5)
+#define OBJ_DLG_SUBREPORT ((sal_uInt16) OBJ_MAXI + 6)
// allows the alignment and resizing of controls
namespace ControlModification
diff --git a/reportdesign/inc/RptModel.hxx b/reportdesign/inc/RptModel.hxx
index 544e1a6e251e..8ee243b8273d 100644
--- a/reportdesign/inc/RptModel.hxx
+++ b/reportdesign/inc/RptModel.hxx
@@ -36,7 +36,7 @@
class Window;
namespace dbaui
{
- class OSingleDocumentController;
+ class DBSubComponentController;
}
namespace reportdesign
{
@@ -57,7 +57,7 @@ class REPORTDESIGN_DLLPUBLIC OReportModel : public SdrModel
private:
OXUndoEnvironment* m_pUndoEnv;
- ::dbaui::OSingleDocumentController* m_pController;
+ ::dbaui::DBSubComponentController* m_pController;
::reportdesign::OReportDefinition* m_pReportDefinition;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
@@ -73,15 +73,15 @@ public:
virtual void SetChanged(sal_Bool bFlg = sal_True);
virtual SdrPage* AllocPage(bool bMasterPage);
virtual Window* GetCurDocViewWin();
- virtual SdrPage* RemovePage(USHORT nPgNum);
+ virtual SdrPage* RemovePage(sal_uInt16 nPgNum);
/** returns the numbering type that is used to format page fields in drawing shapes */
virtual SvxNumType GetPageNumType() const;
OXUndoEnvironment& GetUndoEnv();
void SetModified(sal_Bool _bModified);
- inline dbaui::OSingleDocumentController* getController() const { return m_pController; }
- inline void attachController( dbaui::OSingleDocumentController& _rController ) { m_pController = &_rController; }
+ inline dbaui::DBSubComponentController* getController() const { return m_pController; }
+ inline void attachController( dbaui::DBSubComponentController& _rController ) { m_pController = &_rController; }
void detachController();
OReportPage* createNewPage(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index 0b16890ef982..44fa0a49c169 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -176,8 +176,8 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getAwtComponent();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape();
- virtual UINT16 GetObjIdentifier() const;
- virtual UINT32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+ virtual sal_uInt32 GetObjInventor() const;
};
//============================================================================
@@ -188,17 +188,17 @@ class REPORTDESIGN_DLLPUBLIC OOle2Obj: public SdrOle2Obj , public OObjectBase
friend class OReportPage;
friend class DlgEdFactory;
- UINT16 m_nType;
+ sal_uInt16 m_nType;
bool m_bOnlyOnce;
void impl_createDataProvider_nothrow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& _xModel);
public:
- static OOle2Obj* Create( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent,UINT16 _nType )
+ static OOle2Obj* Create( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent,sal_uInt16 _nType )
{
return new OOle2Obj( _xComponent,_nType );
}
protected:
- OOle2Obj(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent,UINT16 _nType);
- OOle2Obj(const ::rtl::OUString& _sComponentName,UINT16 _nType);
+ OOle2Obj(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent,sal_uInt16 _nType);
+ OOle2Obj(const ::rtl::OUString& _sComponentName,sal_uInt16 _nType);
virtual void NbcMove( const Size& rSize );
@@ -218,8 +218,8 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getAwtComponent();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape();
- virtual UINT16 GetObjIdentifier() const;
- virtual UINT32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+ virtual sal_uInt32 GetObjInventor() const;
// Clone() soll eine komplette Kopie des Objektes erzeugen.
virtual SdrObject* Clone() const;
virtual void initializeOle();
@@ -271,8 +271,8 @@ public:
static ::rtl::OUString GetDefaultName(const OUnoObject* _pObj);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape();
- virtual UINT16 GetObjIdentifier() const;
- virtual UINT32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+ virtual sal_uInt32 GetObjInventor() const;
virtual SdrObject* Clone() const;
private:
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index 6f0abc6de953..bd3a768ed0cc 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -69,13 +69,13 @@ public:
virtual SdrPage* Clone() const;
using SdrPage::Clone;
- virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason);
- virtual SdrObject* RemoveObject(ULONG nObjNum);
+ virtual void NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason);
+ virtual SdrObject* RemoveObject(sal_uLong nObjNum);
/** returns the index inside the object list which belongs to the report component.
@param _xObject the report component
*/
- ULONG getIndexOf(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
+ sal_uLong getIndexOf(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
/** removes the SdrObject which belongs to the report component.
@param _xObject the report component
diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx
index 4b884424444b..c16cab9900f0 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -29,8 +29,9 @@
#define RPTUI_UNDOACTIONS_HXX
#include "dllapi.h"
-#include <svx/svdundo.hxx>
-#include <tools/string.hxx>
+
+#include "RptModel.hxx"
+
/** === begin UNO includes === **/
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -44,13 +45,16 @@
#include <com/sun/star/report/XReportComponent.hpp>
#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/report/XGroup.hpp>
+#include <com/sun/star/document/XUndoManager.hpp>
/** === end UNO includes === **/
+
#include <cppuhelper/implbase3.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/sequence.hxx>
#include <svl/lstner.hxx>
#include <svx/svdouno.hxx>
-#include "RptModel.hxx"
+#include <svx/svdundo.hxx>
+#include <tools/string.hxx>
#include <functional>
#include <memory>
@@ -120,23 +124,51 @@ namespace rptui
static ::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> getMemberFunction(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
};
- class REPORTDESIGN_DLLPUBLIC UndoManagerListAction
+ //==================================================================================================================
+ //= UndoContext
+ //==================================================================================================================
+ class UndoContext
{
+ public:
+ UndoContext( SfxUndoManager& i_undoManager, const ::rtl::OUString& i_undoTitle )
+ :m_rUndoManager( i_undoManager )
+ {
+ m_rUndoManager.EnterListAction( i_undoTitle, String() );
+ }
+
+ ~UndoContext()
+ {
+ m_rUndoManager.LeaveListAction();
+ }
+
private:
- SfxUndoManager& m_rManager;
+ SfxUndoManager& m_rUndoManager;
+ };
+ //==================================================================================================================
+ //= UndoSuppressor
+ //==================================================================================================================
+ class UndoSuppressor
+ {
public:
- UndoManagerListAction( SfxUndoManager& _rManager, const String& _rListActionComment )
- :m_rManager( _rManager )
+ UndoSuppressor( SfxUndoManager& i_undoManager )
+ :m_rUndoManager( i_undoManager )
{
- m_rManager.EnterListAction( _rListActionComment, String() );
+ m_rUndoManager.EnableUndo( false );
}
- ~UndoManagerListAction()
+
+ ~UndoSuppressor()
{
- m_rManager.LeaveListAction();
+ m_rUndoManager.EnableUndo( true );
}
+
+ private:
+ SfxUndoManager& m_rUndoManager;
};
+ //==================================================================================================================
+ //= OCommentUndoAction
+ //==================================================================================================================
class REPORTDESIGN_DLLPUBLIC OCommentUndoAction : public SdrUndoAction
{
protected:
@@ -146,7 +178,7 @@ namespace rptui
public:
TYPEINFO();
OCommentUndoAction( SdrModel& rMod
- ,USHORT nCommentID);
+ ,sal_uInt16 nCommentID);
virtual ~OCommentUndoAction();
virtual UniString GetComment() const { return m_strComment; }
@@ -176,7 +208,7 @@ namespace rptui
,Action _eAction
,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > _xContainer
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElem
- ,USHORT _nCommentId);
+ ,sal_uInt16 _nCommentId);
virtual ~OUndoContainerAction();
virtual void Undo();
@@ -202,7 +234,7 @@ namespace rptui
,OReportHelper> _pMemberFunction
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReport
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElem
- ,USHORT _nCommentId);
+ ,sal_uInt16 _nCommentId);
protected:
virtual void implReInsert( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
@@ -224,7 +256,7 @@ namespace rptui
,OGroupHelper> _pMemberFunction
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElem
- ,USHORT _nCommentId);
+ ,sal_uInt16 _nCommentId);
protected:
virtual void implReInsert( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
diff --git a/reportdesign/inc/helpids.hrc b/reportdesign/inc/helpids.hrc
index f73782a1d8d4..7b543169e032 100644
--- a/reportdesign/inc/helpids.hrc
+++ b/reportdesign/inc/helpids.hrc
@@ -27,104 +27,96 @@
#ifndef RTPUI_REPORTDESIGN_HELPID_HRC
#define RTPUI_REPORTDESIGN_HELPID_HRC
-#ifndef _SOLAR_HRC
-#include <svl/solar.hrc> // HID_RPT_DBACCESS_START
-#endif
+#define UID_RPT_PROP_FORMULA "REPORTDESIGN_UID_RPT_PROP_FORMULA"
+#define UID_RPT_RPT_PROP_DLG_FONT_TYPE "REPORTDESIGN_UID_RPT_RPT_PROP_DLG_FONT_TYPE"
+#define UID_RPT_RPT_PROP_DLG_AREA "REPORTDESIGN_UID_RPT_RPT_PROP_DLG_AREA"
+#define UID_RPT_PROP_CHARTTYPE_DLG "REPORTDESIGN_UID_RPT_PROP_CHARTTYPE_DLG"
+#define UID_RPT_PROP_DLG_LINKFIELDS "REPORTDESIGN_UID_RPT_PROP_DLG_LINKFIELDS"
-#define UID_RPT_RPT_APP_VIEW (HID_RPT_START + 0)
-#define UID_RPT_SCROLLWINDOW (HID_RPT_START + 1)
-#define UID_RPT_REPORTWINDOW (HID_RPT_START + 2)
-#define HID_RPT_HORZ_RULER (HID_RPT_START + 3)
-#define UID_RPT_SECTIONSWINDOW (HID_RPT_START + 4)
-#define UID_RPT_VIEWSWINDOW (HID_RPT_START + 5)
-#define HID_RPT_ENDMARKER (HID_RPT_START + 6)
-#define HID_RPT_SPLITTER (HID_RPT_START + 7)
-#define HID_REPORTSECTION (HID_RPT_START + 8)
-#define HID_RPT_HORZ_SCROLLBAR (HID_RPT_START + 9)
-#define HID_RPT_VERT_SCROLLBAR (HID_RPT_START + 10)
-#define HID_RPT_STARTMARKER (HID_RPT_START + 11)
-#define HID_RPT_FIELDEXPRESSION (HID_RPT_START + 12)
-#define HID_RPT_SORTORDER (HID_RPT_START + 13)
-#define HID_RPT_GROUPSBRW (HID_RPT_START + 14)
-#define HID_RPT_GROUPSSORTING_DLG (HID_RPT_START + 15)
-#define HID_RPT_PAGENUMBERS_DLG (HID_RPT_START + 16)
-#define HID_RPT_DATETIME_DLG (HID_RPT_START + 17)
-#define HID_RPT_CONDFORMAT_DLG (HID_RPT_START + 18)
-#define HID_RPT_CONDFORMAT_TB (HID_RPT_START + 19)
-#define HID_RPT_CRTL_FORMAT_PREVIEW (HID_RPT_START + 20)
-#define HID_RPT_COND_DLG (HID_RPT_START + 21)
-#define HID_RPT_POPUP_COLOR_CTRL (HID_RPT_START + 22)
-#define HID_RPT_POPUP_COLOR (HID_RPT_START + 23)
-#define HID_RPT_FIELD_SEL (HID_RPT_START + 24)
-#define HID_RPT_FIELD_SEL_WIN (HID_RPT_START + 25)
-#define HID_RPT_PROPDLG_TAB_GENERAL (HID_RPT_START + 26)
-#define HID_RPT_PROPDLG_TAB_DATA (HID_RPT_START + 27)
+#define UID_RPT_RPT_APP_VIEW "REPORTDESIGN_UID_RPT_RPT_APP_VIEW"
+#define UID_RPT_SCROLLWINDOW "REPORTDESIGN_UID_RPT_SCROLLWINDOW"
+#define UID_RPT_REPORTWINDOW "REPORTDESIGN_UID_RPT_REPORTWINDOW"
+#define HID_RPT_HORZ_RULER "REPORTDESIGN_HID_RPT_HORZ_RULER"
+#define UID_RPT_SECTIONSWINDOW "REPORTDESIGN_UID_RPT_SECTIONSWINDOW"
+#define UID_RPT_VIEWSWINDOW "REPORTDESIGN_UID_RPT_VIEWSWINDOW"
+#define HID_RPT_ENDMARKER "REPORTDESIGN_HID_RPT_ENDMARKER"
+#define HID_RPT_SPLITTER "REPORTDESIGN_HID_RPT_SPLITTER"
+#define HID_REPORTSECTION "REPORTDESIGN_HID_REPORTSECTION"
+#define HID_RPT_HORZ_SCROLLBAR "REPORTDESIGN_HID_RPT_HORZ_SCROLLBAR"
+#define HID_RPT_VERT_SCROLLBAR "REPORTDESIGN_HID_RPT_VERT_SCROLLBAR"
+#define HID_RPT_STARTMARKER "REPORTDESIGN_HID_RPT_STARTMARKER"
+#define HID_RPT_FIELDEXPRESSION "REPORTDESIGN_HID_RPT_FIELDEXPRESSION"
+#define HID_RPT_SORTORDER "REPORTDESIGN_HID_RPT_SORTORDER"
+#define HID_RPT_GROUPSBRW "REPORTDESIGN_HID_RPT_GROUPSBRW"
+#define HID_RPT_GROUPSSORTING_DLG "REPORTDESIGN_HID_RPT_GROUPSSORTING_DLG"
+#define HID_RPT_PAGENUMBERS_DLG "REPORTDESIGN_HID_RPT_PAGENUMBERS_DLG"
+#define HID_RPT_DATETIME_DLG "REPORTDESIGN_HID_RPT_DATETIME_DLG"
+#define HID_RPT_CONDFORMAT_DLG "REPORTDESIGN_HID_RPT_CONDFORMAT_DLG"
+#define HID_RPT_CONDFORMAT_TB "REPORTDESIGN_HID_RPT_CONDFORMAT_TB"
+#define HID_RPT_CRTL_FORMAT_PREVIEW "REPORTDESIGN_HID_RPT_CRTL_FORMAT_PREVIEW"
+#define HID_RPT_COND_DLG "REPORTDESIGN_HID_RPT_COND_DLG"
+#define HID_RPT_POPUP_COLOR_CTRL "REPORTDESIGN_HID_RPT_POPUP_COLOR_CTRL"
+#define HID_RPT_POPUP_COLOR "REPORTDESIGN_HID_RPT_POPUP_COLOR"
+#define HID_RPT_FIELD_SEL "REPORTDESIGN_HID_RPT_FIELD_SEL"
+#define HID_RPT_FIELD_SEL_WIN "REPORTDESIGN_HID_RPT_FIELD_SEL_WIN"
+#define HID_RPT_PROPDLG_TAB_GENERAL "REPORTDESIGN_HID_RPT_PROPDLG_TAB_GENERAL"
+#define HID_RPT_PROPDLG_TAB_DATA "REPORTDESIGN_HID_RPT_PROPDLG_TAB_DATA"
-#define HID_RPT_PROP_FORCENEWPAGE (HID_RPT_START + 28)
-#define HID_RPT_PROP_NEWROWORCOL (HID_RPT_START + 29)
-#define HID_RPT_PROP_KEEPTOGETHER (HID_RPT_START + 30)
-#define HID_RPT_PROP_CANGROW (HID_RPT_START + 31)
-#define HID_RPT_PROP_CANSHRINK (HID_RPT_START + 32)
-#define HID_RPT_PROP_REPEATSECTION (HID_RPT_START + 33)
-#define HID_RPT_PROP_FORMULALIST (HID_RPT_START + 34)
-#define HID_RPT_PROP_SCOPE (HID_RPT_START + 35)
-#define HID_RPT_PROP_TYPE (HID_RPT_START + 36)
-#define HID_RPT_PROP_MASTERFIELDS (HID_RPT_START + 37)
-#define HID_RPT_PROP_DETAILFIELDS (HID_RPT_START + 38)
-#define HID_RPT_PROP_AREA (HID_RPT_START + 39)
-#define UID_RPT_RPT_PROP_DLG_AREA (HID_RPT_START + 40)
-#define HID_RPT_PROP_MIMETYPE (HID_RPT_START + 41)
+#define HID_RPT_PROP_FORCENEWPAGE "REPORTDESIGN_HID_RPT_PROP_FORCENEWPAGE"
+#define HID_RPT_PROP_NEWROWORCOL "REPORTDESIGN_HID_RPT_PROP_NEWROWORCOL"
+#define HID_RPT_PROP_KEEPTOGETHER "REPORTDESIGN_HID_RPT_PROP_KEEPTOGETHER"
+#define HID_RPT_PROP_CANGROW "REPORTDESIGN_HID_RPT_PROP_CANGROW"
+#define HID_RPT_PROP_CANSHRINK "REPORTDESIGN_HID_RPT_PROP_CANSHRINK"
+#define HID_RPT_PROP_REPEATSECTION "REPORTDESIGN_HID_RPT_PROP_REPEATSECTION"
+#define HID_RPT_PROP_FORMULALIST "REPORTDESIGN_HID_RPT_PROP_FORMULALIST"
+#define HID_RPT_PROP_SCOPE "REPORTDESIGN_HID_RPT_PROP_SCOPE"
+#define HID_RPT_PROP_TYPE "REPORTDESIGN_HID_RPT_PROP_TYPE"
+#define HID_RPT_PROP_MASTERFIELDS "REPORTDESIGN_HID_RPT_PROP_MASTERFIELDS"
+#define HID_RPT_PROP_DETAILFIELDS "REPORTDESIGN_HID_RPT_PROP_DETAILFIELDS"
+#define HID_RPT_PROP_AREA "REPORTDESIGN_HID_RPT_PROP_AREA"
+#define HID_RPT_PROP_MIMETYPE "REPORTDESIGN_HID_RPT_PROP_MIMETYPE"
// free
// free
-#define HID_RPT_PROP_PRINTREPEATEDVALUES (HID_RPT_START + 44)
-#define HID_RPT_PROP_CONDITIONALPRINTEXPRESSION (HID_RPT_START + 45)
-#define HID_RPT_PROP_VERTICALALIGN (HID_RPT_START + 46)
-#define HID_RPT_PROP_STARTNEWCOLUMN (HID_RPT_START + 47)
-#define HID_RPT_PROP_STARTNEWPAGE (HID_RPT_START + 48)
-#define HID_RPT_PROP_RESETPAGENUMBER (HID_RPT_START + 49)
-#define HID_RPT_PROP_PARAADJUST (HID_RPT_START + 50)
-#define HID_RPT_PROP_MINHEIGHTNEWPAGE (HID_RPT_START + 51)
-#define HID_RPT_PROP_PRINTWHENGROUPCHANGE (HID_RPT_START + 52)
-#define HID_RPT_PROP_CHARTTYPE (HID_RPT_START + 53)
+#define HID_RPT_PROP_PRINTREPEATEDVALUES "REPORTDESIGN_HID_RPT_PROP_PRINTREPEATEDVALUES"
+#define HID_RPT_PROP_CONDITIONALPRINTEXPRESSION "REPORTDESIGN_HID_RPT_PROP_CONDITIONALPRINTEXPRESSION"
+#define HID_RPT_PROP_VERTICALALIGN "REPORTDESIGN_HID_RPT_PROP_VERTICALALIGN"
+#define HID_RPT_PROP_STARTNEWCOLUMN "REPORTDESIGN_HID_RPT_PROP_STARTNEWCOLUMN"
+#define HID_RPT_PROP_STARTNEWPAGE "REPORTDESIGN_HID_RPT_PROP_STARTNEWPAGE"
+#define HID_RPT_PROP_RESETPAGENUMBER "REPORTDESIGN_HID_RPT_PROP_RESETPAGENUMBER"
+#define HID_RPT_PROP_PARAADJUST "REPORTDESIGN_HID_RPT_PROP_PARAADJUST"
+#define HID_RPT_PROP_MINHEIGHTNEWPAGE "REPORTDESIGN_HID_RPT_PROP_MINHEIGHTNEWPAGE"
+#define HID_RPT_PROP_PRINTWHENGROUPCHANGE "REPORTDESIGN_HID_RPT_PROP_PRINTWHENGROUPCHANGE"
+#define HID_RPT_PROP_CHARTTYPE "REPORTDESIGN_HID_RPT_PROP_CHARTTYPE"
// free
// free
-#define HID_RPT_PROP_VISIBLE (HID_RPT_START + 55)
-#define HID_RPT_PROP_GROUPKEEPTOGETHER (HID_RPT_START + 56)
-#define HID_RPT_PROP_PAGEHEADEROPTION (HID_RPT_START + 57)
-#define HID_RPT_PROP_PAGEFOOTEROPTION (HID_RPT_START + 58)
-#define UID_RPT_PROP_DLG_LINE_STYLE (HID_RPT_START + 59)
-#define HID_RPT_PROP_PREVIEW_COUNT (HID_RPT_START + 60)
-#define HID_RPT_PROP_DATAFIELD (HID_RPT_START + 61)
-#define HID_RPT_PROP_BACKCOLOR (HID_RPT_START + 62)
-#define HID_RPT_PROP_RPT_POSITIONX (HID_RPT_START + 63)
-#define HID_RPT_PROP_RPT_POSITIONY (HID_RPT_START + 64)
-#define HID_RPT_PROP_RPT_WIDTH (HID_RPT_START + 65)
-#define HID_RPT_PROP_RPT_HEIGHT (HID_RPT_START + 66)
-#define HID_RPT_START_TITLE (HID_RPT_START + 67)
-#define HID_RPT_START_IMAGE (HID_RPT_START + 68)
-#define HID_RPT_PROP_DEEPTRAVERSING (HID_RPT_START + 69)
-#define HID_RPT_PROP_PREEVALUATED (HID_RPT_START + 70)
-#define HID_RPT_NAVIGATOR_DLG (HID_RPT_START + 71)
-#define HID_REPORT_NAVIGATOR_TREE (HID_RPT_START + 72)
-#define HID_RPT_PROP_FORMULA (HID_RPT_START + 73)
-#define HID_RPT_PROP_INITIALFORMULA (HID_RPT_START + 74)
-#define HID_RPT_PROP_RPT_FONT (HID_RPT_START + 75)
-#define UID_RPT_RPT_PROP_DLG_FONT_TYPE (HID_RPT_START + 76)
-#define HID_RPT_PROP_PRESERVEIRI (HID_RPT_START + 77)
-#define HID_RPT_PROP_BACKTRANSPARENT (HID_RPT_START + 78)
-#define HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT (HID_RPT_START + 79)
-#define UID_RPT_PROP_CHARTTYPE_DLG (HID_RPT_START + 80)
-#define UID_RPT_PROP_DLG_LINKFIELDS (HID_RPT_START + 81)
-#define UID_RPT_PROP_FORMULA (HID_RPT_START + 82)
+#define HID_RPT_PROP_VISIBLE "REPORTDESIGN_HID_RPT_PROP_VISIBLE"
+#define HID_RPT_PROP_GROUPKEEPTOGETHER "REPORTDESIGN_HID_RPT_PROP_GROUPKEEPTOGETHER"
+#define HID_RPT_PROP_PAGEHEADEROPTION "REPORTDESIGN_HID_RPT_PROP_PAGEHEADEROPTION"
+#define HID_RPT_PROP_PAGEFOOTEROPTION "REPORTDESIGN_HID_RPT_PROP_PAGEFOOTEROPTION"
+#define UID_RPT_PROP_DLG_LINE_STYLE "REPORTDESIGN_UID_RPT_PROP_DLG_LINE_STYLE"
+#define HID_RPT_PROP_PREVIEW_COUNT "REPORTDESIGN_HID_RPT_PROP_PREVIEW_COUNT"
+#define HID_RPT_PROP_DATAFIELD "REPORTDESIGN_HID_RPT_PROP_DATAFIELD"
+#define HID_RPT_PROP_BACKCOLOR "REPORTDESIGN_HID_RPT_PROP_BACKCOLOR"
+#define HID_RPT_PROP_RPT_POSITIONX "REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONX"
+#define HID_RPT_PROP_RPT_POSITIONY "REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONY"
+#define HID_RPT_PROP_RPT_WIDTH "REPORTDESIGN_HID_RPT_PROP_RPT_WIDTH"
+#define HID_RPT_PROP_RPT_HEIGHT "REPORTDESIGN_HID_RPT_PROP_RPT_HEIGHT"
+#define HID_RPT_START_TITLE "REPORTDESIGN_HID_RPT_START_TITLE"
+#define HID_RPT_START_IMAGE "REPORTDESIGN_HID_RPT_START_IMAGE"
+#define HID_RPT_PROP_DEEPTRAVERSING "REPORTDESIGN_HID_RPT_PROP_DEEPTRAVERSING"
+#define HID_RPT_PROP_PREEVALUATED "REPORTDESIGN_HID_RPT_PROP_PREEVALUATED"
+#define HID_RPT_NAVIGATOR_DLG "REPORTDESIGN_HID_RPT_NAVIGATOR_DLG"
+#define HID_REPORT_NAVIGATOR_TREE "REPORTDESIGN_HID_REPORT_NAVIGATOR_TREE"
+#define HID_RPT_PROP_FORMULA "REPORTDESIGN_HID_RPT_PROP_FORMULA"
+#define HID_RPT_PROP_INITIALFORMULA "REPORTDESIGN_HID_RPT_PROP_INITIALFORMULA"
+#define HID_RPT_PROP_RPT_FONT "REPORTDESIGN_HID_RPT_PROP_RPT_FONT"
+#define HID_RPT_PROP_PRESERVEIRI "REPORTDESIGN_HID_RPT_PROP_PRESERVEIRI"
+#define HID_RPT_PROP_BACKTRANSPARENT "REPORTDESIGN_HID_RPT_PROP_BACKTRANSPARENT"
+#define HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT "REPORTDESIGN_HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT"
-#define HID_RPT_GROUPSORT_MOVE_UP (HID_RPT_START + 82)
-#define HID_RPT_GROUPSORT_MOVE_DOWN (HID_RPT_START + 83)
-#define HID_RPT_GROUPSORT_DELETE (HID_RPT_START + 84)
-
-#if UID_RPT_PROP_FORMULA > HID_RPT_END
-#error Help-Id Ueberlauf in #file, #line
-#endif
-// don't forget to update the file util/hidother.src
+#define HID_RPT_GROUPSORT_MOVE_UP "REPORTDESIGN_HID_RPT_GROUPSORT_MOVE_UP"
+#define HID_RPT_GROUPSORT_MOVE_DOWN "REPORTDESIGN_HID_RPT_GROUPSORT_MOVE_DOWN"
+#define HID_RPT_GROUPSORT_DELETE "REPORTDESIGN_HID_RPT_GROUPSORT_DELETE"
#endif //RTPUI_REPORTDESIGN_HELPID_HRC
diff --git a/reportdesign/prj/build.lst b/reportdesign/prj/build.lst
index 781eb91eccb3..4a5667d2090a 100644
--- a/reportdesign/prj/build.lst
+++ b/reportdesign/prj/build.lst
@@ -1,4 +1,4 @@
-rd reportdesign : l10n BOOST:boost comphelper dbaccess formula NULL
+rd reportdesign : L10N:l10n BOOST:boost comphelper dbaccess formula LIBXSLT:libxslt NULL
rd reportdesign usr1 - all rd_mkout NULL
rd reportdesign\inc nmake - all rd_inc NULL
rd reportdesign\source\core\api nmake - all rd_api rd_inc NULL
@@ -13,3 +13,6 @@ rd reportdesign\source\ui\inspection nmake
rd reportdesign\source\filter\xml nmake - all rd_filter_xml rd_inc NULL
rd reportdesign\util nmake - all rd_util rd_api rd_res rd_shared rd_uimisc rd_uidlg rd_uireport rd_uiinspection rd_sdr rd_misc rd_filter_xml NULL
+# has problems in m78, in m83 also
+# rd reportdesign\qa\complex\reportdesign nmake - all rd_qa_complex NULL
+
diff --git a/reportdesign/prj/d.lst b/reportdesign/prj/d.lst
index b531c0eed8f0..d7cc5fad6396 100644
--- a/reportdesign/prj/d.lst
+++ b/reportdesign/prj/d.lst
@@ -19,3 +19,6 @@ dos: sh -c "if test %OS% = MACOSX; then create-bundle %_DEST%\lib%_EXT%\*.dylib;
..\uiconfig\dbreport\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\dbreport\statusbar\*.xml
..\uiconfig\dbreport\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\dbreport\toolbar\*.xml
+..\%__SRC%\misc\rpt.component %_DEST%\xml%_EXT%\rpt.component
+..\%__SRC%\misc\rptui.component %_DEST%\xml%_EXT%\rptui.component
+..\%__SRC%\misc\rptxml.component %_DEST%\xml%_EXT%\rptxml.component
diff --git a/reportdesign/qa/complex/reportdesign/FileURL.java b/reportdesign/qa/complex/reportdesign/FileURL.java
new file mode 100644
index 000000000000..9d2cdb89bd0e
--- /dev/null
+++ b/reportdesign/qa/complex/reportdesign/FileURL.java
@@ -0,0 +1,62 @@
+/*
+ * ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ * ************************************************************************
+ */
+
+package complex.reportdesign;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ *
+ * @author ll93751
+ */
+public class FileURL
+{
+ String m_sFileURL;
+
+ public FileURL(String _sFileURL)
+ {
+ m_sFileURL = _sFileURL;
+ }
+ public boolean exists()
+ {
+ try
+ {
+ final URI aURI = new URI(m_sFileURL);
+ final File aFile = new File(aURI);
+ return aFile.exists();
+ }
+ catch (URISyntaxException ex)
+ {
+ System.out.println("Error: URI is wrong. '" + m_sFileURL + "': " + ex.getMessage());
+ }
+ return false;
+ }
+}
diff --git a/reportdesign/qa/complex/ReportDesignerTest.java b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
index f34414efac8d..6dfb6f719daf 100644
--- a/reportdesign/qa/complex/ReportDesignerTest.java
+++ b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex;
+package complex.reportdesign;
import java.io.File;
import java.util.ArrayList;
@@ -47,21 +47,28 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
import com.sun.star.util.XCloseable;
-import complexlib.ComplexTestCase;
-import util.utils;
+// import complexlib.ComplexTestCase;
+// import util.utils;
import helper.OfficeProvider;
import helper.URLHelper;
-import helper.OfficeWatcher;
+// import helper.OfficeWatcher;
import convwatch.DB;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
class PropertySetHelper
{
XPropertySet m_xPropertySet;
public PropertySetHelper(Object _aObj)
{
- m_xPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, _aObj);
+ m_xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _aObj);
}
/**
@@ -129,57 +136,73 @@ class PropertyHelper
}
}
-public class ReportDesignerTest extends ComplexTestCase {
+public class ReportDesignerTest
+{
String mTestDocumentPath;
- public String[] getTestMethodNames()
- {
- return new String[] {"firsttest"};
- }
-
- private void checkIfOfficeExists(String _sOfficePathWithTrash)
- {
- String sOfficePath = "";
- int nIndex = _sOfficePathWithTrash.indexOf("soffice.exe");
- if (nIndex > 0)
- {
- sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 11);
- }
- else
- {
- nIndex = _sOfficePathWithTrash.indexOf("soffice");
- if (nIndex > 0)
- {
- sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 7);
- }
- }
-
- log.println(sOfficePath);
- File sOffice = new File(sOfficePath);
- if (! sOffice.exists())
- {
- log.println("ERROR: There exists no office installation at given path: '" + sOfficePath + "'");
- System.exit(0);
- }
- }
-
-
- private static XDesktop m_xDesktop = null;
- public static XDesktop getXDesktop()
+// public String[] getTestMethodNames()
+// {
+// return new String[] {"firsttest"};
+// }
+
+ @Before public void before()
+ {
+ System.out.println("before");
+ // String tempdir = System.getProperty("java.io.tmpdir");
+ //
+ int dummy = 0;
+ // m_xXMultiServiceFactory = getMSF();
+ }
+
+ @After public void after()
+ {
+ System.out.println("after");
+ }
+
+// private void checkIfOfficeExists(String _sOfficePathWithTrash)
+// {
+// String sOfficePath = "";
+// int nIndex = _sOfficePathWithTrash.indexOf("soffice.exe");
+// if (nIndex > 0)
+// {
+// sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 11);
+// }
+// else
+// {
+// nIndex = _sOfficePathWithTrash.indexOf("soffice");
+// if (nIndex > 0)
+// {
+// sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 7);
+// }
+// }
+//
+// System.out.println(sOfficePath);
+// File sOffice = new File(sOfficePath);
+// if (! sOffice.exists())
+// {
+// System.out.println("ERROR: There exists no office installation at given path: '" + sOfficePath + "'");
+// System.exit(0);
+// }
+// }
+
+
+ private XDesktop m_xDesktop = null;
+ public XDesktop getXDesktop()
{
if (m_xDesktop == null)
{
try
{
- XInterface xInterface = (XInterface) m_xXMultiServiceFactory.createInstance( "com.sun.star.frame.Desktop" );
- m_xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xInterface);
+ XInterface xInterface = (XInterface) getMSF().createInstance( "com.sun.star.frame.Desktop" );
+ m_xDesktop = UnoRuntime.queryInterface(XDesktop.class, xInterface);
+ assertNotNull("Can't get XDesktop", m_xDesktop);
}
catch (com.sun.star.uno.Exception e)
{
- log.println("ERROR: uno.Exception caught");
- log.println("Message: " + e.getMessage());
+ System.out.println("ERROR: uno.Exception caught");
+ System.out.println("Message: " + e.getMessage());
}
}
return m_xDesktop;
@@ -203,26 +226,27 @@ public class ReportDesignerTest extends ComplexTestCase {
private OfficeProvider m_aProvider = null;
- private static XMultiServiceFactory m_xXMultiServiceFactory = null;
- private void startOffice()
- {
- param.put("TimeOut", new Integer(300000));
- System.out.println("TimeOut: " + param.getInt("TimeOut"));
- System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut"));
-
- m_aProvider = new OfficeProvider();
- m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param);
- param.put("ServiceFactory", m_xXMultiServiceFactory);
- }
-
- private void stopOffice()
- {
- if (m_aProvider != null)
- {
- m_aProvider.closeExistingOffice(param, true);
- m_aProvider = null;
- }
- }
+// private void startOffice()
+// {
+// // int tempTime = param.getInt("SingleTimeOut");
+// param.put("TimeOut", new Integer(300000));
+// System.out.println("TimeOut: " + param.getInt("TimeOut"));
+// System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut"));
+//
+// // OfficeProvider aProvider = null;
+// m_aProvider = new OfficeProvider();
+// m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param);
+// param.put("ServiceFactory", m_xXMultiServiceFactory);
+// }
+//
+// private void stopOffice()
+// {
+// if (m_aProvider != null)
+// {
+// m_aProvider.closeExistingOffice(param, true);
+// m_aProvider = null;
+// }
+// }
private String m_sMailAddress = null;
private String m_sUPDMinor;
@@ -231,103 +255,104 @@ public class ReportDesignerTest extends ComplexTestCase {
private static final int WRITER = 1;
private static final int CALC = 2;
- public void firsttest()
+ @Test public void firsttest()
{
- convwatch.GlobalLogWriter.set(log);
- try
- {
-
- // -------------------- preconditions, try to find an office --------------------
+ // convwatch.GlobalLogWriter.set(log);
- String sAppExecutionCommand = (String) param.get("AppExecutionCommand");
+ // -------------------- preconditions, try to find an office --------------------
- String sUser = System.getProperty("user.name");
- log.println("user.name='" + sUser + "'");
+// String sAppExecutionCommand = (String) param.get("AppExecutionCommand");
- String sVCSID = System.getProperty("VCSID");
- log.println("VCSID='" + sVCSID + "'");
- m_sMailAddress = sVCSID + "@openoffice.org";
- log.println("Assumed mail address: " + m_sMailAddress);
+ String sUser = System.getProperty("user.name");
+ System.out.println("user.name='" + sUser + "'");
- m_sUPDMinor = System.getProperty("UPDMINOR");
- m_sCWS_WORK_STAMP = System.getProperty("CWS_WORK_STAMP");
- log.println("Current CWS: " + m_sCWS_WORK_STAMP);
- log.println("Current MWS: " + m_sUPDMinor);
+ String sVCSID = System.getProperty("VCSID");
+ System.out.println("VCSID='" + sVCSID + "'");
+ m_sMailAddress = sVCSID + "@openoffice.org";
+ System.out.println("Assumed mail address: " + m_sMailAddress);
- sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser);
- log.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
+ m_sUPDMinor = System.getProperty("UPDMINOR");
+ m_sCWS_WORK_STAMP = System.getProperty("CWS_WORK_STAMP");
+ System.out.println("Current CWS: " + m_sCWS_WORK_STAMP);
+ System.out.println("Current MWS: " + m_sUPDMinor);
- checkIfOfficeExists(sAppExecutionCommand);
- param.put("AppExecutionCommand", new String(sAppExecutionCommand));
+// sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser);
+// System.out.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
+//
+// checkIfOfficeExists(sAppExecutionCommand);
+// param.put("AppExecutionCommand", new String(sAppExecutionCommand));
- // --------------------------- Start the given Office ---------------------------
+ // --------------------------- Start the given Office ---------------------------
- startOffice();
+// startOffice();
- // ------------------------------ Start a test run ------------------------------
+ // ------------------------------ Start a test run ------------------------------
- String sCurrentDirectory = System.getProperty("user.dir");
- log.println("Current Dir: " + sCurrentDirectory);
-
- String sWriterDocument = sCurrentDirectory + "/" + "RPTWriterTests.odb";
- startTestForFile(sWriterDocument, WRITER);
-
- String sCalcDocument = sCurrentDirectory + "/" + "RPTCalcTests.odb";
- startTestForFile(sCalcDocument, CALC);
- }
- catch (AssureException e)
- {
- stopOffice();
- throw new AssureException(e.getMessage());
- }
+// String sCurrentDirectory = System.getProperty("user.dir");
+// System.out.println("Current Dir: " + sCurrentDirectory);
+//
+ String sWriterDocument = TestDocument.getUrl("RPTWriterTests.odb");
+ startTestForFile(sWriterDocument, WRITER);
+ String sCalcDocument = TestDocument.getUrl("RPTCalcTests.odb");
+ startTestForFile(sCalcDocument, CALC);
+// catch (AssureException e)
+// {
+// stopOffice();
+// throw new AssureException(e.getMessage());
+// }
+//
// ------------------------------ Office shutdown ------------------------------
- stopOffice();
+// stopOffice();
}
// -----------------------------------------------------------------------------
private void startTestForFile(String _sDocument, int _nType)
{
- File aFile = new File(_sDocument);
- assure("Test File doesn't '" + _sDocument + "'exist.", aFile.exists());
+ FileURL aFileURL = new FileURL(_sDocument);
+ assertTrue("Test File doesn't '" + _sDocument + "'exist.", aFileURL.exists());
- String sFileURL = URLHelper.getFileURLFromSystemPath(_sDocument);
- log.println("File URL: " + sFileURL);
+ String sFileURL = _sDocument; // URLHelper.getFileURLFromSystemPath(_sDocument);
+ System.out.println("File URL: " + sFileURL);
XComponent xDocComponent = loadComponent(sFileURL, getXDesktop(), null);
- log.println("Load done");
+ System.out.println("Load done");
+ assertNotNull("Can't load document ", xDocComponent);
+
try
{
- XInterface x = (XInterface)m_xXMultiServiceFactory.createInstance("com.sun.star.sdb.DatabaseContext");
- assure("can't create instance of com.sun.star.sdb.DatabaseContext", x != null);
- log.println("createInstance com.sun.star.sdb.DatabaseContext done");
+ XInterface x = (XInterface)getMSF().createInstance("com.sun.star.sdb.DatabaseContext");
+ assertNotNull("can't create instance of com.sun.star.sdb.DatabaseContext", x);
+ System.out.println("createInstance com.sun.star.sdb.DatabaseContext done");
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, x);
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, x);
showElements(xNameAccess);
Object aObj = xNameAccess.getByName(sFileURL);
- XDocumentDataSource xDataSource = (XDocumentDataSource)UnoRuntime.queryInterface(XDocumentDataSource.class, aObj);
+ XDocumentDataSource xDataSource = UnoRuntime.queryInterface(XDocumentDataSource.class, aObj);
XOfficeDatabaseDocument xOfficeDBDoc = xDataSource.getDatabaseDocument();
- assure("can't access DatabaseDocument", xOfficeDBDoc != null);
+ assertNotNull("can't access DatabaseDocument", xOfficeDBDoc);
- XModel xDBSource = (XModel)UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc);
+ XModel xDBSource = UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc);
Object aController = xDBSource.getCurrentController();
- assure("Controller of xOfficeDatabaseDocument is empty!", aController != null);
+ assertNotNull("Controller of xOfficeDatabaseDocument is empty!", aController);
- XDatabaseDocumentUI aDBDocUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController);
- boolean isConnect = aDBDocUI.connect();
+ XDatabaseDocumentUI aDBDocUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController);
+ /* boolean isConnect = */
+// TODO: throws an exception in DEV300m78
+ aDBDocUI.connect();
Object aActiveConnectionObj = aDBDocUI.getActiveConnection();
- assure("ActiveConnection is empty", aActiveConnectionObj != null);
+ assertNotNull("ActiveConnection is empty", aActiveConnectionObj);
- XReportDocumentsSupplier xSupplier = (XReportDocumentsSupplier)UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc);
+ XReportDocumentsSupplier xSupplier = UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc);
xNameAccess = xSupplier.getReportDocuments();
- assure("xOfficeDatabaseDocument returns no Report Document", xNameAccess != null);
+ assertNotNull("xOfficeDatabaseDocument returns no Report Document", xNameAccess);
showElements(xNameAccess);
- ArrayList aPropertyList = new ArrayList();
+ ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
PropertyValue aActiveConnection = new PropertyValue();
aActiveConnection.Name = "ActiveConnection";
@@ -339,7 +364,7 @@ public class ReportDesignerTest extends ComplexTestCase {
}
catch(com.sun.star.uno.Exception e)
{
- log.println("ERROR: Exception caught");
+ fail("ERROR: Exception caught" + e.getMessage());
}
// Close the document
@@ -355,8 +380,8 @@ public class ReportDesignerTest extends ComplexTestCase {
private void createDBEntry(int _nType)
{
// try to connect the database
- String sDBConnection = (String)param.get( convwatch.PropertyName.DB_CONNECTION_STRING );
- log.println("DBConnection: " + sDBConnection);
+ String sDBConnection = ""; // (String)param.get( convwatch.PropertyName.DB_CONNECTION_STRING );
+ System.out.println("DBConnection: " + sDBConnection);
DB.init(sDBConnection);
String sDestinationVersion = m_sCWS_WORK_STAMP;
if (sDestinationVersion.length() == 0)
@@ -370,10 +395,10 @@ public class ReportDesignerTest extends ComplexTestCase {
String sSpecial = "";
String sFixRefSubDirectory = "ReportDesign_qa_complex_" + getFileFormat(_nType);
- DB.insertinto_documentcompare(sFixRefSubDirectory, "", "fixref",
- sDestinationVersion, sDestinationName, sDestinationCreatorType,
- sDocumentPoolDir, sDocumentPoolName, m_sMailAddress,
- sSpecial);
+// DB.insertinto_documentcompare(sFixRefSubDirectory, "", "fixref",
+// sDestinationVersion, sDestinationName, sDestinationCreatorType,
+// sDocumentPoolDir, sDocumentPoolName, m_sMailAddress,
+// sSpecial);
}
private void loadAndStoreReports(XNameAccess _xNameAccess, ArrayList _aPropertyList, int _nType)
@@ -427,7 +452,7 @@ public class ReportDesignerTest extends ComplexTestCase {
private String getOutputPath(int _nType)
{
- String sOutputPath = (String)param.get( convwatch.PropertyName.DOC_COMPARATOR_OUTPUT_PATH );
+ String sOutputPath = util.utils.getOfficeTemp/*Dir*/(getMSF());// (String)param.get( convwatch.PropertyName.DOC_COMPARATOR_OUTPUT_PATH );
if (!sOutputPath.endsWith("/") || // construct the output file name
!sOutputPath.endsWith("\\"))
@@ -462,7 +487,7 @@ public class ReportDesignerTest extends ComplexTestCase {
String sOutputURL = URLHelper.getFileURLFromSystemPath(sOutputPath);
- ArrayList aPropertyList = new ArrayList(); // set some properties for storeAsURL
+ ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); // set some properties for storeAsURL
PropertyValue aFileFormat = new PropertyValue();
aFileFormat.Name = "FilterName";
@@ -475,19 +500,19 @@ public class ReportDesignerTest extends ComplexTestCase {
aPropertyList.add(aOverwrite);
// store the document in an other directory
- XStorable aStorable = (XStorable) UnoRuntime.queryInterface( XStorable.class, _xComponent);
+ XStorable aStorable = UnoRuntime.queryInterface(XStorable.class, _xComponent);
if (aStorable != null)
{
- log.println("store document as URL: '" + sOutputURL + "'");
+ System.out.println("store document as URL: '" + sOutputURL + "'");
try
{
aStorable.storeAsURL(sOutputURL, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
}
catch (com.sun.star.io.IOException e)
{
- log.println("ERROR: Exception caught");
- log.println("Can't write document URL: '" + sOutputURL + "'");
- log.println("Message: " + e.getMessage());
+ System.out.println("ERROR: Exception caught");
+ System.out.println("Can't write document URL: '" + sOutputURL + "'");
+ System.out.println("Message: " + e.getMessage());
}
}
}
@@ -495,25 +520,25 @@ public class ReportDesignerTest extends ComplexTestCase {
private XComponent loadComponent(String _sName, Object _xComponent, ArrayList _aPropertyList)
{
XComponent xDocComponent = null;
- XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface( XComponentLoader.class, _xComponent );
+ XComponentLoader xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, _xComponent);
try
{
PropertyValue[] aLoadProperties = PropertyHelper.createPropertyValueArrayFormArrayList(_aPropertyList);
- log.println("Load component: '" + _sName + "'");
+ System.out.println("Load component: '" + _sName + "'");
xDocComponent = xComponentLoader.loadComponentFromURL(_sName, "_blank", 0, aLoadProperties);
}
catch (com.sun.star.io.IOException e)
{
- log.println("ERROR: Exception caught");
- log.println("Can't load document '" + _sName + "'");
- log.println("Message: " + e.getMessage());
+ System.out.println("ERROR: Exception caught");
+ System.out.println("Can't load document '" + _sName + "'");
+ System.out.println("Message: " + e.getMessage());
}
catch (com.sun.star.lang.IllegalArgumentException e)
{
- log.println("ERROR: Exception caught");
- log.println("Illegal Arguments given to loadComponentFromURL.");
- log.println("Message: " + e.getMessage());
+ System.out.println("ERROR: Exception caught");
+ System.out.println("Illegal Arguments given to loadComponentFromURL.");
+ System.out.println("Message: " + e.getMessage());
}
return xDocComponent;
}
@@ -521,17 +546,39 @@ public class ReportDesignerTest extends ComplexTestCase {
private void closeComponent(XComponent _xDoc)
{
// Close the document
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, _xDoc);
+ XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, _xDoc);
try
{
xCloseable.close(true);
}
catch (com.sun.star.util.CloseVetoException e)
{
- log.println("ERROR: CloseVetoException caught");
- log.println("CloseVetoException occurred Can't close document.");
- log.println("Message: " + e.getMessage());
+ System.out.println("ERROR: CloseVetoException caught");
+ System.out.println("CloseVetoException occured Can't close document.");
+ System.out.println("Message: " + e.getMessage());
}
}
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/reportdesign/qa/complex/reportdesign/TestDocument.java b/reportdesign/qa/complex/reportdesign/TestDocument.java
new file mode 100644
index 000000000000..a6e294d4d3ec
--- /dev/null
+++ b/reportdesign/qa/complex/reportdesign/TestDocument.java
@@ -0,0 +1,41 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package complex.reportdesign;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+
+final class TestDocument
+{
+ public static String getUrl(String name)
+ {
+ return OfficeFileUrl.getAbsolute(new File("test_documents", name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/reportdesign/qa/complex/makefile.mk b/reportdesign/qa/complex/reportdesign/makefile.mk
index 9d1b7667c125..4174eb02ce3a 100755
--- a/reportdesign/qa/complex/makefile.mk
+++ b/reportdesign/qa/complex/reportdesign/makefile.mk
@@ -25,34 +25,38 @@
#
#*************************************************************************
-PRJ=..$/..
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+PRJ = ../../..
PRJNAME = reportdesign
-PACKAGE = complex
-TARGET = rptdesigntest
+TARGET = qa_complex_reportdesign
-# --- Settings -----------------------------------------------------
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/reportdesign
-.INCLUDE : settings.mk
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+ ReportDesignerTest.java
-# --- Files --------------------------------------------------------
+# put here all other files
+JAVAFILES = $(JAVATESTFILES) \
+ TestDocument.java \
+ FileURL.java
-JARFILES = ridl.jar jurt.jar unoil.jar juh.jar OOoRunner.jar
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
-JAVAFILES = ReportDesignerTest.java
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
-# --- Targets ------------------------------------------------------
+.END
-.INCLUDE : target.mk
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-# JAVADEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8502,suspend=y
-JAVADEBUG=
+ALLTAR : javatest
-MYSQL_CONNECTOR=$(PWD)$/mysql-connector-java-5.0.6-bin.jar
-CLASSPATH!:=$(CLASSPATH)$(PATH_SEPERATOR)$(MYSQL_CONNECTOR)
-
-run: ALLTAR
- $(PERL) mysql-connector-exists.pl $(MYSQL_CONNECTOR)
-# @echo $(CLASSPATH)
-# @echo $(VCSID)
- @java $(JAVADEBUG) -cp $(CLASSPATH) -DVCSID=$(VCSID) -DCWS_WORK_STAMP=$(CWS_WORK_STAMP) -DUPDMINOR=$(UPDMINOR) org.openoffice.Runner -ini runner.props
+.END
diff --git a/reportdesign/qa/complex/mysql-connector-exists.pl b/reportdesign/qa/complex/reportdesign/mysql-connector-exists.pl
index 6eefe2bb0639..6eefe2bb0639 100644
--- a/reportdesign/qa/complex/mysql-connector-exists.pl
+++ b/reportdesign/qa/complex/reportdesign/mysql-connector-exists.pl
diff --git a/reportdesign/qa/complex/runner.props b/reportdesign/qa/complex/reportdesign/runner.props
index d894366ce006..d894366ce006 100755
--- a/reportdesign/qa/complex/runner.props
+++ b/reportdesign/qa/complex/reportdesign/runner.props
diff --git a/reportdesign/qa/complex/RPTCalcTests.odb b/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb
index 0e91d633d4e7..0e91d633d4e7 100755
--- a/reportdesign/qa/complex/RPTCalcTests.odb
+++ b/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb
Binary files differ
diff --git a/reportdesign/qa/complex/RPTWriterTests.odb b/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb
index 86228f457f0b..7099b1abf2b5 100755
--- a/reportdesign/qa/complex/RPTWriterTests.odb
+++ b/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb
Binary files differ
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 4bec3a6fa7c9..acc109abc555 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,40 @@
#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 <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 +591,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 +608,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 +760,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 +777,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_FAIL("Error!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
// -----------------------------------------------------------------------------
@@ -1269,10 +1279,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 +1832,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 +2910,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 32fa29152634..5bbbbad5b1f4 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 90c27177ca7f..3843b894673b 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 a469248f7cb5..054b3dd311cc 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 f2dab3fc8e12..f6ab95585ee7 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 573bce8980df..71e0246c8ab4 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 676e9b240073..2ebbd53a2603 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 9a4d66740f17..cd4b140873b2 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 2a86ffb32c28..b21a3c91278d 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 ::boost::unordered_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 b7bf61f6ed00..9dd4730c81ff 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 e79603a6294b..767fc340d1f8 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 3d71e8deac69..8e0e7299335b 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 b92e7599cadc..b44fd3282ed3 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 3e4a09d3993a..b479396371b8 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 431e72e5bccc..1193e63d694a 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 343d82b67b9d..e90b08faab6a 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 2aba0c42a510..3b979d9649a0 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 e2c473177e7a..aa34d461fc46 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 4324db909568..e9378da1725c 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 a1199abf7849..f86c2cec1521 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 efa70b6b7e61..7f6720fd68ec 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 15b34d1ac91e..f8470a6b6002 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 159a457011ce..3cb470933e26 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 c264a3e41bec..072a9430d7b0 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 af6ec90b2e7f..150c98d88343 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 31c5bdb4026c..c5c760e1755d 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 99142605a24c..33547cdd3fe0 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 20156d51b01d..5ccd968c6a66 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 ffe4b5f37cb1..a85f500de4df 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 da5471fbce52..c458ccf240e4 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 743cd1a755b6..e59be1a5c8bf 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 e6d5d51a4485..91504e7f1cb9 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 5bd349b1d52d..22f195bac07e 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 c55e32cb2dd5..007b42d225fb 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;
@@ -108,9 +113,9 @@ namespace rptui
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);
+ public:
+ 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 97962a336ee5..092054b9faf5 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 e8f64642afc6..cc64b29f9223 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 11af785dc6a7..290076b6732c 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 199ecd92c1f8..1ac8295fb7c2 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 ecb117488bd4..06d9daeb1a6b 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 637b245097fd..700550ee99d5 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 6cf3ef141b86..569c0b138e7c 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 61b2b51e76e5..041da5de03ce 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 4300beaf4d16..2ac110a70396 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 fb1a01e42301..4f713dad90ef 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 727cd5bb1c62..2d0b49f74640 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 c14b1db3f278..8c991d7d408c 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 368aa7cac239..7701c91e83d4 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 a3f2191c33c5..b60bfa7a55df 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 afd709b0e77a..87e1f006c177 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 5915362f753e..4d53bca64388 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 e6d9403786b2..0f8787a07dd1 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 949627285f93..3be1eadc1344 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 1676aa21ae59..d3ef4c175980 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 b12bafdc7760..494b68023d62 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 ee0fc6512c32..61d1b20ab432 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 ed8891c95d7d..2de27a2217c4 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 c510c40b8a02..016573d21c01 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 e5745382053a..b8791bc294ff 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 92b6b716860f..77fb99286993 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 d493d06c1ead..2d6555dff6bc 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 b35c0adb0799..f7529c94bce8 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 822590c65d44..fcd06acd708f 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 2867f9fee662..7c63b73c9299 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 2a6b51578245..54ccff238de2 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 d3b2dfeb2afb..2a7a32408db9 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 98a48bf1c5eb..0abd5b75f666 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 2e7b52d40e3e..a0355349e361 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 fd583814d859..c80f3af70db5 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 d3bee52d4970..b27fcdec1f13 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 35562e4cefa8..7e66ceab829a 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 ca5cdc3eb844..70f130c2afe4 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 358007d9b87d..c6154775e7b2 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 52f5fe402c79..c4c64b83d1c6 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...";
};
diff --git a/reportdesign/util/hidother.src b/reportdesign/util/hidother.src
index f7e08f34442e..3c52ed77c852 100644
--- a/reportdesign/util/hidother.src
+++ b/reportdesign/util/hidother.src
@@ -26,11 +26,6 @@
************************************************************************/
#include "../inc/helpids.hrc"
-#include "../inc/rptui_slotid.hrc"
-
-#ifndef _SBASLTID_HRC
-#include <svx/svxids.hrc>
-#endif
hidspecial UID_RPT_RPT_APP_VIEW { HelpId = UID_RPT_RPT_APP_VIEW ; };
hidspecial UID_RPT_SCROLLWINDOW { HelpId = UID_RPT_SCROLLWINDOW ; };
@@ -45,6 +40,7 @@ hidspecial HID_RPT_HORZ_SCROLLBAR { HelpId = HID_R
hidspecial HID_RPT_VERT_SCROLLBAR { HelpId = HID_RPT_VERT_SCROLLBAR ; };
hidspecial HID_RPT_STARTMARKER { HelpId = HID_RPT_STARTMARKER ; };
+/*
hidspecial SID_RPT_SHOWREPORTEXPLORER { HelpId = SID_RPT_SHOWREPORTEXPLORER ; };
hidspecial SID_PAGEHEADERFOOTER { HelpId = SID_PAGEHEADERFOOTER ; };
hidspecial SID_REPORTHEADERFOOTER { HelpId = SID_REPORTHEADERFOOTER ; };
@@ -54,6 +50,9 @@ hidspecial SID_CONDITIONALFORMATTING { HelpId = SID_CONDI
hidspecial SID_PAGEDIALOG { HelpId = SID_PAGEDIALOG ; };
hidspecial SID_SETCONTROLDEFAULTS { HelpId = SID_SETCONTROLDEFAULTS ; };
hidspecial SID_INSERTBREAK { HelpId = SID_INSERTBREAK ; };
+hidspecial SID_ESCAPE { HelpId = SID_ESCAPE ; };
+*/
+
hidspecial HID_RPT_FIELDEXPRESSION { HelpId = HID_RPT_FIELDEXPRESSION ; };
hidspecial HID_RPT_SORTORDER { HelpId = HID_RPT_SORTORDER ; };
hidspecial HID_RPT_GROUPSBRW { HelpId = HID_RPT_GROUPSBRW ; };
@@ -65,7 +64,6 @@ hidspecial HID_RPT_CRTL_FORMAT_PREVIEW { HelpId = HID_R
hidspecial HID_RPT_COND_DLG { HelpId = HID_RPT_COND_DLG ; };
hidspecial HID_RPT_POPUP_COLOR_CTRL { HelpId = HID_RPT_POPUP_COLOR_CTRL ; };
hidspecial HID_RPT_POPUP_COLOR { HelpId = HID_RPT_POPUP_COLOR ; };
-hidspecial SID_ESCAPE { HelpId = SID_ESCAPE ; };
hidspecial HID_RPT_PROPDLG_TAB_GENERAL { HelpId = HID_RPT_PROPDLG_TAB_GENERAL ; };
hidspecial HID_RPT_PROPDLG_TAB_DATA { HelpId = HID_RPT_PROPDLG_TAB_DATA ; };
@@ -93,15 +91,18 @@ hidspecial HID_RPT_PROP_RPT_WIDTH { HelpId = HID_RPT_PROP_RPT_WIDTH; };
hidspecial HID_RPT_PROP_RPT_HEIGHT { HelpId = HID_RPT_PROP_RPT_HEIGHT; };
hidspecial HID_RPT_START_TITLE { HelpId = HID_RPT_START_TITLE; };
hidspecial HID_RPT_START_IMAGE { HelpId = HID_RPT_START_IMAGE; };
-hidspecial SID_EXECUTE_REPORT { HelpId = SID_EXECUTE_REPORT; };
+/*
+hidspecial SID_EXECUTE_REPORT { HelpId = SID_EXECUTE_REPORT; };
hidspecial SID_RPT_TEXTDOCUMENT { HelpId = SID_RPT_TEXTDOCUMENT; };
hidspecial SID_RPT_SPREADSHEET { HelpId = SID_RPT_SPREADSHEET; };
+hidspecial SID_RPT_NEW_FUNCTION { HelpId = SID_RPT_NEW_FUNCTION; };
+*/
+
hidspecial HID_RPT_PROP_DEEPTRAVERSING { HelpId = HID_RPT_PROP_DEEPTRAVERSING; };
hidspecial HID_RPT_PROP_PREEVALUATED { HelpId = HID_RPT_PROP_PREEVALUATED; };
hidspecial HID_RPT_NAVIGATOR_DLG { HelpId = HID_RPT_NAVIGATOR_DLG; };
hidspecial HID_REPORT_NAVIGATOR_TREE { HelpId = HID_REPORT_NAVIGATOR_TREE; };
-hidspecial SID_RPT_NEW_FUNCTION { HelpId = SID_RPT_NEW_FUNCTION; };
hidspecial HID_RPT_PROP_FORMULA { HelpId = HID_RPT_PROP_FORMULA; };
hidspecial HID_RPT_PROP_INITIALFORMULA { HelpId = HID_RPT_PROP_INITIALFORMULA; };x
hidspecial HID_RPT_PROP_DATAFIELD { HelpId = HID_RPT_PROP_DATAFIELD; };
@@ -110,14 +111,17 @@ hidspecial UID_RPT_RPT_PROP_DLG_FONT_TYPE { HelpId = UID_RPT_RPT_PROP_DLG_FONT_T
hidspecial HID_RPT_PROP_BACKCOLOR { HelpId = HID_RPT_PROP_BACKCOLOR; };
hidspecial HID_RPT_PROP_PRESERVEIRI { HelpId = HID_RPT_PROP_PRESERVEIRI; };
+/*
hidspecial SID_OBJECT_SMALLESTWIDTH { HelpId = SID_OBJECT_SMALLESTWIDTH; };
hidspecial SID_OBJECT_SMALLESTHEIGHT { HelpId = SID_OBJECT_SMALLESTHEIGHT; };
hidspecial SID_OBJECT_GREATESTWIDTH { HelpId = SID_OBJECT_GREATESTWIDTH; };
hidspecial SID_OBJECT_GREATESTHEIGHT { HelpId = SID_OBJECT_GREATESTHEIGHT; };
+*/
hidspecial HID_RPT_PROP_BACKTRANSPARENT { HelpId = HID_RPT_PROP_BACKTRANSPARENT; };
hidspecial HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT { HelpId = HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT; };
+/*
hidspecial SID_ARRANGEMENU { HelpId = SID_ARRANGEMENU; };
hidspecial SID_SELECTALL_IN_SECTION { HelpId = SID_SELECTALL_IN_SECTION; };
hidspecial SID_SECTION_ALIGN { HelpId = SID_SECTION_ALIGN; };
@@ -129,10 +133,10 @@ hidspecial SID_SECTION_ALIGN_MIDDLE { HelpId = SID_SECTION_ALIGN_MIDDLE; };
hidspecial SID_SECTION_ALIGN_DOWN { HelpId = SID_SECTION_ALIGN_DOWN; };
hidspecial SID_NEXT_MARK { HelpId = SID_NEXT_MARK; };
hidspecial SID_PREV_MARK { HelpId = SID_PREV_MARK; };
-
hidspecial SID_SECTION_SHRINK { HelpId = SID_SECTION_SHRINK; };
hidspecial SID_SECTION_SHRINK_TOP { HelpId = SID_SECTION_SHRINK_TOP; };
hidspecial SID_SECTION_SHRINK_BOTTOM { HelpId = SID_SECTION_SHRINK_BOTTOM; };
+*/
hidspecial UID_RPT_PROP_CHARTTYPE_DLG { HelpId = UID_RPT_PROP_CHARTTYPE_DLG; };
hidspecial HID_RPT_PROP_CHARTTYPE { HelpId = HID_RPT_PROP_CHARTTYPE; };
diff --git a/reportdesign/util/makefile.mk b/reportdesign/util/makefile.mk
index fd6a31699268..dc58db3f61a0 100644
--- a/reportdesign/util/makefile.mk
+++ b/reportdesign/util/makefile.mk
@@ -230,3 +230,23 @@ DEF3NAME=$(SHL3TARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/rpt.component $(MISC)/rptui.component $(MISC)/rptxml.component
+
+$(MISC)/rpt.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ rpt.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt rpt.component
+
+$(MISC)/rptui.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ rptui.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt rptui.component
+
+$(MISC)/rptxml.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ rptxml.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt rptxml.component
diff --git a/reportdesign/util/rpt.component b/reportdesign/util/rpt.component
new file mode 100644
index 000000000000..ef5b2cc4c78d
--- /dev/null
+++ b/reportdesign/util/rpt.component
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.report.OFixedLine">
+ <service name="com.sun.star.report.FixedLine"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.OFixedText">
+ <service name="com.sun.star.report.FixedText"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.OFormatCondition">
+ <service name="com.sun.star.report.FormatCondition"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.OFormattedField">
+ <service name="com.sun.star.report.FormattedField"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.OFunction">
+ <service name="com.sun.star.report.Function"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.OImageControl">
+ <service name="com.sun.star.report.ImageControl"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.OReportDefinition">
+ <service name="com.sun.star.report.ReportDefinition"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.OReportEngineJFree">
+ <service name="com.sun.star.report.ReportEngine"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.Shape">
+ <service name="com.sun.star.report.Shape"/>
+ </implementation>
+</component>
diff --git a/reportdesign/util/rptui.component b/reportdesign/util/rptui.component
new file mode 100644
index 000000000000..593f06d0b582
--- /dev/null
+++ b/reportdesign/util/rptui.component
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.report.DataProviderHandler">
+ <service name="com.sun.star.report.inspection.DataProviderHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.DefaultComponentInspectorModel">
+ <service name="com.sun.star.report.inspection.DefaultComponentInspectorModel"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.GeometryHandler">
+ <service name="com.sun.star.report.inspection.GeometryHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.ReportComponentHandler">
+ <service name="com.sun.star.report.inspection.ReportComponentHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.report.comp.ReportDesign">
+ <service name="com.sun.star.sdb.ReportDesign"/>
+ </implementation>
+ <implementation name="com.sun.star.report.comp.ReportToolboxController">
+ <service name="com.sun.star.report.ReportToolboxController"/>
+ </implementation>
+ <implementation name="com.sun.star.report.comp.StatusbarController">
+ <service name="com.sun.star.frame.StatusbarController"/>
+ </implementation>
+</component>
diff --git a/reportdesign/util/rptxml.component b/reportdesign/util/rptxml.component
new file mode 100644
index 000000000000..8a0021ecdf9a
--- /dev/null
+++ b/reportdesign/util/rptxml.component
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Report.XMLOasisContentImporter">
+ <service name="com.sun.star.comp.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Report.XMLOasisMetaImporter">
+ <service name="com.sun.star.comp.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Report.XMLOasisSettingsImporter">
+ <service name="com.sun.star.comp.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Report.XMLOasisStylesImporter">
+ <service name="com.sun.star.comp.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.ExportDocumentHandler">
+ <service name="com.sun.star.report.ExportDocumentHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.ExportFilter">
+ <service name="com.sun.star.document.ExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.ImportDocumentHandler">
+ <service name="com.sun.star.report.ImportDocumentHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.OReportFilter">
+ <service name="com.sun.star.comp.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.ORptTypeDetection">
+ <service name="com.sun.star.document.ExtendedTypeDetection"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.XMLContentExporter">
+ <service name="com.sun.star.document.ExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.XMLFullExporter">
+ <service name="com.sun.star.document.ExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.XMLMetaExporter">
+ <service name="com.sun.star.document.ExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.XMLSettingsExporter">
+ <service name="com.sun.star.document.ExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.report.XMLStylesExporter">
+ <service name="com.sun.star.document.ExportFilter"/>
+ </implementation>
+</component>