summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-02-15 10:31:10 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-02-15 10:31:10 +0100
commit4a7d3e0c752e3d1a10de8c4a2a1ccd1f00ada3fc (patch)
tree814c85d7673480e087b7d5757def9db53fd8a74e /reportdesign
parent933795c27b41b3f8f66725a6d814d5fc608a8359 (diff)
parentac6e971d8a5f715f716b6bdcaf6cb535104df32c (diff)
dba34d: pulled and merged CWS dba34c, thus implicitly rebasing to m100
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.hxx8
-rw-r--r--reportdesign/inc/UndoActions.hxx60
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx179
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx2
-rw-r--r--reportdesign/source/core/sdr/ReportUndoFactory.cxx12
-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.cxx25
-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/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/Formula.cxx10
-rw-r--r--reportdesign/source/ui/dlg/GroupExchange.cxx2
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx88
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx36
-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.hxx2
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx2
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx2
-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/inspection/DataProviderHandler.cxx2
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx2
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx2
-rw-r--r--reportdesign/source/ui/inspection/ReportComponentHandler.cxx2
-rw-r--r--reportdesign/source/ui/inspection/metadata.cxx2
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx4
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx (renamed from reportdesign/source/ui/misc/Undo.cxx)19
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx28
-rw-r--r--reportdesign/source/ui/misc/makefile.mk2
-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.cxx38
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx8
-rw-r--r--reportdesign/source/ui/report/FixedTextColor.cxx4
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx276
-rw-r--r--reportdesign/source/ui/report/ReportRuler.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx36
-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.cxx20
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx15
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx16
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx61
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx116
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx6
71 files changed, 888 insertions, 793 deletions
diff --git a/reportdesign/inc/ModuleHelper.hxx b/reportdesign/inc/ModuleHelper.hxx
index 79d3b996db81..73f195ffb678 100644
--- a/reportdesign/inc/ModuleHelper.hxx
+++ b/reportdesign/inc/ModuleHelper.hxx
@@ -89,7 +89,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 d932110bc5f3..68a16e609b77 100644..100755
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -29,25 +29,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>
@@ -62,32 +73,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&);
@@ -380,6 +396,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 6a1fbf7a27ce..a5f0aa508c3a 100644
--- a/reportdesign/inc/RptDef.hxx
+++ b/reportdesign/inc/RptDef.hxx
@@ -50,18 +50,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 872938426259..a9f400d92c4b 100644
--- a/reportdesign/inc/RptModel.hxx
+++ b/reportdesign/inc/RptModel.hxx
@@ -35,7 +35,7 @@
class Window;
namespace dbaui
{
- class OSingleDocumentController;
+ class DBSubComponentController;
}
namespace reportdesign
{
@@ -56,7 +56,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();
@@ -72,15 +72,15 @@ public:
virtual void SetChanged(sal_Bool bFlg = sal_True);
virtual SdrPage* AllocPage(FASTBOOL 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 5c920947990b..2af9a25267a1 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -175,8 +175,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;
};
//============================================================================
@@ -187,17 +187,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 );
@@ -217,8 +217,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();
@@ -270,8 +270,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 f890264d6dc0..7b24ba6b297c 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -63,19 +63,19 @@ public:
OReportPage( OReportModel& rModel
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
- ,FASTBOOL bMasterPage=FALSE );
+ ,FASTBOOL bMasterPage=sal_False );
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 180fa616cf39..2a7df2d6c9cb 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -28,8 +28,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>
@@ -43,13 +44,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>
@@ -119,23 +123,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:
@@ -145,7 +177,7 @@ namespace rptui
public:
TYPEINFO();
OCommentUndoAction( SdrModel& rMod
- ,USHORT nCommentID);
+ ,sal_uInt16 nCommentID);
virtual ~OCommentUndoAction();
virtual UniString GetComment() const { return m_strComment; }
@@ -175,7 +207,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();
@@ -201,7 +233,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 ) );
@@ -223,7 +255,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/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 2cf848dc0c84..6b8414ad60a3 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -24,18 +24,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>
@@ -44,83 +92,41 @@
#include <comphelper/namecontainer.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/numberedcollection.hxx>
-#include <comphelper/propertystatecontainer.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/property.hxx>
#include <comphelper/propertysetinfo.hxx>
-#include <comphelper/sequence.hxx>
+#include <comphelper/propertystatecontainer.hxx>
#include <comphelper/seqstream.hxx>
+#include <comphelper/sequence.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/uno3.hxx>
-#include <com/sun/star/chart2/data/DatabaseDataProvider.hpp>
-#include <vcl/svapp.hxx>
-#include <vcl/virdev.hxx>
-#include <vos/mutex.hxx>
-#include <com/sun/star/beans/XMultiPropertyStates.hpp>
-#include <com/sun/star/document/EventObject.hpp>
-#include <com/sun/star/document/XEventListener.hpp>
-#include <com/sun/star/style/XStyle.hpp>
-#include <com/sun/star/embed/XTransactedObject.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/embed/EmbedMapUnits.hpp>
-#include <com/sun/star/embed/EntryInitModes.hpp>
-#include <com/sun/star/embed/Aspects.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
-#include <com/sun/star/embed/XEmbedPersist.hpp>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
-#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
-#include <com/sun/star/document/XExporter.hpp>
-#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/document/XFilter.hpp>
-#include <com/sun/star/task/ErrorCodeIOException.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include "corestrings.hrc"
-#include "Groups.hxx"
-#include "RptDef.hxx"
-#include "Section.hxx"
-#include "FixedLine.hxx"
-#include "core_resource.hrc"
-#include "core_resource.hxx"
-#include "Tools.hxx"
-#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <unotools/streamwrap.hxx>
#include <connectivity/CommonTools.hxx>
#include <connectivity/dbconversion.hxx>
-#include <framework/titlehelper.hxx>
#include <connectivity/dbtools.hxx>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-#include "Functions.hxx"
-#include <boost/mem_fn.hpp>
-#include <boost/bind.hpp>
-#include <boost/utility.hpp>
-#include <unotools/saveopt.hxx>
-#include "RptModel.hxx"
-#include "UndoEnv.hxx"
-#include "FormattedField.hxx"
-#include "FixedText.hxx"
-#include "ImageControl.hxx"
-#include "Shape.hxx"
-#include "ReportHelperImpl.hxx"
-#include <svl/itempool.hxx>
-#include <unotools/moduleoptions.hxx>
-#include <osl/thread.hxx>
-
+#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/interfacecontainer.h>
+#include <dbaccess/dbaundomanager.hxx>
#include <editeng/paperinf.hxx>
+#include <framework/titlehelper.hxx>
+#include <osl/thread.hxx>
+#include <svl/itempool.hxx>
+#include <svl/undo.hxx>
#include <svx/svdlayer.hxx>
+#include <svx/unofill.hxx>
#include <svx/xmleohlp.hxx>
#include <svx/xmlgrhlp.hxx>
-#include <svx/unofill.hxx>
-#include <cppuhelper/interfacecontainer.h>
-#include <cppuhelper/exc_hlp.hxx>
-#include "ReportComponent.hxx"
-#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
-#include <com/sun/star/style/NumberingType.hpp>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <unotools/moduleoptions.hxx>
+#include <unotools/saveopt.hxx>
+#include <unotools/streamwrap.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/virdev.hxx>
+#include <vos/mutex.hxx>
+
+#include <boost/bind.hpp>
+#include <boost/mem_fn.hpp>
+#include <boost/utility.hpp>
#define MAP_LEN(x) x, sizeof(x) - 1
#define MAP_CHAR_LEN(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(x))
@@ -607,6 +613,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;
@@ -623,6 +630,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)
@@ -746,7 +754,6 @@ OReportDefinition::~OReportDefinition()
}
// -----------------------------------------------------------------------------
IMPLEMENT_FORWARD_REFCOUNT( OReportDefinition, ReportDefinitionBase )
-//IMPLEMENT_FORWARD_XINTERFACE2(OReportDefinition,ReportDefinitionBase,ReportDefinitionPropertySet)
void OReportDefinition::init()
{
try
@@ -764,7 +771,7 @@ void OReportDefinition::init()
pCreatorThread->createSuspended();
pCreatorThread->setPriority(osl_Thread_PriorityBelowNormal);
pCreatorThread->resume();
- } // for ( ; pIter != pEnd; ++pIter )
+ }
}
m_pImpl->m_pReportModel.reset(new OReportModel(this));
@@ -775,6 +782,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();
@@ -789,9 +799,9 @@ void OReportDefinition::init()
}
m_pImpl->m_pObjectContainer.reset( new comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) ) );
}
- catch(uno::Exception)
+ catch ( const uno::Exception& )
{
- OSL_ENSURE(0,"Error!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
// -----------------------------------------------------------------------------
@@ -1296,10 +1306,21 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
::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;
}
// -----------------------------------------------------------------------------
@@ -1842,7 +1863,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
@@ -2931,8 +2951,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/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 6ef0f970078f..1cfdfaf0e0f9 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -118,7 +118,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 e0e089e651b2..eb2fdcb893d8 100644
--- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx
+++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
@@ -33,7 +33,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 )
@@ -79,12 +79,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*/ )
@@ -95,7 +95,7 @@ SdrUndoAction* OReportUndoFactory::CreateUndoInsertObject( SdrObject& rObject, b
SdrUndoAction* OReportUndoFactory::CreateUndoDeleteObject( SdrObject& rObject, bool /*bOrdNumDirect*/ )
{
return lcl_createUndo(rObject,rptui::Removed,RID_STR_UNDO_DELETE_CONTROL);
- //return m_pUndoFactory->CreateUndoDeleteObject( rObject, bOrdNumDirect ? TRUE : FALSE );
+ //return m_pUndoFactory->CreateUndoDeleteObject( rObject, bOrdNumDirect ? sal_True : sal_False );
}
SdrUndoAction* OReportUndoFactory::CreateUndoNewObject( 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 7327456c7940..8e4ebad7712a 100644
--- a/reportdesign/source/core/sdr/RptModel.cxx
+++ b/reportdesign/source/core/sdr/RptModel.cxx
@@ -28,7 +28,7 @@
#include "RptModel.hxx"
#include "RptPage.hxx"
-#include <dbaccess/singledoccontroller.hxx>
+#include <dbaccess/dbsubcomponentcontroller.hxx>
#include <tools/debug.hxx>
#include <unotools/pathoptions.hxx>
@@ -130,7 +130,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));
//if ( pPage )
@@ -151,8 +151,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 272f0d6f4ecd..bbc970eba479 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -37,7 +37,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>
@@ -509,12 +509,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;
}
@@ -692,12 +692,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;
}
@@ -965,7 +965,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)
@@ -977,7 +977,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)
@@ -992,12 +992,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 29f1109aeb6b..3fe30aacaaaa 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -78,11 +78,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));
@@ -98,7 +98,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));
@@ -109,7 +109,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())
@@ -152,7 +152,7 @@ void OReportPage::insertObject(const uno::Reference< report::XReportComponent >&
OSL_ENSURE(_xObject.is(),"Object is not valid to create a SdrObject!");
if ( !_xObject.is() ) // || !m_pView )
return;
- ULONG nPos = getIndexOf(_xObject);
+ sal_uLong nPos = getIndexOf(_xObject);
if ( nPos < GetObjCount() )
return; // Object already in list
@@ -177,7 +177,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)
@@ -207,7 +207,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 d58fe62e974d..24ce8a9e1710 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -52,7 +52,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 <vos/mutex.hxx>
@@ -96,7 +96,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);
@@ -122,7 +122,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)
@@ -268,7 +268,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)
@@ -314,7 +314,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 f4dd0a7f8645..8db61ffe5583 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -54,7 +54,7 @@
#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 <vos/mutex.hxx>
@@ -262,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;
@@ -291,7 +291,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
{ // nothing 'til now ... have to change this ....
// the attributes
Reference< XPropertySetInfo > xPSI( xSet->getPropertySetInfo(), UNO_SET_THROW );
- INT32 nPropertyAttributes = 0;
+ sal_Int32 nPropertyAttributes = 0;
try
{
if ( xPSI->hasPropertyByName( _rEvent.PropertyName ) )
@@ -380,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();
}
// -----------------------------------------------------------------------------
@@ -439,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 ) );
}
}
}
@@ -510,12 +507,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 e4817bbe9f44..f5fba8129d54 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -35,7 +35,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>
@@ -186,7 +186,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 2c946d5280da..eec798af7f1f 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -1436,7 +1436,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 d6c8aea1dcc2..0b4e48c4990a 100644
--- a/reportdesign/source/filter/xml/xmlExport.hxx
+++ b/reportdesign/source/filter/xml/xmlExport.hxx
@@ -181,7 +181,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 74e6e1dd9341..463c2bfa6066 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -508,7 +508,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/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 11de48113cee..9a7c1d8086e2 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -190,7 +190,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 ) );
@@ -232,8 +232,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());
}
@@ -293,7 +293,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 )
{
@@ -307,9 +307,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) );
}
}
}
@@ -326,10 +326,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));
@@ -374,7 +374,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));
}
@@ -475,9 +475,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) );
}
}
}
@@ -534,19 +534,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 d3617749d10b..1e428b081c0d 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -87,11 +87,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 );
}
};
@@ -400,7 +400,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
@@ -465,8 +465,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 e3591ae03534..0e4d7dbcad82 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -71,7 +71,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("...")));
@@ -129,7 +129,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;
@@ -138,7 +138,7 @@ public:
virtual void Resize();
void StartSelection();
- void SetSlotId(USHORT _nSlotId);
+ void SetSlotId(sal_uInt16 _nSlotId);
};
// -----------------------------------------------------------------------------
OColorPopup::OColorPopup(Window* _pParent,Condition* _pCondition)
@@ -204,7 +204,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 )
@@ -216,7 +216,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# DR 2004-09-03 Moved the following line above the Dispatch() calls.
@@ -330,11 +330,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:
@@ -378,7 +378,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 );
@@ -631,8 +631,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 );
@@ -667,10 +667,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 12517480b3b5..36f0a8ecb697 100644
--- a/reportdesign/source/ui/dlg/Condition.hxx
+++ b/reportdesign/source/ui/dlg/Condition.hxx
@@ -148,7 +148,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/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 682ec6b17438..6f741698268c 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -115,7 +115,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);
}
@@ -125,10 +125,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*/)
@@ -188,7 +188,7 @@ void FormulaDialog::ShowReference(const String& /*_sRef*/)
{
}
// -----------------------------------------------------------------------------
-void FormulaDialog::HideReference( BOOL /*bDoneRefMode*/)
+void FormulaDialog::HideReference( sal_Bool /*bDoneRefMode*/)
{
}
// -----------------------------------------------------------------------------
@@ -242,7 +242,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg)
} // if ( m_pEdit && aArgs.getLength() )
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 cbce03c629fd..b5ba9534a9ad 100644
--- a/reportdesign/source/ui/dlg/GroupExchange.cxx
+++ b/reportdesign/source/ui/dlg/GroupExchange.cxx
@@ -60,7 +60,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 d4ea5fa17a48..2a93c374ca15 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -101,14 +101,14 @@ 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,18 +144,18 @@ 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 sal_Bool IsTabAllowed(sal_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 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);
@@ -275,7 +275,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();
@@ -316,8 +316,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();
@@ -376,7 +376,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() );
@@ -403,7 +403,7 @@ void OFieldExpressionControl::lateInit()
// not the first call
RowRemoved(0, GetRowCount());
- RowInserted(0, m_aGroupPositions.size(), TRUE);
+ RowInserted(0, m_aGroupPositions.size(), sal_True);
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
@@ -429,19 +429,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();
@@ -455,7 +455,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);
@@ -486,7 +486,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();
@@ -499,7 +499,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() )
@@ -519,10 +519,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;
@@ -553,7 +553,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);
@@ -576,7 +576,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 );
@@ -585,17 +585,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 );
@@ -748,7 +748,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 )
{
@@ -824,7 +824,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];
@@ -844,7 +844,7 @@ void OFieldExpressionControl::DeleteRows()
} // while( nIndex >= 0 )
if ( !bFirstTime )
- m_pParent->m_pController->getUndoMgr()->LeaveListAction();
+ m_pParent->m_pController->getUndoManager().LeaveListAction();
m_nDataPos = GetCurRow();
InvalidateStatusCell( nOldDataPos );
@@ -930,8 +930,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;
@@ -1019,7 +1019,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 (int i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
for (size_t i = 0; i < (sizeof(pControlsLst)/sizeof(pControlsLst[0]))-1; ++i)
@@ -1034,7 +1034,7 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
{
- pControls[i]->Show(TRUE);
+ pControls[i]->Show(sal_True);
String sText = pControls[i]->GetText();
if ( aMnemonicGenerator.CreateMnemonic(sText) )
pControls[i]->SetText(sText);
@@ -1214,7 +1214,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;
}
}
@@ -1237,7 +1237,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 )
{
@@ -1318,7 +1318,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)));
}
@@ -1362,8 +1362,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 < sizeof(nIds)/sizeof(nIds[0]); ++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 < sizeof(nIds)/sizeof(nIds[0]); ++i)
{
m_aGroupOnLst.InsertEntry(String(ModuleRes(nIds[i])));
m_aGroupOnLst.SetEntryData(i+1,reinterpret_cast<void*>(i+2));
@@ -1375,7 +1375,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::INTERVAL));
break;
} // switch(nDataType)
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch(_xGroup->getGroupOn())
{
case report::GroupOn::DEFAULT:
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index af61f3b6d514..215e5145889f 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -31,7 +31,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>
@@ -73,9 +73,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&);
@@ -317,12 +317,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);
@@ -334,8 +334,8 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
else
aContextMenu.EnableItem(nId,bEnabled);
}
- } // for (USHORT i = 0; i < nCount; ++i)
- USHORT nId = aContextMenu.Execute(this, aWhere);
+ } // for (sal_uInt16 i = 0; i < nCount; ++i)
+ sal_uInt16 nId = aContextMenu.Execute(this, aWhere);
if ( nId )
{
uno::Sequence< beans::PropertyValue> aArgs;
@@ -501,7 +501,7 @@ void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent ) throw (
SetCurEntry(pEntry);
}
else if ( !pEntry )
- SelectAll(FALSE,FALSE);
+ SelectAll(sal_False,sal_False);
}
else
{
@@ -520,13 +520,13 @@ 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);
if ( pEntry )
{
const Image aImageHC( m_aNavigatorImagesHC.GetImage( _nImageId ) );
@@ -535,11 +535,11 @@ SvLBoxEntry* NavigatorTree::insertEntry(const ::rtl::OUString& _sName,SvLBoxEntr
}
}
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();
@@ -680,7 +680,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 )
@@ -691,7 +691,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);
}
}
@@ -722,7 +722,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/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index 0f6d328de729..ac373c4c24ae 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -47,7 +47,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 79907f4e5e87..e4e56d59e91a 100644
--- a/reportdesign/source/ui/inc/CondFormat.hxx
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -60,7 +60,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;
@@ -109,7 +109,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 4da25a831607..52780fdb65ed 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -83,14 +83,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 * );
@@ -125,8 +125,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; }
@@ -142,7 +142,7 @@ namespace rptui
*
* \return <TRUE/> if paste is allowed
*/
- BOOL IsPasteAllowed() const;
+ sal_Bool IsPasteAllowed() const;
/** paste a new control in this section
*/
@@ -168,17 +168,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.
@@ -186,13 +186,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
@@ -201,10 +201,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 da9825adf349..b08e14f52b4a 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -72,11 +72,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();
@@ -96,7 +96,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 e2a43c163808..13525e8f2e0e 100644
--- a/reportdesign/source/ui/inc/FunctionHelper.hxx
+++ b/reportdesign/source/ui/inc/FunctionHelper.hxx
@@ -78,7 +78,7 @@ 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 rtl::OString getHelpId() const ;
diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx
index a03c9d447316..200b7c29a60a 100644
--- a/reportdesign/source/ui/inc/GeometryHandler.hxx
+++ b/reportdesign/source/ui/inc/GeometryHandler.hxx
@@ -195,7 +195,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 09fb4f188320..239858c605a4 100644
--- a/reportdesign/source/ui/inc/GroupsSorting.hxx
+++ b/reportdesign/source/ui/inc/GroupsSorting.hxx
@@ -143,7 +143,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 6694c81c999b..b25f49770f5b 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -27,48 +27,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;
@@ -78,7 +82,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
@@ -91,6 +95,7 @@ namespace rptui
,public SfxListener
,public ::comphelper::OPropertyStateContainer
,public ::comphelper::OPropertyArrayUsageHelper < OReportController_BASE >
+ ,public ::boost::noncopyable
{
private:
OModuleClient m_aModuleClient;
@@ -107,9 +112,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;
@@ -213,18 +218,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.
@@ -279,7 +289,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);
@@ -292,14 +302,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.
@@ -333,16 +340,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*);
@@ -352,12 +358,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
@@ -455,7 +455,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; }
@@ -477,10 +477,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 ba65b1b80b9f..a14e3a2dffdb 100644
--- a/reportdesign/source/ui/inc/ReportRuler.hxx
+++ b/reportdesign/source/ui/inc/ReportRuler.hxx
@@ -55,7 +55,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 00f3480f6964..ac8383d1acff 100644
--- a/reportdesign/source/ui/inc/ReportSection.hxx
+++ b/reportdesign/source/ui/inc/ReportSection.hxx
@@ -62,7 +62,7 @@ namespace rptui
sal_Int32 m_nPaintEntranceCount;
DlgEdMode m_eMode;
- BOOL m_bDialogModelChanged;
+ sal_Bool m_bDialogModelChanged;
sal_Bool m_bInDrag;
/** fills the section with all control from the report section
@@ -121,15 +121,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 9e7f7c6a8f90..cb576ebc32ef 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -93,10 +93,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
*/
@@ -106,7 +106,7 @@ namespace rptui
*
* \return <TRUE/> if paste is allowed
*/
- BOOL IsPasteAllowed() const;
+ sal_Bool IsPasteAllowed() const;
/** paste a new control in this section
*/
@@ -123,7 +123,7 @@ namespace rptui
/** returns <TRUE/> when a object is marked
*/
- BOOL HasSelection() const;
+ sal_Bool HasSelection() const;
Point getThumbPos() const;
@@ -131,7 +131,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.
@@ -139,9 +139,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 479872b06573..bd3b9606a8e3 100644
--- a/reportdesign/source/ui/inc/Undo.hxx
+++ b/reportdesign/source/ui/inc/RptUndo.hxx
@@ -67,7 +67,7 @@ namespace rptui
OSectionUndo( OReportModel& rMod
,sal_uInt16 _nSlot
,Action _eAction
- ,USHORT nCommentID);
+ ,sal_uInt16 nCommentID);
virtual ~OSectionUndo();
virtual void Undo();
@@ -95,7 +95,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();
};
@@ -122,7 +122,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;
};
@@ -142,7 +142,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 d5080e56d28d..1f9f73533340 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -99,10 +99,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();
@@ -111,7 +111,7 @@ namespace rptui
*
* \return <TRUE/> if paste is allowed
*/
- BOOL IsPasteAllowed() const;
+ sal_Bool IsPasteAllowed() const;
/** paste a new control in this section
*/
@@ -128,13 +128,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.
@@ -142,9 +142,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 d9c2fa01d676..8afd59ee2de8 100644
--- a/reportdesign/source/ui/inc/SectionWindow.hxx
+++ b/reportdesign/source/ui/inc/SectionWindow.hxx
@@ -75,9 +75,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
*
@@ -85,9 +85,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 d7aa74c240e8..2b5ab62bcb11 100644
--- a/reportdesign/source/ui/inc/UITools.hxx
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -168,7 +168,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 13b8566933c6..9bee09a0b335 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -92,7 +92,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 )
{
@@ -146,7 +146,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);
@@ -181,7 +181,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.
@@ -189,23 +189,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
*/
@@ -213,7 +213,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
*/
@@ -223,7 +223,7 @@ namespace rptui
*
* \return <TRUE/> if paste is allowed
*/
- BOOL IsPasteAllowed() const;
+ sal_Bool IsPasteAllowed() const;
/** paste a new control in this section
*/
@@ -240,7 +240,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 0c397c106dbb..f7eb0cb6d00e 100644
--- a/reportdesign/source/ui/inc/dlgedfunc.hxx
+++ b/reportdesign/source/ui/inc/dlgedfunc.hxx
@@ -93,9 +93,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
@@ -134,9 +134,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 );
};
//============================================================================
@@ -149,11 +149,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 d335b8f28920..aec98e42cdd6 100644
--- a/reportdesign/source/ui/inc/dlgpage.hxx
+++ b/reportdesign/source/ui/inc/dlgpage.hxx
@@ -45,7 +45,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/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index 8ac5053ff39f..dcc327060806 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -51,7 +51,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 <vos/mutex.hxx>
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 48d8c74e0c01..c5b2df1d3589 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -237,7 +237,7 @@ namespace rptui
const struct
{
const sal_Char* programmaticName;
- USHORT uiNameResId;
+ sal_uInt16 uiNameResId;
rtl::OString helpId;
} aCategories[] = {
{ "General", RID_STR_PROPPAGE_DEFAULT, HID_RPT_PROPDLG_TAB_GENERAL },
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index af953a457edb..aee0a824c34b 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -66,7 +66,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/waitobj.hxx>
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
#include <vcl/stdtext.hxx>
#include "ModuleHelper.hxx"
diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
index 859c0da38709..d992206b6f54 100644
--- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
+++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
@@ -40,7 +40,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 2c98d134196e..419a161741d2 100644
--- a/reportdesign/source/ui/inspection/metadata.cxx
+++ b/reportdesign/source/ui/inspection/metadata.cxx
@@ -29,7 +29,7 @@
#include <svtools/localresaccess.hxx>
#include "com/sun/star/inspection/XPropertyHandler.hpp"
#include <tools/debug.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#ifndef RTPUI_REPORTDESIGN_HELPID_HRC
#include "helpids.hrc"
#endif
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index 791251e0424a..e6c92f0cbb0d 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -203,10 +203,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);
}
diff --git a/reportdesign/source/ui/misc/Undo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index d944dc2aee20..4244987b717a 100644
--- a/reportdesign/source/ui/misc/Undo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -26,21 +26,16 @@
************************************************************************/
#include "precompiled_reportdesign.hxx"
-#include "Undo.hxx"
-#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
+#include "RptUndo.hxx"
#include "uistrings.hrc"
-#endif
-#ifndef _RPTUI_SLOTID_HRC_
#include "rptui_slotid.hrc"
-#endif
-#ifndef RPTUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
+#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>
@@ -129,7 +124,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)
@@ -239,7 +234,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)
@@ -278,7 +273,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)
@@ -344,7 +339,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 fc553667341f..8c531d15e0fb 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -204,7 +204,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();
@@ -228,14 +228,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() ) );
} // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CASEMAP,sal_True,&pItem) && pItem->ISA(SvxCaseMapItem))
struct Items {
- USHORT nWhich;
+ sal_uInt16 nWhich;
::rtl::OUString sPropertyName;
};
const Items pItems[] = { {ITEMID_LANGUAGE,PROPERTY_CHARLOCALE}
@@ -667,9 +667,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),
@@ -678,15 +678,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),
@@ -707,7 +707,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
OSL_ASSERT((sizeof(pDefaults)/sizeof(pDefaults[0])) == (sizeof(aItemInfos)/sizeof(aItemInfos[0])));
- static USHORT pRanges[] =
+ static sal_uInt16 pRanges[] =
{
ITEMID_FONT,ITEMID_WEIGHT_COMPLEX,
0
@@ -758,7 +758,7 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R
Window* pParent = VCLUnoHelper::GetWindow( _rxParentWindow );
- //static USHORT pRanges[] =
+ //static sal_uInt16 pRanges[] =
//{
// XATTR_START,XATTR_END,
// 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/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx
index ce34ebadf775..2e815d90f81f 100644
--- a/reportdesign/source/ui/misc/statusbarcontroller.cxx
+++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx
@@ -99,10 +99,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 cf5561ba4758..e89cc5c6297e 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -148,10 +148,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;
@@ -230,9 +230,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 b3165684d72d..f806d64112cd 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -113,20 +113,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 )
@@ -155,12 +155,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);
@@ -191,7 +191,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();
@@ -363,7 +363,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 );
@@ -375,7 +375,7 @@ rtl::OUString ODesignView::GetInsertObjString() const
}
//----------------------------------------------------------------------------
-USHORT ODesignView::GetInsertObj() const
+sal_uInt16 ODesignView::GetInsertObj() const
{
return m_eActObj;
}
@@ -406,13 +406,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();
}
@@ -440,7 +440,7 @@ void ODesignView::toggleGrid(sal_Bool _bGridVisible)
m_aScrollWindow.toggleGrid(_bGridVisible);
}
//----------------------------------------------------------------------------
-USHORT ODesignView::getSectionCount() const
+sal_uInt16 ODesignView::getSectionCount() const
{
return m_aScrollWindow.getSectionCount();
}
@@ -450,12 +450,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);
}
@@ -553,7 +553,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();
}
@@ -574,7 +574,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();
}
@@ -753,13 +753,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 0528631f851b..7a5e47fef9b7 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -67,14 +67,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 9952d706a4b4..d80a79dde0f7 100644
--- a/reportdesign/source/ui/report/FixedTextColor.cxx
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -71,7 +71,7 @@ namespace rptui
// sal_Int32 FixedTextColor::getTextColor()
// {
// const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings();
- // BOOL bHighContrast = aStyleSettings.GetHighContrastMode();
+ // sal_Bool bHighContrast = aStyleSettings.GetHighContrastMode();
//
// Color aGetFaceColor = aStyleSettings.GetFaceColor();
// Color aGetCheckedColor = aStyleSettings.GetCheckedColor();
@@ -246,7 +246,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 fdfdad6cb55f..4a56a4392262 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -179,7 +179,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 06aec876f725..f3b733e4d9cd 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -99,6 +99,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>
@@ -118,7 +119,7 @@
#include <svx/zoomitem.hxx>
#include <svx/zoomslideritem.hxx>
#include <editeng/brshitem.hxx>
-#include <svx/flagsdef.hxx> //CHINA001
+#include <svx/flagsdef.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svxdlg.hxx>
#include <svx/zoom_def.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"
@@ -138,7 +139,7 @@
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
-#include <svl/aeitem.hxx> //CHINA001
+#include <svl/aeitem.hxx>
#include <svtools/cliplistener.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/viewoptions.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>
@@ -246,14 +249,16 @@ void lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs,
SequenceAsHashMap aMap(aArgs);
xReportControlFormat = aMap.getUnpackedValueOrDefault(REPORTCONTROLFORMAT,uno::Reference< report::XReportControlFormat>());
_xWindow = aMap.getUnpackedValueOrDefault(CURRENT_WINDOW,uno::Reference< awt::XWindow>());
- } // if ( aArgs.getLength() )
+ }
+
if ( !xReportControlFormat.is() )
{
_pView->fillControlModelSelection(_rControlsFormats);
- //xReportControlFormat.set( _pView->getCurrentControlModel(),uno::UNO_QUERY);
- } // if ( !xReportControlFormat.is() )
+ }
else
+ {
_rControlsFormats.push_back(xReportControlFormat);
+ }
if ( !_xWindow.is() )
_xWindow = VCLUnoHelper::GetInterface(_pView);
@@ -373,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();
}
}
@@ -392,7 +398,6 @@ void OReportController::disposing()
OReportController_BASE::disposing();
- // disconnect();
try
{
m_xReportDefinition.clear();
@@ -458,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:
@@ -1025,10 +1042,12 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
case SID_REDO:
case SID_UNDO:
{
- // const OXUndoEnvironment::OUndoEnvLock aLock( m_aReportModel->GetUndoEnv() );
- // 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();
}
@@ -1166,7 +1185,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 );
@@ -1193,14 +1212,6 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
InvalidateAll();
break;
case SID_INSERT_DIAGRAM:
- /*{
- OSectionView* pView = getCurrentSectionView();
- if ( pView )
- {
- Reference< awt::XWindow> xWindow = VCLUnoHelper::GetInterface(getView()->Window::GetParent());
- InsertChart(m_xContext,m_xReportDefinition.get(),xWindow,pView,getSdrModel().get());
- }
- }*/
getDesignView()->SetMode( RPTUI_INSERT );
getDesignView()->SetInsertObj( OBJ_OLE2);
createDefaultControl(aArgs);
@@ -1453,19 +1464,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));
- } // if ( !pListAction.get() )
uno::Reference< report::XReportControlFormat> xReportControlFormat(*aIter,uno::UNO_QUERY);
lcl_setFontWPU_nothrow(xReportControlFormat,_nId);
}
@@ -1529,32 +1537,37 @@ 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);
- } // if ( !pListAction.get() )
+ ::rptui::openCharDialog( xFormat, xWindow, aSettings );
+ if ( aSettings.getLength() == 0 )
+ break;
+ }
+
applyCharacterSettings( xFormat, aSettings );
}
- } // for(; aIter != aControlsFormats.end();++aIter)
- if ( !aControlsFormats.empty() )
+
InvalidateAll();
+ }
}
break;
- //case SID_FM_DESIGN_MODE:
- // break;
case SID_INSERT_GRAPHIC:
insertGraphic();
break;
@@ -1675,10 +1688,14 @@ void OReportController::impl_initialize( )
{
//m_sName = m_xReportDefinition->getName();
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::createFromAscii("normal")));
@@ -1830,7 +1847,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 );
@@ -2093,18 +2110,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)
{
@@ -2112,14 +2124,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() )
@@ -2220,7 +2224,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);
@@ -2233,7 +2237,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 )
@@ -2255,7 +2259,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 ) )
@@ -2306,16 +2310,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)
{
@@ -2334,12 +2339,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 ) )
@@ -2353,7 +2358,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;
@@ -2377,13 +2382,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);
@@ -2424,10 +2422,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,
@@ -2448,9 +2446,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() )
@@ -2484,7 +2482,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))
{
@@ -2538,13 +2536,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()
{
@@ -2598,19 +2607,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 );
@@ -2690,12 +2699,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)
{
@@ -3055,17 +3064,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;
}
// -----------------------------------------------------------------------------
@@ -3269,7 +3269,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)));
@@ -3297,7 +3297,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() )
{
@@ -3341,7 +3341,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
{
@@ -3809,19 +3809,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
@@ -3844,7 +3846,7 @@ void OReportController::switchReportSection(const sal_Int16 _nId)
}
if ( SID_REPORTHEADERFOOTER == _nId )
- getUndoMgr()->LeaveListAction();
+ pUndoContext.reset();
getView()->Resize();
}
}
@@ -3857,12 +3859,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
@@ -3870,7 +3873,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
@@ -3892,7 +3895,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
break;
}
if ( SID_PAGEHEADERFOOTER == _nId )
- getUndoMgr()->LeaveListAction();
+ pUndoContext.reset();
getView()->Resize();
}
}
@@ -3918,7 +3921,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,
@@ -3952,7 +3955,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
@@ -4207,23 +4210,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));
- } // if ( !pListAction.get() )
const uno::Reference< beans::XPropertySet > xControlModel(*aIter,uno::UNO_QUERY);
if ( xControlModel.is() )
xControlModel->setPropertyValue(_sProperty,_aValue);
- } // for(; aIter != aSelection.end();++aIter)
+ }
+
return !aSelection.empty();
}
// -----------------------------------------------------------------------------
@@ -4261,7 +4262,7 @@ void OReportController::openZoomDialog()
{
new SvxZoomItem()
};
- static USHORT pRanges[] =
+ static sal_uInt16 pRanges[] =
{
SID_ATTR_ZOOM,SID_ATTR_ZOOM,
0
@@ -4392,4 +4393,33 @@ 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 );
+}
diff --git a/reportdesign/source/ui/report/ReportRuler.cxx b/reportdesign/source/ui/report/ReportRuler.cxx
index c2480f23b3e5..e0bc9751ec49 100644
--- a/reportdesign/source/ui/report/ReportRuler.cxx
+++ b/reportdesign/source/ui/report/ReportRuler.cxx
@@ -53,7 +53,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 ffc77bc3c115..9ba3d888be5a 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_xSection(_xSection)
,m_nPaintEntranceCount(0)
,m_eMode(RPTUI_SELECT)
-,m_bDialogModelChanged(FALSE)
+,m_bDialogModelChanged(sal_False)
,m_bInDrag(sal_False)
{
DBG_CTOR( rpt_OReportSection,NULL);
@@ -205,7 +205,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
@@ -221,8 +221,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 )
@@ -238,7 +238,7 @@ void OReportSection::fill()
// LLA: TODO
// m_pPage->SetUppBorder(-10000);
- m_pView->SetDesignMode( TRUE );
+ m_pView->SetDesignMode( sal_True );
m_pView->StartListening( *m_pModel );
/*Resize();*/
@@ -361,14 +361,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();
@@ -391,7 +391,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
OSL_ENSURE(0,"Can't copy report elements!");
}
}
- } // for( ULONG i = 0; i < nMark; i++ )
+ } // for( sal_uLong i = 0; i < nMark; i++ )
if ( !aCopies.empty() )
{
@@ -425,7 +425,7 @@ void OReportSection::MouseMove( const MouseEvent& rMEvt )
}
//----------------------------------------------------------------------------
-void OReportSection::SetGridVisible(BOOL _bVisible)
+void OReportSection::SetGridVisible(sal_Bool _bVisible)
{
m_pView->SetGridVisible( _bVisible );
}
@@ -449,14 +449,14 @@ void OReportSection::SelectAll(const sal_uInt16 _nObjectType)
}
}
}
-void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rController,const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame,BOOL _bHiContrast)
+void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rController,const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame,sal_Bool _bHiContrast)
{
- 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 )
{
@@ -465,7 +465,7 @@ void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rContro
else
{
const ::rtl::OUString sCommand = rContextMenu.GetItemCommand(nId);
- rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,FALSE,_bHiContrast));
+ rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,sal_False,_bHiContrast));
if ( nId == SID_PAGEHEADERFOOTER )
{
String sText = String(ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT));
@@ -480,7 +480,7 @@ void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rContro
rContextMenu.CheckItem(nId,rController.isCommandChecked(nId));
rContextMenu.EnableItem(nId,rController.isCommandEnabled(nId));
}
- } // for (USHORT i = 0; i < nCount; ++i)
+ } // for (sal_uInt16 i = 0; i < nCount; ++i)
}
//----------------------------------------------------------------------------
void OReportSection::Command( const CommandEvent& _rCEvt )
@@ -491,7 +491,7 @@ void OReportSection::Command( const CommandEvent& _rCEvt )
case COMMAND_CONTEXTMENU:
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- BOOL bHiContrast = rSettings.GetHighContrastMode();
+ sal_Bool bHiContrast = rSettings.GetHighContrastMode();
OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController();
uno::Reference<frame::XFrame> xFrame = rController.getFrame();
PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
@@ -501,7 +501,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;
@@ -752,7 +752,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 b59c30faac5c..628e0028f0d2 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -105,7 +105,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);
}
@@ -121,7 +121,7 @@ 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());
@@ -129,7 +129,7 @@ void OReportWindow::removeSection(USHORT _nPosition)
//Resize();
}
//----------------------------------------------------------------------------
-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;
@@ -256,7 +256,7 @@ void OReportWindow::ScrollChildren(const Point& _aThumbPos)
m_aViewsWindow.scrollChildren(_aThumbPos);
}
//----------------------------------------------------------------------------
-USHORT OReportWindow::getSectionCount() const
+sal_uInt16 OReportWindow::getSectionCount() const
{
return m_aViewsWindow.getSectionCount();
}
@@ -266,7 +266,7 @@ void OReportWindow::notifySizeChanged()
m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight());
}
//----------------------------------------------------------------------------
-BOOL OReportWindow::HasSelection() const
+sal_Bool OReportWindow::HasSelection() const
{
return m_aViewsWindow.HasSelection();
}
@@ -289,7 +289,7 @@ void OReportWindow::Paste()
m_aViewsWindow.Paste();
}
//----------------------------------------------------------------------------
-BOOL OReportWindow::IsPasteAllowed() const
+sal_Bool OReportWindow::IsPasteAllowed() const
{
return m_aViewsWindow.IsPasteAllowed();
}
@@ -369,13 +369,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);
}
@@ -428,14 +428,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 b6ab83e24a64..13c65882e6c0 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();
}
@@ -380,12 +380,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 fc0cb8b8c310..6ea459d71470 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);
}
//----------------------------------------------------------------------------
@@ -163,16 +163,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;
}
}
@@ -188,8 +188,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) )
@@ -219,10 +219,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();
@@ -230,7 +230,7 @@ bool OSectionView::OnlyShapesMarked() const
{
break;
}
- } // for (ULONG i=0; i<nCount; i++)
+ } // for (sal_uLong i=0; i<nCount; i++)
return i == nCount;
}
@@ -254,7 +254,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 5cf8994cb1d2..7d5a7f4549e0 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -136,12 +136,12 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
{
static bool t4 = true;
if ( t4 )
- m_pParent->getView()->SetUpdateMode(FALSE);
+ m_pParent->getView()->SetUpdateMode(sal_False);
//Resize();
m_pParent->getView()->notifySizeChanged();
m_pParent->resize(*this);
if ( t4 )
- m_pParent->getView()->SetUpdateMode(TRUE);
+ m_pParent->getView()->SetUpdateMode(sal_True);
// getViewsWindow()->getView()->getReportView()->getController().resetZoomType();
}
else if ( _rEvent.PropertyName.equals(PROPERTY_NAME) && !xSection->getGroup().is() )
@@ -172,7 +172,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();
@@ -185,7 +185,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() ;
@@ -328,15 +328,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()->Resize();*/
+ 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 91a9af79caf8..289ba8c22fe6 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -86,7 +86,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol
m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH);
EnableChildTransparentMode( TRUE );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
}
// -----------------------------------------------------------------------------
OStartMarker::~OStartMarker()
@@ -110,7 +110,7 @@ sal_Int32 OStartMarker::getMinHeight() const
// -----------------------------------------------------------------------------
void OStartMarker::Paint( const Rectangle& rRect )
{
- //SetUpdateMode(FALSE);
+ //SetUpdateMode(sal_False);
Size aSize = GetOutputSizePixel();
long nSize = aSize.Width();
const long nCornerWidth = long(CORNER_SPACE * (double)GetMapMode().GetScaleX());
@@ -136,14 +136,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);
}
@@ -222,10 +222,10 @@ void OStartMarker::initDefaultNodeImages()
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 d092d43d08fd..2410e317c663 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -184,6 +184,7 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow)
,m_bInUnmark(sal_False)
{
DBG_CTOR( rpt_OViewsWindow,NULL);
+ SetPaintTransparent(sal_True);
SetUniqueId(UID_RPT_VIEWSWINDOW);
SetMapMode( MapMode( MAP_100TH_MM ) );
m_aColorConfig.AddListener(this);
@@ -267,7 +268,7 @@ void OViewsWindow::Resize()
Point aStartPoint(0,-aOffset.Y());
TSectionsMap::iterator aIter = m_aSections.begin();
TSectionsMap::iterator aEnd = m_aSections.end();
- for (USHORT nPos=0;aIter != aEnd ; ++aIter,++nPos)
+ for (sal_uInt16 nPos=0;aIter != aEnd ; ++aIter,++nPos)
{
const ::boost::shared_ptr<OSectionWindow> pSectionWindow = (*aIter);
impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,true);
@@ -311,14 +312,14 @@ 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));
m_pParent->setMarked(&pSectionWindow->getReportSection().getSectionView(),m_aSections.size() == 1);
}
//----------------------------------------------------------------------------
-void OViewsWindow::removeSection(USHORT _nPosition)
+void OViewsWindow::removeSection(sal_uInt16 _nPosition)
{
if ( _nPosition < m_aSections.size() )
{
@@ -332,7 +333,7 @@ void OViewsWindow::removeSection(USHORT _nPosition)
} // if ( _nPosition < m_aSections.size() )
}
//------------------------------------------------------------------------------
-void OViewsWindow::toggleGrid(BOOL _bVisible)
+void OViewsWindow::toggleGrid(sal_Bool _bVisible)
{
::std::for_each(m_aSections.begin(),m_aSections.end(),
::std::compose1(::boost::bind(&OReportSection::SetGridVisible,_1,_bVisible),TReportPairHelper()));
@@ -352,12 +353,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();
@@ -379,7 +380,7 @@ void OViewsWindow::SetMode( DlgEdMode eNewMode )
::std::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 +510,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());
@@ -583,7 +584,7 @@ void OViewsWindow::showRuler(sal_Bool _bShow)
::std::for_each(m_aSections.begin(),m_aSections.end(),
::std::compose1(::boost::bind(&OStartMarker::showRuler,_1,_bShow),TStartMarkerHelper()));
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(&OStartMarker::Window::Invalidate,_1,USHORT(INVALIDATE_NOERASE)),TStartMarkerHelper()));
+ ::std::compose1(::boost::bind(&OStartMarker::Window::Invalidate,_1,sal_uInt16(INVALIDATE_NOERASE)),TStartMarkerHelper()));
}
//----------------------------------------------------------------------------
void OViewsWindow::MouseButtonUp( const MouseEvent& rMEvt )
@@ -625,7 +626,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() )
@@ -740,7 +741,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
@@ -936,7 +937,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();
@@ -948,7 +949,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();
@@ -956,11 +957,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() )
@@ -972,7 +973,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;
@@ -1067,7 +1068,7 @@ void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _
// pNewObj->Move(Size(_aRect.Left(), _aRect.Top()));
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);
@@ -1324,10 +1325,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);
@@ -1355,7 +1356,7 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe
rReportSection.Copy(aAllreadyCopiedObjects,true);
}
else
- pInSection->EndDragObj(FALSE);
+ pInSection->EndDragObj(sal_False);
} // for (; aIter != aEnd; ++aIter)
if ( aAllreadyCopiedObjects.getLength() )
@@ -1426,7 +1427,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);
@@ -1566,9 +1567,9 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
#endif
}
// -----------------------------------------------------------------------------
-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)
@@ -1576,9 +1577,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)
@@ -1598,7 +1599,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
@@ -1754,13 +1755,13 @@ void OViewsWindow::handleKey(const KeyCode& _rCode)
if ( rView.IsDragObj() )
{
const FASTBOOL 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 efc19451725a..6001e2909937 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -189,11 +189,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 )
@@ -210,8 +210,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
@@ -222,7 +222,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);
}
@@ -239,10 +239,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;
@@ -250,9 +250,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;
}
@@ -261,7 +261,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() )
@@ -286,19 +286,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 )
{
@@ -307,12 +307,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() )
{
@@ -325,7 +325,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
//m_rView.UnmarkAll();
deactivateOle(true);
- bReturn = FALSE;
+ bReturn = sal_False;
}
else
{
@@ -348,7 +348,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())
{
@@ -365,7 +365,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
m_rView.MakeVisible( aVisRect, *m_pParent);
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -375,7 +375,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:
@@ -392,7 +392,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
case KEY_DELETE:
if ( !rCode.IsMod1() && !rCode.IsMod2() )
{
- bReturn = TRUE;
+ bReturn = sal_True;
break;
} // if ( !rCode.IsMod1() && !rCode.IsMod2() )
// run through
@@ -414,7 +414,7 @@ void DlgEdFunc::activateOle(SdrObject* _pObj)
{
if ( _pObj )
{
- const UINT16 nSdrObjKind = _pObj->GetObjIdentifier();
+ const sal_uInt16 nSdrObjKind = _pObj->GetObjIdentifier();
//
// OLE: activate
//
@@ -456,8 +456,8 @@ void DlgEdFunc::deactivateOle(bool _bSelect)
{
OLEObjCache& rObjCache = GetSdrGlobalData().GetOLEObjCache();
OReportController& rController = m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->getController();
- 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() )
@@ -479,7 +479,7 @@ void DlgEdFunc::deactivateOle(bool _bSelect)
}
} // if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::UI_ACTIVE )
}
- } // for(ULONG i = 0 ; i< nCount;++i)
+ } // for(sal_uLong i = 0 ; i< nCount;++i)
}
// -----------------------------------------------------------------------------
void DlgEdFunc::colorizeOverlappedObject(SdrObject* _pOverlappedObj)
@@ -679,22 +679,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();
@@ -711,7 +711,7 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
// rtl::OUString suWasN2 = m_pParent->getSectionWindow()->getViewsWindow()->GetInsertObjString();
m_pParent->getSectionWindow()->getViewsWindow()->BrkAction();
- return FALSE;
+ return sal_False;
}
if( eHit != SDRHIT_UNMARKEDOBJECT || nId == OBJ_CUSTOMSHAPE)
@@ -736,19 +736,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() )
{
@@ -756,8 +756,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);
@@ -804,10 +804,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() )
@@ -838,7 +838,7 @@ BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
if ( !bIsSetPoint )
m_pParent->SetPointer( m_rView.GetPreferedPointer( aPos, m_pParent) );
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
@@ -856,11 +856,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);
@@ -898,15 +898,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() ) );
@@ -922,15 +922,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;
@@ -977,10 +977,10 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
unColorizeOverlappedObj();
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-//void DlgEdFuncSelect::SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, BOOL bQuickDrag)
+//void DlgEdFuncSelect::SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, sal_Bool bQuickDrag)
//{
//
// SdrPageView* pPV = m_rView.GetSdrPageView();
@@ -989,12 +989,12 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
// m_rView.SetCurrentObj(OBJ_TEXT);
// m_rView.SetEditMode(SDREDITMODE_EDIT);
//
-// BOOL bEmptyOutliner = FALSE;
+// sal_Bool bEmptyOutliner = sal_False;
//
// if (!_pTextObj->GetOutlinerParaObject() && m_rView.GetTextEditOutliner())
// {
// ::SdrOutliner* pOutl = m_rView.GetTextEditOutliner();
-// ULONG nParaAnz = pOutl->GetParagraphCount();
+// sal_uLong nParaAnz = pOutl->GetParagraphCount();
// Paragraph* p1stPara = pOutl->GetParagraph( 0 );
//
// if (nParaAnz==1 && p1stPara)
@@ -1002,15 +1002,15 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
// // Bei nur einem Pararaph
// if (pOutl->GetText(p1stPara).Len() == 0)
// {
-// bEmptyOutliner = TRUE;
+// bEmptyOutliner = sal_True;
// }
// }
// }
//
// if (_pTextObj != m_rView.GetTextEditObject() || bEmptyOutliner)
// {
-// UINT32 nInv = _pTextObj->GetObjInventor();
-// UINT16 nSdrObjKind = _pTextObj->GetObjIdentifier();
+// sal_uInt32 nInv = _pTextObj->GetObjInventor();
+// sal_uInt16 nSdrObjKind = _pTextObj->GetObjIdentifier();
//
// if (nInv == SdrInventor && _pTextObj->HasTextEdit() &&
// (nSdrObjKind == OBJ_TEXT ||
@@ -1024,7 +1024,7 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
// pOutl->SetMinDepth(0);
// pOutl->SetStyleSheetPool((SfxStyleSheetPool*) pModel->GetStyleSheetPool());
// //pOutl->SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl));
-// ULONG nCntrl = pOutl->GetControlWord();
+// sal_uLong nCntrl = pOutl->GetControlWord();
// nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
// nCntrl |= EE_CNTRL_URLSFXEXECUTE;
// nCntrl |= EE_CNTRL_MARKFIELDS;
@@ -1067,12 +1067,12 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
// if( ( pOPO && pOPO->IsVertical() ) /*||
// nSlotId == SID_ATTR_CHAR_VERTICAL ||
// nSlotId == SID_TEXT_FITTOSIZE_VERTICAL */)
-// pOutl->SetVertical( TRUE );
+// pOutl->SetVertical( sal_True );
//
//
// if (m_rView.SdrBeginTextEdit(_pTextObj, pPV, pParent, sal_True, pOutl) && _pTextObj->GetObjInventor() == SdrInventor)
// {
-// //bFirstObjCreated = TRUE;
+// //bFirstObjCreated = sal_True;
// //DeleteDefaultText();
//
// OutlinerView* pOLV = m_rView.GetTextEditOutlinerView();
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index 9e9ae8dffced..c737ce5c3f34 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -311,7 +311,7 @@ sal_Bool PropBrw::Close()
m_pDesignView->getController().executeUnChecked(SID_PROPERTYBROWSER_LAST_PAGE,uno::Sequence< beans::PropertyValue>());
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
@@ -545,8 +545,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 )