diff options
author | Release Engineers <releng@openoffice.org> | 2008-12-01 12:31:27 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2008-12-01 12:31:27 +0000 |
commit | 2363c961947028ee152cbdfca7e4b4d1099ca019 (patch) | |
tree | d4e60312f0d4cca1098aa9ea181329711867e53e /reportdesign | |
parent | f2c90bcc552da21d692df2abeaf3997f8a7eda78 (diff) |
CWS-TOOLING: integrate CWS dba31e
2008-11-19 12:36:23 +0100 msc r263980 : i96104
2008-11-19 12:31:19 +0100 msc r263979 : i96104
2008-11-19 12:21:55 +0100 msc r263977 : i96104
2008-11-19 12:18:53 +0100 msc r263976 : i96104
2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set
2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry
2008-11-17 11:20:25 +0100 fs r263708 : #i10000#
2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1
2008-11-12 22:25:59 +0100 fs r263621 : #i96150#
2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34
2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34
2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled
2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come
2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively
2008-11-11 16:11:11 +0100 msc r263566 : #i96104#
2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added
2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added
2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases
2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync
2008-11-04 20:49:50 +0100 fs r263335 : docu formatting
2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts)
2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing
2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control
2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn
2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn
2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn
2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn
2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn
2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn
2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn
2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn
2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN
2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
Diffstat (limited to 'reportdesign')
41 files changed, 840 insertions, 651 deletions
diff --git a/reportdesign/images/em42.png b/reportdesign/images/em42.png Binary files differnew file mode 100644 index 000000000000..31f48ea8fb69 --- /dev/null +++ b/reportdesign/images/em42.png diff --git a/reportdesign/images/em42_hc.png b/reportdesign/images/em42_hc.png Binary files differnew file mode 100644 index 000000000000..3870cc4709d4 --- /dev/null +++ b/reportdesign/images/em42_hc.png diff --git a/reportdesign/inc/RptResId.hrc b/reportdesign/inc/RptResId.hrc index f22819d4e9f4..0faa2de30a08 100644 --- a/reportdesign/inc/RptResId.hrc +++ b/reportdesign/inc/RptResId.hrc @@ -227,6 +227,7 @@ #define RID_ERR_NO_COMMAND (RID_STRING_START + 151) #define RID_ERR_NO_OBJECTS (RID_STRING_START + 152) #define RID_STR_AREA (RID_STRING_START + 153) +#define RID_STR_NONE (RID_STRING_START + 154) // #define RID_STR_ (RID_STRING_START + 130) // ----------------------------------------------------------------------- diff --git a/reportdesign/registry/data/org/openoffice/Office/UI/ReportCommands.xcu b/reportdesign/registry/data/org/openoffice/Office/UI/ReportCommands.xcu index bfcce7dc5aba..90bbcb2a5e6e 100644 --- a/reportdesign/registry/data/org/openoffice/Office/UI/ReportCommands.xcu +++ b/reportdesign/registry/data/org/openoffice/Office/UI/ReportCommands.xcu @@ -8,7 +8,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ReportCommands.xcu,v $ - * $Revision: 1.2 $ + * $Revision: 1.2.2.1 $ * * This file is part of OpenOffice.org. * @@ -88,14 +88,12 @@ </node> <node oor:name=".uno:InsertDateTimeField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">~Datum und Zeit...</value> <value xml:lang="en-US">~Date and Time...</value> </prop> </node> <node oor:name=".uno:SelectReport" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">~Bericht markieren...</value> - <value xml:lang="en-US">~Select Report...</value> + <value xml:lang="en-US">~Select Report</value> </prop> </node> <node oor:name=".uno:SubReportInNewWindow" oor:op="replace"> @@ -253,7 +251,6 @@ </node> <node oor:name=".uno:SectionAlignBottom" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Unten am Bereich</value> <value xml:lang="en-US">Bottom Align on Section</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -262,19 +259,27 @@ </node> <node oor:name=".uno:SectionAlignCenter" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Zentriert am Bereich</value> <value xml:lang="en-US">Centered on Section</value> </prop> </node> <node oor:name=".uno:SectionAlignMiddle" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Mittig am Bereich</value> <value xml:lang="en-US">Middle on Section</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> </prop> </node> + <node oor:name=".uno:SelectAllLabels" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Select all Labels</value> + </prop> + </node> + <node oor:name=".uno:SelectAllEdits" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Select all Formatted Fields</value> + </prop> + </node> </node> <node oor:name="Popups"> <node oor:name=".uno:ExportReportTo" oor:op="replace"> diff --git a/reportdesign/source/core/api/Group.cxx b/reportdesign/source/core/api/Group.cxx index c2939a8ce9f1..ec26696f8ec6 100644 --- a/reportdesign/source/core/api/Group.cxx +++ b/reportdesign/source/core/api/Group.cxx @@ -125,8 +125,10 @@ void SAL_CALL OGroup::dispose() throw(uno::RuntimeException) // void SAL_CALL OGroup::disposing() { - ::comphelper::disposeComponent(m_xHeader); - ::comphelper::disposeComponent(m_xFooter); + m_xHeader.clear(); + m_xFooter.clear(); + //::comphelper::disposeComponent(m_xHeader); + //::comphelper::disposeComponent(m_xFooter); ::comphelper::disposeComponent(m_xFunctions); m_xContext.clear(); } diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 0f7ab046cc41..11142178063e 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -582,7 +582,11 @@ struct OReportDefinitionImpl ,m_bModified(_aCopy.m_bModified) ,m_bEscapeProcessing(_aCopy.m_bEscapeProcessing) {} + ~OReportDefinitionImpl(); }; +OReportDefinitionImpl::~OReportDefinitionImpl() +{ +} DBG_NAME( rpt_OReportDefinition ) // ----------------------------------------------------------------------------- @@ -718,11 +722,16 @@ void SAL_CALL OReportDefinition::disposing() m_pImpl->m_aStorageChangeListeners.disposeAndClear( aDisposeEvent ); ::comphelper::disposeComponent(m_pImpl->m_xGroups); - ::comphelper::disposeComponent(m_pImpl->m_xReportHeader); - ::comphelper::disposeComponent(m_pImpl->m_xReportFooter); - ::comphelper::disposeComponent(m_pImpl->m_xPageHeader); - ::comphelper::disposeComponent(m_pImpl->m_xPageFooter); - ::comphelper::disposeComponent(m_pImpl->m_xDetail); + m_pImpl->m_xReportHeader.clear(); + m_pImpl->m_xReportFooter.clear(); + m_pImpl->m_xPageHeader.clear(); + m_pImpl->m_xPageFooter.clear(); + m_pImpl->m_xDetail.clear(); + //::comphelper::disposeComponent(m_pImpl->m_xReportHeader); + //::comphelper::disposeComponent(m_pImpl->m_xReportFooter); + //::comphelper::disposeComponent(m_pImpl->m_xPageHeader); + //::comphelper::disposeComponent(m_pImpl->m_xPageFooter); + //::comphelper::disposeComponent(m_pImpl->m_xDetail); ::comphelper::disposeComponent(m_pImpl->m_xFunctions); //::comphelper::disposeComponent(m_pImpl->m_xStorage); diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index 84bfb62480fe..14118e0baaad 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -172,6 +172,7 @@ uno::Any SAL_CALL OSection::queryInterface( const uno::Type& _rType ) throw (uno // ----------------------------------------------------------------------------- void SAL_CALL OSection::dispose() throw(uno::RuntimeException) { + OSL_ENSURE(!rBHelper.bDisposed,"Already disposed!"); SectionPropertySet::dispose(); cppu::WeakComponentImplHelperBase::dispose(); diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index c2b3714526f4..f6cd4ca66ab5 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -562,7 +562,10 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) static const ::rtl::OUString s_sOld(RTL_CONSTASCII_USTRINGPARAM("OldFormat")); static comphelper::PropertyMapEntry pMap[] = { - {"OldFormat", 9, 1, &::getCppuType((const sal_Bool*)0) ,PropertyAttribute::BOUND,0}, + { MAP_LEN( "OldFormat" ), 1, &::getCppuType((const sal_Bool*)0), beans::PropertyAttribute::BOUND, 0 }, + { MAP_LEN( "StreamName"), 0, &::getCppuType( (::rtl::OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { MAP_LEN("PrivateData"), 0, &::getCppuType( (uno::Reference<XInterface> *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { MAP_LEN( "StreamName"), 0,&::getCppuType( (::rtl::OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, { MAP_LEN( "StreamName"), 0,&::getCppuType( (::rtl::OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, { NULL, 0, 0, NULL, 0, 0 } }; diff --git a/reportdesign/source/inc/uistrings.hrc b/reportdesign/source/inc/uistrings.hrc index 6cd0e28323dd..c6e4669f6b74 100644 --- a/reportdesign/source/inc/uistrings.hrc +++ b/reportdesign/source/inc/uistrings.hrc @@ -68,6 +68,11 @@ DECLARE_CONSTASCII_USTRING(PROPERTY_TITLE ); DECLARE_CONSTASCII_USTRING(PROPERTY_AREA ); DECLARE_CONSTASCII_USTRING(PROPERTY_FILLCOLOR ); +DECLARE_CONSTASCII_USTRING(PROPERTY_FILLGRADIENT ); +DECLARE_CONSTASCII_USTRING(PROPERTY_FILLGRADIENTNAME ); +DECLARE_CONSTASCII_USTRING(PROPERTY_FILLHATCHNAME ); +DECLARE_CONSTASCII_USTRING(PROPERTY_FILLBITMAPNAME ); +DECLARE_CONSTASCII_USTRING(PROPERTY_FILLSTYLE ); } #endif // REPORTDESIGN_SHARED_UISTRINGS_HRC diff --git a/reportdesign/source/shared/uistrings.cxx b/reportdesign/source/shared/uistrings.cxx index f8593d6f67fc..2fc710228552 100644 --- a/reportdesign/source/shared/uistrings.cxx +++ b/reportdesign/source/shared/uistrings.cxx @@ -62,5 +62,10 @@ namespace rptui IMPLEMENT_CONSTASCII_USTRING(PROPERTY_AREA , "Area"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLCOLOR , "FillColor"); + IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLGRADIENT , "FillGradient"); + IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLGRADIENTNAME , "FillGradientName"); + IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLHATCHNAME , "FillHatchName"); + IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLBITMAPNAME , "FillBitmapName"); + IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLSTYLE , "FillStyle"); } diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index bc072711e45a..47d75744ee1b 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -34,23 +34,28 @@ #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/report/XSection.hpp> #include <com/sun/star/report/XReportComponent.hpp> -#include <vcl/split.hxx> -#include <vcl/scrbar.hxx> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/datatransfer/DataFlavor.hpp> #include <tools/link.hxx> #include <tools/gen.hxx> + #include <vcl/timer.hxx> +#include <vcl/tabpage.hxx> +#include <vcl/splitwin.hxx> +#include <vcl/split.hxx> +#include <vcl/scrbar.hxx> + #include <svtools/hint.hxx> #include <svtools/brdcst.hxx> -#include <comphelper/stl_types.hxx> -#include "ReportDefines.hxx" #include <svtools/colorcfg.hxx> #include <boost/shared_ptr.hpp> #include <svx/svdedtv.hxx> -#include <vcl/tabpage.hxx> -#include <vcl/splitwin.hxx> -#include <MarkedSection.hxx> +#include <svx/zoomitem.hxx> + +#include <comphelper/stl_types.hxx> + +#include "ReportDefines.hxx" +#include "MarkedSection.hxx" #include "ScrollHelper.hxx" class KeyEvent; @@ -276,12 +281,17 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const sal_Int16 _nZoom); + void zoom(const Fraction& _aZoom); /** fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before. */ void fillControlModelSelection(::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rSelection) const; + + /** calculates the zoom factor. + @param _eType which kind of zoom is needed + */ + sal_uInt16 getZoomFactor(SvxZoomType _eType) const; }; //================================================================== } //rptui diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index 44928a9f01c5..40e45fc67457 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -53,6 +53,7 @@ #include <svtools/transfer.hxx> #include <svtools/lstner.hxx> #include <svx/svdedtv.hxx> +#include <svx/zoomitem.hxx> #include "ModuleHelper.hxx" #include <comphelper/uno3.hxx> @@ -116,8 +117,8 @@ namespace rptui ::rtl::OUString m_sMode; /// the current mode of the controller sal_Int32 m_nSplitPos; /// the position of the splitter sal_Int32 m_nPageNum; /// the page number from the restoreView call - //sal_Int32 m_nExecuteReportEvent; sal_Int16 m_nZoomValue; + SvxZoomType m_eZoomType; sal_Bool m_bShowRuler; sal_Bool m_bGridVisible; sal_Bool m_bGridUse; @@ -176,6 +177,10 @@ namespace rptui */ void openSortingAndGroupingDialog(); + /** opens the zoom dialog + */ + void openZoomDialog(); + /** returns the position of the group inside the groups collection */ sal_Int32 getGroupPosition(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup); @@ -419,7 +424,8 @@ namespace rptui ::boost::shared_ptr<rptui::OReportModel> getSdrModel(); inline ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getContext() const { return m_xContext; } - inline sal_Int16 getZoomValue() const { return m_nZoomValue; } + inline sal_Int16 getZoomValue() const { return m_nZoomValue; } + inline void resetZoomType() { m_eZoomType = SVX_ZOOM_PERCENT; } // com::sun::star::beans::XPropertySet virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx index ba4e96d6a0c7..0cbe48c38203 100644 --- a/reportdesign/source/ui/inc/ReportWindow.hxx +++ b/reportdesign/source/ui/inc/ReportWindow.hxx @@ -35,6 +35,7 @@ #include "StartMarker.hxx" #include <svtools/ruler.hxx> #include <svx/svdedtv.hxx> +#include <svx/zoomitem.hxx> #include <vector> #include <boost/shared_ptr.hpp> @@ -68,6 +69,7 @@ namespace rptui void ImplInitSettings(); sal_Int32 GetTotalHeight() const; + sal_Int32 impl_getRealPixelWidth() const; OReportWindow(OReportWindow&); void operator =(OReportWindow&); @@ -120,7 +122,7 @@ namespace rptui */ BOOL HasSelection(); - Point getScrollOffset() const; + Point getThumbPos() const; /** removes the section at the given position. * @@ -162,9 +164,9 @@ namespace rptui */ sal_Int32 getMaxMarkerWidth(sal_Bool _bWithEnd) const; - void ScrollChildren(long nDeltaX, long nDeltaY); + void ScrollChildren(const Point& _aThumbPos); - void notifyHeightChanged(); + void notifySizeChanged(); /** unmark all objects on the views without the given one. * @@ -220,12 +222,17 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const sal_Int16 _nZoom); + void zoom(const Fraction& _aZoom); /** fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before. */ void fillControlModelSelection(::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rSelection) const; + + /** calculates the zoom factor. + @param _eType which kind of zoom is needed + */ + sal_uInt16 getZoomFactor(SvxZoomType _eType) const; }; //================================================================== } //rptui diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx index 76e8695ef8d9..5321103b7c78 100644 --- a/reportdesign/source/ui/inc/ScrollHelper.hxx +++ b/reportdesign/source/ui/inc/ScrollHelper.hxx @@ -66,7 +66,6 @@ namespace rptui ScrollBar m_aVScroll; ScrollBarBox m_aCornerWin; // window in the bottom right corner Size m_aTotalPixelSize; - Point m_aPixOffset; // offset to virtual window (pixel) ODesignView* m_pParent; OReportWindow m_aReportWindow; ::rtl::Reference<comphelper::OPropertyChangeMultiplexer > @@ -76,7 +75,6 @@ namespace rptui Size ResizeScrollBars(); void ImplInitSettings(); void impl_initScrollBar( ScrollBar& _rScrollBar ) const; - void impl_scrollContent( long nDeltaX, long nDeltaY ); OScrollWindowHelper(OScrollWindowHelper&); void operator =(OScrollWindowHelper&); @@ -95,7 +93,7 @@ namespace rptui */ void initialize(); - inline Point getScrollOffset() const { return Point(m_aHScroll.GetThumbPos(),m_aVScroll.GetThumbPos())/*m_aScrollOffset*/; } + inline Point getThumbPos() const { return Point(m_aHScroll.GetThumbPos(),m_aVScroll.GetThumbPos())/*m_aScrollOffset*/; } inline const OReportWindow& getReportWindow() const { return m_aReportWindow; } void setTotalSize(sal_Int32 _nWidth ,sal_Int32 _nHeight); inline Size getTotalSize() const { return m_aTotalPixelSize; } @@ -218,12 +216,17 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const sal_Int16 _nZoom); + void zoom(const Fraction& _aZoom); /** fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before. */ void fillControlModelSelection(::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rSelection) const; + + /** calculates the zoom factor. + @param _eType which kind of zoom is needed + */ + sal_uInt16 getZoomFactor(SvxZoomType _eType) const; }; } #endif // RPTUI_SCROLLHELPER_HXX diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx index 0f0bfe73effe..cf1ecb056646 100644 --- a/reportdesign/source/ui/inc/SectionWindow.hxx +++ b/reportdesign/source/ui/inc/SectionWindow.hxx @@ -121,9 +121,9 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const sal_Int16 _nZoom); + void zoom(const Fraction& _aZoom); - void scrollChildren(long _nDeltaX); + void scrollChildren(long _nThumbPosX); }; //============================================================================== } // rptui diff --git a/reportdesign/source/ui/inc/StartMarker.hxx b/reportdesign/source/ui/inc/StartMarker.hxx index 268119e44927..bbe4204eb989 100644 --- a/reportdesign/source/ui/inc/StartMarker.hxx +++ b/reportdesign/source/ui/inc/StartMarker.hxx @@ -87,7 +87,7 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const sal_Int16 _nZoom); + void zoom(const Fraction& _aZoom); }; } #endif // RPTUI_STARTMARKER_HXX diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx index 4885dc361aca..28b42b65402b 100644 --- a/reportdesign/source/ui/inc/UITools.hxx +++ b/reportdesign/source/ui/inc/UITools.hxx @@ -166,10 +166,10 @@ namespace rptui Rectangle getRectangleFromControl(SdrObject* pControl); /** sets the map mode at the window - @param _nZoom in percentage + @param _aZoom the zoom scale @param _rWindow where to set the map mode */ - void setZoomFactor(const sal_Int16 _nZoom,Window& _rWindow); + void setZoomFactor(const Fraction& _aZoom,Window& _rWindow); } #endif //RPTUI_UITOOLS_HXX diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index b7b419f70db3..995b59e7adba 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -353,9 +353,9 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const sal_Int16 _nZoom); + void zoom(const Fraction& _aZoom); - void scrollChildren(long nDeltaX, long nDeltaY); + void scrollChildren(const Point& _aThumbPos); /** fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before. diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx index 7e38f5f99a60..2d320df2385a 100644 --- a/reportdesign/source/ui/inc/metadata.hxx +++ b/reportdesign/source/ui/inc/metadata.hxx @@ -107,6 +107,7 @@ namespace rptui //======================================================================== //= property ids (for all browseable properties) + //= The ID is used for the view order in the property browser. //======================================================================== #define PROPERTY_ID_FORCENEWPAGE 1 @@ -135,10 +136,12 @@ namespace rptui #define PROPERTY_ID_PRINTWHENGROUPCHANGE 24 #define PROPERTY_ID_DEEPTRAVERSING 25 #define PROPERTY_ID_PREEVALUATED 26 - #define PROPERTY_ID_BACKCOLOR 27 - #define PROPERTY_ID_BACKTRANSPARENT 28 - #define PROPERTY_ID_CONTROLBACKGROUND 29 - #define PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT 30 + + #define PROPERTY_ID_BACKCOLOR 29 + #define PROPERTY_ID_CONTROLBACKGROUND 30 + #define PROPERTY_ID_BACKTRANSPARENT 27 + #define PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT 28 + #define PROPERTY_ID_FORMULALIST 31 #define PROPERTY_ID_SCOPE 32 #define PROPERTY_ID_RESETPAGENUMBER 33 diff --git a/reportdesign/source/ui/inc/statusbarcontroller.hxx b/reportdesign/source/ui/inc/statusbarcontroller.hxx index f736e129c519..613ec72b5627 100644 --- a/reportdesign/source/ui/inc/statusbarcontroller.hxx +++ b/reportdesign/source/ui/inc/statusbarcontroller.hxx @@ -51,16 +51,20 @@ namespace rptui public: OStatusbarController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); + static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException ); + static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL + create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext); + + private: + void SAL_CALL OStatusbarController::dispose() throw (::com::sun::star::uno::RuntimeException); // XInterface DECLARE_XINTERFACE( ) // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); // need by registration - static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException ); - static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext); + virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); // XInitialization diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index aa0abdc7a278..3940e8e8326a 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -43,6 +43,7 @@ #include <svtools/syslocale.hxx> #include <tools/diagnose_ex.h> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> #include "com/sun/star/inspection/StringRepresentation.hpp" #include <com/sun/star/inspection/PropertyLineElement.hpp> #include <com/sun/star/inspection/PropertyControlType.hpp> @@ -441,6 +442,43 @@ uno::Any SAL_CALL GeometryHandler::getPropertyValue(const ::rtl::OUString & Prop aPropertyValue.clear(); } break; + case PROPERTY_ID_AREA: + { + drawing::FillStyle aFillStyle; + m_xReportComponent->getPropertyValue(PROPERTY_FILLSTYLE) >>= aFillStyle; + ::rtl::OUString sProperty; + switch(aFillStyle) + { + case drawing::FillStyle_GRADIENT: + sProperty = PROPERTY_FILLGRADIENTNAME; + break; + case drawing::FillStyle_HATCH: + sProperty = PROPERTY_FILLHATCHNAME; + break; + case drawing::FillStyle_BITMAP: + sProperty = PROPERTY_FILLBITMAPNAME; + break; + case drawing::FillStyle_NONE: + { + const ::rtl::OUString sNone = String( ModuleRes( RID_STR_NONE ) ); + aPropertyValue <<= sNone; + break; + } + default: + break; + } + + if ( sProperty.getLength() ) + { + aPropertyValue = m_xReportComponent->getPropertyValue(sProperty); + //if ( drawing::FillStyle_GRADIENT == aFillStyle ) + //{ + // static const ::rtl::OUString s_sFillTransparenceGradientName(RTL_CONSTASCII_USTRINGPARAM("FillTransparenceGradientName")); + // aPropertyValue = m_xReportComponent->getPropertyValue(s_sFillTransparenceGradientName); + //} + } + } + break; default: aPropertyValue = m_xReportComponent->getPropertyValue( PropertyName ); break; @@ -1024,9 +1062,11 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const ::rtl::OUString return m_xFormComponentHandler->convertToPropertyValue(PROPERTY_FONTNAME, _rControlValue); case PROPERTY_ID_SCOPE: case PROPERTY_ID_FORMULALIST: - case PROPERTY_ID_AREA: aPropertyValue = _rControlValue; break; + case PROPERTY_ID_AREA: + //aPropertyValue = _rControlValue; + break; case PROPERTY_ID_TYPE: { ::rtl::OUString sValue; @@ -1251,13 +1291,12 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie } // for (size_t i = 0; i < sizeof(pIncludeProperties)/sizeof(pIncludeProperties[0]) ;++i ) // special property for shapes -// if ( uno::Reference< report::XShape>(m_xReportComponent,uno::UNO_QUERY).is() ) -// { -// beans::Property aValue; -// aValue.Name = PROPERTY_AREA; -// aNewProps.push_back(aValue); -// } - // re-enable when the remaining issues of #i88727# are fixed + if ( uno::Reference< report::XShape>(m_xReportComponent,uno::UNO_QUERY).is() ) + { + beans::Property aValue; + aValue.Name = PROPERTY_AREA; + aNewProps.push_back(aValue); + } return uno::Sequence< beans::Property > (&(*aNewProps.begin()),aNewProps.size()); } @@ -1283,12 +1322,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL GeometryHandler::getActuatingPropertie { ::osl::MutexGuard aGuard( m_aMutex ); - uno::Sequence< ::rtl::OUString > aSeq(5); + uno::Sequence< ::rtl::OUString > aSeq(7); aSeq[0] = PROPERTY_BACKTRANSPARENT; aSeq[1] = PROPERTY_CONTROLBACKGROUNDTRANSPARENT; aSeq[2] = PROPERTY_FORMULALIST; aSeq[3] = PROPERTY_TYPE; aSeq[4] = PROPERTY_DATAFIELD; + aSeq[5] = PROPERTY_FILLSTYLE; + aSeq[6] = PROPERTY_FILLCOLOR; return ::comphelper::concatSequences(m_xFormComponentHandler->getActuatingProperties(),aSeq); } @@ -1339,15 +1380,15 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled; const uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DialogParentWindow"))) ,uno::UNO_QUERY); const uno::Reference< report::XShape> xShape(m_xReportComponent,uno::UNO_QUERY); + aGuard.clear(); if ( rptui::openAreaDialog( xShape, xInspectorWindow) ) { eResult = inspection::InteractiveSelectionResult_ObtainedValue; beans::PropertyChangeEvent aScopeEvent; - aScopeEvent.PropertyName = PROPERTY_FILLCOLOR; - // aScopeEvent.OldValue <<= _nOldDataFieldType; - aScopeEvent.NewValue <<= xShape->getPropertyValue(PROPERTY_FILLCOLOR); + aScopeEvent.PropertyName = PROPERTY_FILLSTYLE; + aScopeEvent.NewValue = xShape->getPropertyValue(PROPERTY_FILLSTYLE); m_aPropertyListeners.notify( aScopeEvent, &beans::XPropertyChangeListener::propertyChange ); } return eResult; @@ -1363,79 +1404,102 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString & throw lang::NullPointerException(); ::osl::MutexGuard aGuard( m_aMutex ); - const sal_Int32 nId = m_pInfoService->getPropertyId(ActuatingPropertyName); - switch(nId) + if ( ActuatingPropertyName == PROPERTY_FILLSTYLE ) { - case PROPERTY_ID_TYPE: - { - sal_uInt32 nNewVal = 0; - NewValue >>= nNewVal; - switch(nNewVal) + drawing::FillStyle aFillStyle; + NewValue >>= aFillStyle; + const sal_Bool bEnable = aFillStyle == drawing::FillStyle_SOLID; + _rxInspectorUI->enablePropertyUI(PROPERTY_FILLCOLOR,bEnable); + if ( bEnable ) + _rxInspectorUI->rebuildPropertyUI(PROPERTY_FILLCOLOR); + + _rxInspectorUI->rebuildPropertyUI(PROPERTY_AREA); + } // if ( ActuatingPropertyName == PROPERTY_FILLSTYLE || ActuatingPropertyName == PROPERTY_FILLCOLOR ) + else if ( ActuatingPropertyName == PROPERTY_FILLCOLOR ) + { + if ( m_xReportComponent.is() && m_xReportComponent->getPropertySetInfo()->hasPropertyByName(PROPERTY_FILLSTYLE) ) + { + drawing::FillStyle aFillStyle; + m_xReportComponent->getPropertyValue( PROPERTY_FILLSTYLE ) >>= aFillStyle; + _rxInspectorUI->enablePropertyUI(PROPERTY_FILLCOLOR,aFillStyle == drawing::FillStyle_SOLID); + } + } + else + { + const sal_Int32 nId = m_pInfoService->getPropertyId(ActuatingPropertyName); + switch(nId) + { + case PROPERTY_ID_TYPE: { - case DATA_OR_FORMULA: - _rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD); - _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_True); - _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,sal_False); - _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,sal_False); - OSL_ENSURE(m_sDefaultFunction.getLength() == 0,"Why is the m_sDefaultFunction set?"); - OSL_ENSURE(m_sScope.getLength() == 0,"Why is the m_sScope set?"); - break; - case FUNCTION: + sal_uInt32 nNewVal = 0; + NewValue >>= nNewVal; + switch(nNewVal) + { + case DATA_OR_FORMULA: + _rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD); + _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_True); + _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,sal_False); + _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,sal_False); + OSL_ENSURE(m_sDefaultFunction.getLength() == 0,"Why is the m_sDefaultFunction set?"); + OSL_ENSURE(m_sScope.getLength() == 0,"Why is the m_sScope set?"); + break; + case FUNCTION: + _rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD); + _rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST); + _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_True); + _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,m_sDefaultFunction.getLength() != 0); + _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,m_sScope.getLength() != 0); + break; + case USER_DEF_FUNCTION: + _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_False); + _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,sal_True); + _rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST); + _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,sal_False); + break; + case COUNTER: + _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_False); + _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,sal_False); + _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,sal_True); + break; + } + } + break; + case PROPERTY_ID_DATAFIELD: + { + sal_Bool bEnable = (m_nDataFieldType != DATA_OR_FORMULA && m_nDataFieldType != COUNTER ); + if ( bEnable ) + { + ::rtl::OUString sValue; + m_xReportComponent->getPropertyValue( PROPERTY_DATAFIELD ) >>= sValue; + bEnable = sValue.getLength() != 0; + } + _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,bEnable); + if ( bEnable ) + { _rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD); _rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST); - _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_True); - _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,m_sDefaultFunction.getLength() != 0); - _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,m_sScope.getLength() != 0); - break; - case USER_DEF_FUNCTION: - _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_False); - _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,sal_True); - _rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST); - _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,sal_False); - break; - case COUNTER: - _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_False); - _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,sal_False); - _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,sal_True); - break; + } } - } - break; - case PROPERTY_ID_DATAFIELD: - { - sal_Bool bEnable = (m_nDataFieldType != DATA_OR_FORMULA && m_nDataFieldType != COUNTER ); - if ( bEnable ) + break; + case PROPERTY_ID_FORMULALIST: { - ::rtl::OUString sValue; - m_xReportComponent->getPropertyValue( PROPERTY_DATAFIELD ) >>= sValue; - bEnable = sValue.getLength() != 0; + _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,m_nDataFieldType == FUNCTION || m_nDataFieldType == COUNTER); } - _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,bEnable); - if ( bEnable ) + break; + case PROPERTY_ID_BACKTRANSPARENT: + case PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT: { - _rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD); - _rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST); + sal_Bool bValue = sal_False; + NewValue >>= bValue; + bValue = !bValue; + _rxInspectorUI->enablePropertyUI(PROPERTY_BACKCOLOR,bValue); + _rxInspectorUI->enablePropertyUI(PROPERTY_CONTROLBACKGROUND,bValue); } - } - break; - case PROPERTY_ID_FORMULALIST: - { - _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,m_nDataFieldType == FUNCTION || m_nDataFieldType == COUNTER); - } - break; - case PROPERTY_ID_BACKTRANSPARENT: - case PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT: - { - sal_Bool bValue = sal_False; - NewValue >>= bValue; - bValue = !bValue; - _rxInspectorUI->enablePropertyUI(PROPERTY_BACKCOLOR,bValue); - _rxInspectorUI->enablePropertyUI(PROPERTY_CONTROLBACKGROUND,bValue); - } - break; - default: - m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit); - break; + break; + default: + m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit); + break; + } // switch(nId) } } diff --git a/reportdesign/source/ui/inspection/inspection.src b/reportdesign/source/ui/inspection/inspection.src index 8bff7188ce72..4aadda5c3536 100644 --- a/reportdesign/source/ui/inspection/inspection.src +++ b/reportdesign/source/ui/inspection/inspection.src @@ -59,6 +59,11 @@ String RID_STR_FORCENEWPAGE_CONST { Text [ en-US ] = "None;Before Section;After Section;Before & After Section" ; }; +String RID_STR_NONE +{ + Text [ en-US ] = "None"; +}; + String RID_STR_NEWROWORCOL { Text [ en-US ] = "New Row Or Column" ; diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx index 8653812ed212..587c81be49b4 100644 --- a/reportdesign/source/ui/inspection/metadata.cxx +++ b/reportdesign/source/ui/inspection/metadata.cxx @@ -296,6 +296,7 @@ namespace rptui PROPERTY_EFFECTIVEMIN, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HideInactiveSelection")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitAction")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputRequired")), PROPERTY_EMPTY_IS_NULL, PROPERTY_FILTERPROPOSAL ,PROPERTY_POSITIONX diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 57d442ff0763..9cd7a2afd6f9 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -1082,13 +1082,11 @@ void correctOverlapping(SdrObject* _pControl,OReportSection& _aReportSection,boo rSectionView.InsertObjectAtView(_pControl,*rSectionView.GetSdrPageView(),SDRINSERT_ADDMARK); } // ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -void setZoomFactor(const sal_Int16 _nZoom,Window& _rWindow) +void setZoomFactor(const Fraction& _aZoom,Window& _rWindow) { - Fraction aZoom(_nZoom,100); MapMode aMapMode( _rWindow.GetMapMode() ); - aMapMode.SetScaleX(aZoom); - aMapMode.SetScaleY(aZoom); + aMapMode.SetScaleX(_aZoom); + aMapMode.SetScaleY(_aZoom); _rWindow.SetMapMode(aMapMode); } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx index 17155e10adb5..b69fa43224d4 100644 --- a/reportdesign/source/ui/misc/statusbarcontroller.cxx +++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx @@ -137,24 +137,27 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::MutexGuard aGuard(m_aMutex); - if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") ) + if ( m_pController.is() ) { - Sequence< PropertyValue > aSeq; - if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 2 ) + if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") ) { - SvxZoomSliderItem aZoomSlider(100); - aZoomSlider.PutValue(_aEvent.State); - static_cast<SvxZoomSliderControl*>(m_pController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoomSlider); - } - } // if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") ) - else if ( m_aCommandURL.equalsAscii(".uno:Zoom") ) - { - Sequence< PropertyValue > aSeq; - if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 3 ) + Sequence< PropertyValue > aSeq; + if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 2 ) + { + SvxZoomSliderItem aZoomSlider(100,20,400); + aZoomSlider.PutValue(_aEvent.State); + static_cast<SvxZoomSliderControl*>(m_pController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoomSlider); + } + } // if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") ) + else if ( m_aCommandURL.equalsAscii(".uno:Zoom") ) { - SvxZoomItem aZoom; - aZoom.PutValue(_aEvent.State); - static_cast<SvxZoomStatusBarControl*>(m_pController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoom); + Sequence< PropertyValue > aSeq; + if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 3 ) + { + SvxZoomItem aZoom; + aZoom.PutValue(_aEvent.State); + static_cast<SvxZoomStatusBarControl*>(m_pController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoom); + } } } } @@ -162,17 +165,17 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv // XStatusbarController ::sal_Bool SAL_CALL OStatusbarController::mouseButtonDown(const ::com::sun::star::awt::MouseEvent& _aEvent)throw (::com::sun::star::uno::RuntimeException) { - return m_pController.getRef()->mouseButtonDown(_aEvent); + return m_pController.is() && m_pController.getRef()->mouseButtonDown(_aEvent); } ::sal_Bool SAL_CALL OStatusbarController::mouseMove( const ::com::sun::star::awt::MouseEvent& _aEvent)throw (::com::sun::star::uno::RuntimeException) { - return m_pController.getRef()->mouseMove(_aEvent); + return m_pController.is() && m_pController.getRef()->mouseMove(_aEvent); } ::sal_Bool SAL_CALL OStatusbarController::mouseButtonUp( const ::com::sun::star::awt::MouseEvent& _aEvent)throw (::com::sun::star::uno::RuntimeException) { - return m_pController.getRef()->mouseButtonUp(_aEvent); + return m_pController.is() && m_pController.getRef()->mouseButtonUp(_aEvent); } void SAL_CALL OStatusbarController::command( @@ -182,7 +185,8 @@ void SAL_CALL OStatusbarController::command( const ::com::sun::star::uno::Any& aData ) throw (::com::sun::star::uno::RuntimeException) { - m_pController.getRef()->command( aPos, nCommand, bMouseEvent, aData ); + if ( m_pController.is() ) + m_pController.getRef()->command( aPos, nCommand, bMouseEvent, aData ); } void SAL_CALL OStatusbarController::paint( @@ -192,17 +196,20 @@ void SAL_CALL OStatusbarController::paint( ::sal_Int32 nStyle ) throw (::com::sun::star::uno::RuntimeException) { - return m_pController.getRef()->paint( xGraphics, rOutputRectangle, nItemId, nStyle ); + if ( m_pController.is() ) + m_pController.getRef()->paint( xGraphics, rOutputRectangle, nItemId, nStyle ); } void SAL_CALL OStatusbarController::click() throw (::com::sun::star::uno::RuntimeException) { - m_pController.getRef()->click(); + if ( m_pController.is() ) + m_pController.getRef()->click(); } void SAL_CALL OStatusbarController::doubleClick() throw (::com::sun::star::uno::RuntimeException) { - m_pController.getRef()->doubleClick(); + if ( m_pController.is() ) + m_pController.getRef()->doubleClick(); } // ----------------------------------------------------------------------------- void SAL_CALL OStatusbarController::update() throw ( RuntimeException ) @@ -213,7 +220,12 @@ void SAL_CALL OStatusbarController::update() throw ( RuntimeException ) xUp->update(); } // ----------------------------------------------------------------------------- - +// XComponent +void SAL_CALL OStatusbarController::dispose() throw (::com::sun::star::uno::RuntimeException) +{ + m_pController.dispose(); + svt::StatusbarController::dispose(); +} // ============================================================================= } // rptui // ============================================================================= diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 78179fa3d6c9..b7dedea9f2e4 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -750,9 +750,14 @@ sal_uInt32 ODesignView::getMarkedObjectCount() const return m_aScrollWindow.getMarkedObjectCount(); } // ----------------------------------------------------------------------------- -void ODesignView::zoom(const sal_Int16 _nZoom) +void ODesignView::zoom(const Fraction& _aZoom) { - m_aScrollWindow.zoom(_nZoom); + m_aScrollWindow.zoom(_aZoom); +} +// ----------------------------------------------------------------------------- +sal_uInt16 ODesignView::getZoomFactor(SvxZoomType _eType) const +{ + return m_aScrollWindow.getZoomFactor(_eType); } //============================================================================ } // rptui diff --git a/reportdesign/source/ui/report/InsertFunctions.cxx b/reportdesign/source/ui/report/InsertFunctions.cxx deleted file mode 100644 index e2156f7de0ed..000000000000 --- a/reportdesign/source/ui/report/InsertFunctions.cxx +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: InsertFunctions.cxx,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_reportdesign.hxx" -#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> -#include <com/sun/star/embed/Aspects.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/embed/XEmbedPersist.hpp> -//------------------------------------------------------------------------ - -#include <toolkit/helper/vclunohelper.hxx> -#include <sot/exchange.hxx> -#include <svtools/globalnameitem.hxx> -#include <sfx2/viewfrm.hxx> -#include <sfx2/docfile.hxx> -#include <svtools/stritem.hxx> -#include <svx/svdoole2.hxx> -#include <svx/svdview.hxx> -#include <svx/pfiledlg.hxx> -#include <tools/urlobj.hxx> -#include <vcl/msgbox.hxx> -#include <svtools/urihelper.hxx> -#include <svtools/moduleoptions.hxx> -#include <svtools/insdlg.hxx> -#include <svtools/soerr.hxx> -#include <svx/svxdlg.hxx> -#include <sot/clsids.hxx> -#include <svx/svdpagv.hxx> -#include <svx/svdpage.hxx> -#include <svx/svdundo.hxx> -#include <svx/svdmodel.hxx> - -#include <cppuhelper/component_context.hxx> -#include <comphelper/processfactory.hxx> -#include <comphelper/storagehelper.hxx> -#include <comphelper/property.hxx> -#include <comphelper/types.hxx> -#include <comphelper/embeddedobjectcontainer.hxx> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/frame/XSynchronousFrameLoader.hpp> -#include <com/sun/star/frame/XComponentLoader.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/chart2/data/DatabaseDataProvider.hpp> -#include <com/sun/star/lang/XInitialization.hpp> -#include <com/sun/star/frame/XModel.hpp> -#include <com/sun/star/chart/ChartDataRowSource.hpp> -#include <com/sun/star/chart2/data/XDataReceiver.hpp> - -using namespace ::com::sun::star; - -#include "InsertFunctions.hxx" -#include "RptObject.hxx" - -namespace rptui -{ -//------------------------------------------------------------------------ -// ----------------------------------------------------------------------------- -} // namespace rptui -// ----------------------------------------------------------------------------- - diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 55eab50acc81..2bb3d3d5dbc8 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -115,6 +115,9 @@ #include <svx/brshitem.hxx> #include <svx/flagsdef.hxx> //CHINA001 #include <svx/svdpagv.hxx> +#include <svx/svxdlg.hxx> +#include <svx/zoom_def.hxx> +#include <svx/dialogs.hrc> #include "DesignView.hxx" #include "ModuleHelper.hxx" @@ -280,7 +283,7 @@ DBG_NAME( rpt_OReportController ) OReportController::OReportController(Reference< XComponentContext > const & xContext) : OReportController_BASE(Reference< XMultiServiceFactory >(xContext->getServiceManager(),UNO_QUERY)) ,OPropertyStateContainer(OGenericUnoController_Base::rBHelper) -,m_aSelectionListeners( m_aMutex ) +,m_aSelectionListeners( getMutex() ) ,m_pMyOwnView(NULL) ,m_pClipbordNotifier(NULL) ,m_pGroupsFloater(NULL) @@ -288,6 +291,7 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon ,m_nSplitPos(-1) ,m_nPageNum(-1) ,m_nZoomValue(100) +,m_eZoomType(SVX_ZOOM_PERCENT) ,m_bShowRuler(sal_True) ,m_bGridVisible(sal_True) ,m_bGridUse(sal_True) @@ -299,7 +303,7 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon { m_sMode = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal")); DBG_CTOR( rpt_OReportController,NULL); - registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZoomValue")),PROPERTY_ID_ZOOMVALUE,beans::PropertyAttribute::BOUND| beans::PropertyAttribute::TRANSIENT, &m_nZoomValue, ::getCppuType(reinterpret_cast< sal_Int16*>(NULL))); + registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZoomValue")),PROPERTY_ID_ZOOMVALUE,beans::PropertyAttribute::BOUND| beans::PropertyAttribute::TRANSIENT,&m_nZoomValue,::getCppuType(reinterpret_cast< sal_Int16*>(NULL))); } // ----------------------------------------------------------------------------- OReportController::~OReportController() @@ -894,8 +898,8 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_ATTR_ZOOM: aReturn.bEnabled = sal_True; { - SvxZoomItem aZoom(SVX_ZOOM_PERCENT,m_nZoomValue); - aZoom.SetValueSet(SVX_ZOOM_ENABLE_50|SVX_ZOOM_ENABLE_75|SVX_ZOOM_ENABLE_100|SVX_ZOOM_ENABLE_150|SVX_ZOOM_ENABLE_200); + SvxZoomItem aZoom(m_eZoomType,m_nZoomValue); + aZoom.SetValueSet(SVX_ZOOM_ENABLE_50|SVX_ZOOM_ENABLE_75|SVX_ZOOM_ENABLE_100|SVX_ZOOM_ENABLE_200); aZoom.QueryValue(aReturn.aValue); //aReturn.sTitle = ::rtl::OUString::valueOf((sal_Int32)m_nZoomValue); } @@ -903,11 +907,10 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_ATTR_ZOOMSLIDER: aReturn.bEnabled = sal_True; { - SvxZoomSliderItem aZoomSlider(m_nZoomValue); + SvxZoomSliderItem aZoomSlider(m_nZoomValue,20,400); aZoomSlider.AddSnappingPoint(50); aZoomSlider.AddSnappingPoint(75); aZoomSlider.AddSnappingPoint(100); - aZoomSlider.AddSnappingPoint(150); aZoomSlider.AddSnappingPoint(200); aZoomSlider.QueryValue(aReturn.aValue); //aReturn.sTitle = ::rtl::OUString::valueOf((sal_Int32)m_nZoomValue); @@ -947,7 +950,7 @@ namespace void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs) { ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); if ( !getView() ) { switch(_nId) @@ -1594,11 +1597,16 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > case SID_GROUP: break; case SID_ATTR_ZOOM: - if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAscii("Zoom") ) + if ( aArgs.getLength() == 0 ) + { + openZoomDialog(); + } + else if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAscii("Zoom") ) { SvxZoomItem aZoomItem; aZoomItem.PutValue(aArgs[0].Value); m_nZoomValue = aZoomItem.GetValue(); + m_eZoomType = aZoomItem.GetType(); impl_zoom_nothrow(); } // if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAscii("Zoom") ) break; @@ -1608,6 +1616,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > SvxZoomSliderItem aZoomSlider; aZoomSlider.PutValue(aArgs[0].Value); m_nZoomValue = aZoomSlider.GetValue(); + m_eZoomType = SVX_ZOOM_PERCENT; impl_zoom_nothrow(); } break; @@ -1749,7 +1758,7 @@ sal_Bool SAL_CALL OReportController::suspend(sal_Bool /*_bSuspend*/) throw( Runt return sal_True; vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) return sal_False; @@ -2023,7 +2032,7 @@ SfxUndoManager* OReportController::getUndoMgr() // ----------------------------------------------------------------------------- void OReportController::setModified(sal_Bool _bModified) { - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); try { if ( m_xReportDefinition.is() ) @@ -2069,7 +2078,7 @@ void OReportController::notifyGroupSections(const ContainerEvent& _rEvent,bool _ if ( xGroup.is() ) { ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); sal_Int32 nGroupPos = 0; _rEvent.Accessor >>= nGroupPos; @@ -2109,14 +2118,14 @@ void SAL_CALL OReportController::elementRemoved( const ContainerEvent& _rEvent ) void SAL_CALL OReportController::elementReplaced( const ContainerEvent& /*_rEvent*/ ) throw(RuntimeException) { ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); OSL_ENSURE(0,"Not yet implemented!"); } // ----------------------------------------------------------------------------- void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEvent& evt ) throw (RuntimeException) { ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); try { sal_Bool bShow = sal_False; @@ -2374,6 +2383,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ uno::Any aValue; static_cast<const SvxSizeItem*>(pItem)->QueryValue(aValue,MID_SIZE_SIZE); xProp->setPropertyValue(PROPERTY_PAPERSIZE,aValue); + resetZoomType(); } if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_LRSPACE,sal_True,&pItem)) @@ -2394,6 +2404,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ uno::Any aValue; pPageItem->QueryValue(aValue,MID_PAGE_LAYOUT); xProp->setPropertyValue(PROPERTY_PAGESTYLELAYOUT,aValue); + resetZoomType(); } if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_BRUSH,sal_True,&pItem)) { @@ -2417,7 +2428,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OReportController::attachModel(const uno::Reference< frame::XModel > & xModel) throw( uno::RuntimeException ) { - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); m_xReportDefinition.set(xModel,uno::UNO_QUERY); return m_xReportDefinition.is(); } @@ -2486,7 +2497,7 @@ void OReportController::alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nCon // ----------------------------------------------------------------------------- uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeException ) { - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); typedef ::std::pair< ::rtl::OUString,sal_uInt16> TStringIntPair; const TStringIntPair pViewDataList[] = { @@ -2556,7 +2567,7 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept // ----------------------------------------------------------------------------- void SAL_CALL OReportController::restoreViewData(const uno::Any& Data) throw( uno::RuntimeException ) { - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); uno::Sequence<beans::PropertyValue> aProps; if ( Data >>= aProps ) { @@ -2817,7 +2828,7 @@ void OReportController::insertGraphic() // ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL OReportController::select( const Any& aSelection ) throw (IllegalArgumentException, RuntimeException) { - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); ::sal_Bool bRet = sal_True; if ( m_pMyOwnView ) { @@ -2857,7 +2868,7 @@ void OReportController::insertGraphic() // ----------------------------------------------------------------------------- Any SAL_CALL OReportController::getSelection( ) throw (RuntimeException) { - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); Any aRet; if ( m_pMyOwnView ) { @@ -2934,8 +2945,9 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co } else { - SdrUnoObj* pLabel,*pControl; - FmFormView::createControlLabelPair(NULL,m_pMyOwnView + SdrUnoObj* pLabel( NULL ); + SdrUnoObj* pControl( NULL ); + FmFormView::createControlLabelPair(m_pMyOwnView ,nLeftMargin,0 ,NULL,NULL,_nObjectId,::rtl::OUString(),ReportInventor,OBJ_DLG_FIXEDTEXT, NULL,pSectionWindow->getReportSection().getPage(),m_aReportModel.get(), @@ -3222,7 +3234,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) pSectionViews[0] = &pSectionWindow[1]->getReportSection().getSectionView(); pSectionViews[1] = &pSectionWindow[0]->getReportSection().getSectionView(); // find this in svx - FmFormView::createControlLabelPair(pSectionViews[0],m_pMyOwnView + FmFormView::createControlLabelPair(m_pMyOwnView ,nLeftMargin,0 ,xField,xNumberFormats,nOBJID,::rtl::OUString(),ReportInventor,OBJ_DLG_FIXEDTEXT, pSectionWindow[1]->getReportSection().getPage(),pSectionWindow[0]->getReportSection().getPage(),m_aReportModel.get(), @@ -3737,7 +3749,7 @@ void OReportController::checkChartEnabled() throw (uno::RuntimeException) { vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); uno::Reference< frame::XTitle> xTitle(m_xReportDefinition,uno::UNO_QUERY_THROW); @@ -3775,12 +3787,12 @@ void SAL_CALL OReportController::setFastPropertyValue_NoBroadcast(sal_Int32 _nHa } void SAL_CALL OReportController::setMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); m_sMode = aMode; } ::rtl::OUString SAL_CALL OReportController::getMode( ) throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard(m_aMutex); + ::osl::MutexGuard aGuard( getMutex() ); return m_sMode; } ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL OReportController::getSupportedModes( ) throw (::com::sun::star::uno::RuntimeException) @@ -3846,15 +3858,12 @@ void OReportController::impl_fillState_nothrow(const ::rtl::OUString& _sProperty void OReportController::impl_zoom_nothrow() { Fraction aZoom(m_nZoomValue,100); - MapMode aMapMode = m_pMyOwnView->GetMapMode(); - aMapMode.SetScaleX(aZoom); - aMapMode.SetScaleY(aZoom); - m_pMyOwnView->SetMapMode(aMapMode); - m_pMyOwnView->zoom(m_nZoomValue); + setZoomFactor(aZoom,*m_pMyOwnView); + m_pMyOwnView->zoom(aZoom); // TRY /*m_pMyOwnView->Invalidate(INVALIDATE_NOCHILDREN);*/ - InvalidateFeature(SID_ATTR_ZOOM); - InvalidateFeature(SID_ATTR_ZOOMSLIDER); + InvalidateFeature(SID_ATTR_ZOOM,Reference< XStatusListener >(),sal_True); + InvalidateFeature(SID_ATTR_ZOOMSLIDER,Reference< XStatusListener >(),sal_True); } // ----------------------------------------------------------------------------- sal_Bool OReportController::isFormatCommandEnabled(sal_uInt16 _nCommand,const uno::Reference< report::XReportControlFormat>& _xReportControlFormat) const @@ -3917,3 +3926,58 @@ void OReportController::impl_fillCustomShapeState_nothrow(const char* _pCustomSh _rState.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && sShapeType.compareToAscii(_pCustomShapeType) == 0; } // ----------------------------------------------------------------------------- +void OReportController::openZoomDialog() +{ + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + if ( pFact ) + { + static SfxItemInfo aItemInfos[] = + { + { SID_ATTR_ZOOM, SFX_ITEM_POOLABLE } + }; + SfxPoolItem* pDefaults[] = + { + new SvxZoomItem() + }; + static USHORT pRanges[] = + { + SID_ATTR_ZOOM,SID_ATTR_ZOOM, + 0 + }; + try + { + ::std::auto_ptr<SfxItemPool> pPool( new SfxItemPool(String::CreateFromAscii("ZoomProperties"), SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, pDefaults) ); + pPool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM ); // ripped, don't understand why + pPool->FreezeIdRanges(); // the same + + ::std::auto_ptr<SfxItemSet> pDescriptor(new SfxItemSet(*pPool, pRanges)); + // fill it + SvxZoomItem aZoomItem( m_eZoomType, m_nZoomValue, SID_ATTR_ZOOM ); + aZoomItem.SetValueSet(SVX_ZOOM_ENABLE_100|SVX_ZOOM_ENABLE_WHOLEPAGE|SVX_ZOOM_ENABLE_PAGEWIDTH); + pDescriptor->Put(aZoomItem); + + ::std::auto_ptr<AbstractSvxZoomDialog> pDlg( pFact->CreateSvxZoomDialog(NULL, *pDescriptor.get(), RID_SVXDLG_ZOOM) ); + pDlg->SetLimits( 20, 400 ); + bool bCancel = ( RET_CANCEL == pDlg->Execute() ); + + if ( !bCancel ) + { + const SvxZoomItem& rZoomItem = (const SvxZoomItem&)pDlg->GetOutputItemSet()->Get( SID_ATTR_ZOOM ); + m_eZoomType = rZoomItem.GetType(); + m_nZoomValue = rZoomItem.GetValue(); + if ( m_eZoomType != SVX_ZOOM_PERCENT ) + m_nZoomValue = m_pMyOwnView->getZoomFactor( m_eZoomType ); + + impl_zoom_nothrow(); + } // if ( !bCancel ) + } + catch(uno::Exception&) + { + DBG_UNHANDLED_EXCEPTION(); + } + + for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i) + delete pDefaults[i]; + } // if(pFact) +} +// ----------------------------------------------------------------------------- diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 8fef01ffd020..cf462c8b1456 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -63,6 +63,9 @@ #include <connectivity/dbtools.hxx> +#include <vcl/lineinfo.hxx> +#include "ColorChanger.hxx" + #include <svtools/itempool.hxx> #include <svtools/extcolorcfg.hxx> #include <unotools/confignode.hxx> @@ -101,7 +104,6 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re EnableChildTransparentMode(); SetHelpId(HID_REPORTSECTION); SetMapMode( MapMode( MAP_100TH_MM ) ); - EnableMapMode(); try { @@ -114,7 +116,6 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re m_pFunc.reset(new DlgEdFuncSelect( this )); m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( /* m_pParent->getViewsWindow()->getView()->getReportView()->getController().getORB() */ ) ); - Show(); } //------------------------------------------------------------------------------ OReportSection::~OReportSection() @@ -140,6 +141,8 @@ OReportSection::~OReportSection() //------------------------------------------------------------------------------ void OReportSection::Paint( const Rectangle& rRect ) { + Window::Paint(rRect); + if ( m_pView ) { // repaint, get PageView and prepare Region @@ -169,9 +172,7 @@ void OReportSection::Paint( const Rectangle& rRect ) pPgView->GetView().EndDrawLayers(*pTargetPaintWindow); } - - const Region aReg(rRect); - m_pView->CompleteRedraw(this,aReg); + m_pView->CompleteRedraw(this,aPaintRectRegion); } } //------------------------------------------------------------------------------ @@ -246,7 +247,18 @@ void OReportSection::fill() m_pView->SetDesignMode( TRUE ); m_pView->StartListening( *m_pModel ); - Resize(); + /*Resize();*/ + if ( m_xSection.is() && m_pPage && m_pView ) + { + uno::Reference<report::XReportDefinition> xReportDefinition = m_xSection->getReportDefinition(); + m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) ); + const Size aPageSize = m_pPage->GetSize(); + const sal_Int32 nWorkAreaLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN); + const sal_Int32 nWorkAreaRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN); + m_pView->SetWorkArea( Rectangle( Point( nWorkAreaLeftMargin, 0), Size(aPageSize.Width() - nWorkAreaLeftMargin - nWorkAreaRightMargin,aPageSize.Height()) ) ); + } // if ( m_xSection.is() && m_pPage && m_pView ) + + //SetBackground( Wallpaper( COL_BLUE )); } // ----------------------------------------------------------------------------- void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyCopiedObjects,bool _bForce) diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 3a71951ea152..3d04b2898669 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -134,7 +134,6 @@ void OReportWindow::addSection(const uno::Reference< report::XSection >& _xSecti m_aViewsWindow.addSection(_xSection,_sColorEntry,_nPosition); - Resize(); m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight()); } //------------------------------------------------------------------------------ @@ -152,11 +151,11 @@ void OReportWindow::showRuler(sal_Bool _bShow) //------------------------------------------------------------------------------ sal_Int32 OReportWindow::getMaxMarkerWidth(sal_Bool _bWithEnd) const { - Fraction aStartWith(long(REPORT_STARTMARKER_WIDTH)); - aStartWith *= m_aViewsWindow.GetMapMode().GetScaleX(); + Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + aStartWidth *= m_aViewsWindow.GetMapMode().GetScaleX(); if ( _bWithEnd ) - aStartWith += Fraction(long(REPORT_ENDMARKER_WIDTH)); - return sal_Int32((long)aStartWith); + aStartWidth += Fraction(long(REPORT_ENDMARKER_WIDTH)); + return sal_Int32((long)aStartWidth); } //------------------------------------------------------------------------------ sal_Int32 OReportWindow::GetTotalWidth() const @@ -164,11 +163,14 @@ sal_Int32 OReportWindow::GetTotalWidth() const sal_Int32 nWidth = 0; if ( !m_aViewsWindow.empty() ) { - Fraction aStartWith(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH)); - aStartWith *= m_aViewsWindow.GetMapMode().GetScaleX(); + Fraction aStartWidth(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH )); + const Fraction aZoom(m_pView->getController().getZoomValue(),100); + aStartWidth *= aZoom; // m_aViewsWindow.GetMapMode().GetScaleX();; const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_pView->getController().getReportDefinition(),PROPERTY_PAPERSIZE).Width; - const Size aPageSize = m_aViewsWindow.LogicToPixel(Size(nPaperWidth,0)); - nWidth = aPageSize.Width() + long(aStartWith); + Fraction aPaperWidth(nPaperWidth,1); + aPaperWidth *= aZoom; + const Size aPageSize = LogicToPixel(Size(aPaperWidth,0)); + nWidth = aPageSize.Width() + long(aStartWidth); } return nWidth; } @@ -179,16 +181,15 @@ void OReportWindow::Resize() if ( !m_aViewsWindow.empty() ) { const Size aTotalOutputSize = GetOutputSizePixel(); - Fraction aStartWith(long(REPORT_STARTMARKER_WIDTH)); - aStartWith *= m_aViewsWindow.GetMapMode().GetScaleX(); + Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100); - const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, SECTION_OFFSET ), MAP_APPFONT ); - Point aStartPoint((long)aStartWith + aOffset.X(),0); + const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, 0 ), MAP_APPFONT ); + Point aStartPoint((long)aStartWidth + aOffset.X(),0); uno::Reference<report::XReportDefinition> xReportDefinition = getReportView()->getController().getReportDefinition(); const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width; sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN); sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN); - Size aPageSize = m_aViewsWindow.LogicToPixel(Size(nPaperWidth,0)); + Size aPageSize = m_aViewsWindow.LogicToPixel(Size(nPaperWidth ,0)); nLeftMargin = m_aViewsWindow.LogicToPixel(Size(nLeftMargin,0)).Width(); nRightMargin = m_aViewsWindow.LogicToPixel(Size(nRightMargin,0)).Width(); @@ -211,9 +212,9 @@ void OReportWindow::Resize() } } //------------------------------------------------------------------------------ -Point OReportWindow::getScrollOffset() const +Point OReportWindow::getThumbPos() const { - return m_pParent->getScrollOffset(); + return m_pParent->getThumbPos(); } //------------------------------------------------------------------------------ void OReportWindow::ImplInitSettings() @@ -235,22 +236,22 @@ void OReportWindow::DataChanged( const DataChangedEvent& rDCEvt ) //------------------------------------------------------------------------------ sal_Int32 OReportWindow::GetTotalHeight() const { - return m_aHRuler.GetSizePixel().Height() + m_aViewsWindow.getTotalHeight(); + return m_aViewsWindow.getTotalHeight(); } //------------------------------------------------------------------------------ -void OReportWindow::ScrollChildren(long nDeltaX, long nDeltaY) +void OReportWindow::ScrollChildren(const Point& _aThumbPos) { - if ( nDeltaX ) + MapMode aMap = m_aHRuler.GetMapMode(); + Point aOrg( aMap.GetOrigin() ); + if ( aOrg.X() != (-_aThumbPos.X()) ) { - MapMode aMap = m_aHRuler.GetMapMode(); - Point aOrg( aMap.GetOrigin() ); - aMap.SetOrigin( Point(aOrg.X() - nDeltaX, aOrg.Y())); + aMap.SetOrigin( Point(- _aThumbPos.X(), aOrg.Y())); m_aHRuler.SetMapMode( aMap ); - m_aHRuler.Scroll(-nDeltaX,0); + m_aHRuler.Scroll(-(aOrg.X() + _aThumbPos.X()),0); } - - m_aViewsWindow.scrollChildren(nDeltaX,nDeltaY); + /*const Point aPos(PixelToLogic(_aThumbPos));*/ + m_aViewsWindow.scrollChildren(_aThumbPos); } //---------------------------------------------------------------------------- USHORT OReportWindow::getSectionCount() const @@ -258,11 +259,9 @@ USHORT OReportWindow::getSectionCount() const return m_aViewsWindow.getSectionCount(); } //---------------------------------------------------------------------------- -void OReportWindow::notifyHeightChanged() +void OReportWindow::notifySizeChanged() { m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight()); - //Resize(); - //Invalidate(INVALIDATE_TRANSPARENT); } //---------------------------------------------------------------------------- BOOL OReportWindow::HasSelection() @@ -371,7 +370,6 @@ void OReportWindow::setGridSnap(BOOL bOn) // ----------------------------------------------------------------------------- void OReportWindow::setDragStripes(BOOL bOn) { - m_aViewsWindow.setDragStripes(bOn); } // ----------------------------------------------------------------------------- @@ -385,13 +383,18 @@ sal_uInt32 OReportWindow::getMarkedObjectCount() const return m_aViewsWindow.getMarkedObjectCount(); } // ----------------------------------------------------------------------------- -void OReportWindow::zoom(const sal_Int16 _nZoom) +void OReportWindow::zoom(const Fraction& _aZoom) { - m_aHRuler.SetZoom(Fraction(_nZoom,100)); + m_aHRuler.SetZoom(_aZoom); m_aHRuler.Invalidate(); - m_aViewsWindow.zoom(_nZoom); - notifyHeightChanged(); + //setZoomFactor(_aZoom,*this); // if this will be include the H - ruler has the wrong size + m_aViewsWindow.zoom(_aZoom); + + notifySizeChanged(); + const Point aNewThumbPos( m_pParent->getThumbPos() ); + + ScrollChildren( aNewThumbPos ); Resize(); Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT); @@ -401,7 +404,43 @@ void OReportWindow::fillControlModelSelection(::std::vector< uno::Reference< uno { m_aViewsWindow.fillControlModelSelection(_rSelection); } +// ----------------------------------------------------------------------------- +sal_Int32 OReportWindow::impl_getRealPixelWidth() const +{ + const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_pView->getController().getReportDefinition(),PROPERTY_PAPERSIZE).Width; + MapMode aMap( MAP_100TH_MM ); + const Size aPageSize = LogicToPixel(Size(nPaperWidth,0),aMap); + return aPageSize.Width() + REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH + SECTION_OFFSET; +} +// ----------------------------------------------------------------------------- +sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const +{ + sal_uInt16 nZoom(100); + const Size aSize( GetSizePixel() ); + switch( _eType) + { + case SVX_ZOOM_PERCENT: + nZoom = m_pView->getController().getZoomValue(); + break; + case SVX_ZOOM_OPTIMAL: + break; + case SVX_ZOOM_WHOLEPAGE: + { + nZoom = (USHORT)(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())); + } + break; + case SVX_ZOOM_PAGEWIDTH: + nZoom = (USHORT)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth()); + break; + default: + break; + } + return nZoom; +} //================================================================== } //rptui //================================================================== diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index bbb9e2c8435e..9ab957796c39 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -46,13 +46,11 @@ namespace rptui using namespace ::com::sun::star; // ----------------------------------------------------------------------------- -void lcl_setScrollBar(sal_Int32 _nNewValue,sal_Int32 _nOffSet,const Point& _aPos,const Size& _aSize,ScrollBar& _rScrollBar) +void lcl_setScrollBar(sal_Int32 _nNewValue,const Point& _aPos,const Size& _aSize,ScrollBar& _rScrollBar) { _rScrollBar.SetPosSizePixel(_aPos,_aSize); _rScrollBar.SetPageSize( _nNewValue ); _rScrollBar.SetVisibleSize( _nNewValue ); - (void)_nOffSet; - //_rScrollBar.SetThumbPos( -_nOffSet ); } // ----------------------------------------------------------------------------- @@ -97,6 +95,7 @@ void OScrollWindowHelper::impl_initScrollBar( ScrollBar& _rScrollBar ) const aStyle.SetDragFullOptions( aStyle.GetDragFullOptions() | DRAGFULL_OPTION_SCROLL ); // live scrolling aSettings.SetStyleSettings( aStyle ); _rScrollBar.SetSettings( aSettings ); + //_rScrollBar.SetMapMode( MapMode( MAP_100TH_MM ) ); _rScrollBar.SetScrollHdl( LINK( this, OScrollWindowHelper, ScrollHdl ) ); _rScrollBar.SetLineSize( SCR_LINE_SIZE ); @@ -115,16 +114,12 @@ void OScrollWindowHelper::setTotalSize(sal_Int32 _nWidth ,sal_Int32 _nHeight) { m_aTotalPixelSize.Width() = _nWidth; m_aTotalPixelSize.Height() = _nHeight; - m_aHScroll.SetRangeMax( m_aTotalPixelSize.Width() ); + + // now set the ranges without start marker + Fraction aStartWidth(REPORT_STARTMARKER_WIDTH * m_pParent->getController().getZoomValue(),100); + long nWidth = long(_nWidth - (double)aStartWidth); + m_aHScroll.SetRangeMax( nWidth ); m_aVScroll.SetRangeMax( m_aTotalPixelSize.Height() ); - /*Point aNewPixOffset(-m_aHScroll.GetThumbPos(),-m_aVScroll.GetThumbPos()); - if ( m_aPixOffset != aNewPixOffset ) - { - const long nX = aNewPixOffset.X() - m_aPixOffset.X(); - const long nY = aNewPixOffset.Y() - m_aPixOffset.Y(); - impl_scrollContent( -nX, -nY ); - m_aPixOffset = aNewPixOffset; - }*/ Resize(); } @@ -136,6 +131,7 @@ Size OScrollWindowHelper::ResizeScrollBars() if ( aOutPixSz.Width() == 0 || aOutPixSz.Height() == 0 ) return aOutPixSz; + aOutPixSz.Height() -= m_aReportWindow.getRulerHeight(); // determine the size of the output-area and if we need scrollbars const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); bool bVVisible = false; // by default no vertical-ScrollBar @@ -164,7 +160,7 @@ Size OScrollWindowHelper::ResizeScrollBars() } while ( bChanged ); // until no visibility has changed - const Point aOldPixOffset( m_aPixOffset ); + aOutPixSz.Height() += m_aReportWindow.getRulerHeight(); // show or hide scrollbars m_aVScroll.Show( bVVisible ); @@ -182,66 +178,29 @@ Size OScrollWindowHelper::ResizeScrollBars() const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, SECTION_OFFSET ), MAP_APPFONT ); // resize scrollbars and set their ranges { - Fraction aStartWith(long(REPORT_STARTMARKER_WIDTH)); - const Fraction aZoom(m_pParent->getController().getZoomValue(),100); - aStartWith *= aZoom; - - const sal_Int32 nOldThumbPos = m_aHScroll.GetThumbPos(); - const sal_Int32 nNewWidth = aOutPixSz.Width() - aOffset.X(); - lcl_setScrollBar(nNewWidth,m_aPixOffset.X(),Point( (long)aStartWith + aOffset.X(), aOutPixSz.Height() ),Size( aOutPixSz.Width() - long(aStartWith), nScrSize ),m_aHScroll); - m_aPixOffset.X() += nOldThumbPos - m_aHScroll.GetThumbPos(); + Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100); + const sal_Int32 nNewWidth = aOutPixSz.Width() - aOffset.X() - (long)aStartWidth; + lcl_setScrollBar(nNewWidth,Point( (long)aStartWidth + aOffset.X(), aOutPixSz.Height() ),Size( nNewWidth, nScrSize ),m_aHScroll); } { - const sal_Int32 nOldThumbPos = m_aVScroll.GetThumbPos(); const sal_Int32 nNewHeight = aOutPixSz.Height() - m_aReportWindow.getRulerHeight(); - lcl_setScrollBar(nNewHeight,m_aPixOffset.Y(),Point( aOutPixSz.Width(), m_aReportWindow.getRulerHeight() ),Size( nScrSize,nNewHeight),m_aVScroll); - m_aPixOffset.Y() += nOldThumbPos - m_aVScroll.GetThumbPos(); + lcl_setScrollBar(nNewHeight,Point( aOutPixSz.Width(), m_aReportWindow.getRulerHeight() ),Size( nScrSize,nNewHeight),m_aVScroll); } - // select the shifted map-mode - if ( m_aPixOffset != aOldPixOffset ) - { - const long nX = m_aPixOffset.X() - aOldPixOffset.X(); - const long nY = m_aPixOffset.Y() - aOldPixOffset.Y(); - impl_scrollContent( -nX, -nY ); - } return aOutPixSz; } //------------------------------------------------------------------------------ -void OScrollWindowHelper::impl_scrollContent( long nDeltaX, long nDeltaY ) -{ - m_aReportWindow.ScrollChildren(nDeltaX,nDeltaY); -} -//------------------------------------------------------------------------------ void OScrollWindowHelper::Resize() { OScrollWindowHelper_BASE::Resize(); - // Size aSize = GetOutputSizePixel(); - // const Size aMinSize(getMaxMarkerWidth(sal_False),0); - // bool bResize = false; - //if( aSize.Width() < aMinSize.Width() ) - //{ - // aSize.setWidth( aMinSize.Width() ); - // bResize = true; - //} - //if( aSize.Height() < aMinSize.Height() ) - //{ - // aSize.setHeight( aMinSize.Height() ); - // bResize = true; - //} - //if( bResize ) - // { - // //static_cast<SplitWindow*>(GetParent())->SetItemSize(2,aSize.getWidth()); - // SetOutputSizePixel( aSize ); - // } const Size aTotalOutputSize = ResizeScrollBars(); - m_aReportWindow.SetPosSizePixel(Point( 0, 0 ),Size( aTotalOutputSize.Width(), aTotalOutputSize.Height())); + m_aReportWindow.SetPosSizePixel(Point( 0, 0 ),aTotalOutputSize); } //------------------------------------------------------------------------------ IMPL_LINK( OScrollWindowHelper, ScrollHdl, ScrollBar*, /*pScroll*/ ) { - impl_scrollContent( m_aHScroll.GetDelta(), m_aVScroll.GetDelta() ); + m_aReportWindow.ScrollChildren( getThumbPos() ); return 0; } //------------------------------------------------------------------------------ @@ -416,7 +375,7 @@ void OScrollWindowHelper::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------------- void OScrollWindowHelper::_propertyChanged(const beans::PropertyChangeEvent& /*_rEvent*/) throw( uno::RuntimeException) { - m_aReportWindow.notifyHeightChanged(); + m_aReportWindow.notifySizeChanged(); } // ----------------------------------------------------------------------------- void OScrollWindowHelper::setGridSnap(BOOL bOn) @@ -439,9 +398,10 @@ sal_uInt32 OScrollWindowHelper::getMarkedObjectCount() const return m_aReportWindow.getMarkedObjectCount(); } // ----------------------------------------------------------------------------- -void OScrollWindowHelper::zoom(const sal_Int16 _nZoom) +void OScrollWindowHelper::zoom(const Fraction& _aZoom) { - m_aReportWindow.zoom(_nZoom); + m_aReportWindow.zoom(_aZoom); + Resize(); Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_TRANSPARENT); } // ----------------------------------------------------------------------------- @@ -449,7 +409,11 @@ void OScrollWindowHelper::fillControlModelSelection(::std::vector< uno::Referenc { m_aReportWindow.fillControlModelSelection(_rSelection); } - +// ----------------------------------------------------------------------------- +sal_uInt16 OScrollWindowHelper::getZoomFactor(SvxZoomType _eType) const +{ + return m_aReportWindow.getZoomFactor(_eType); +} //============================================================================== } // rptui //============================================================================== diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index a54f8fecd6e7..2d67af00d7d0 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -68,23 +68,26 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep { DBG_CTOR( rpt_OSectionWindow,NULL); SetUniqueId(UID_RPT_SECTIONSWINDOW); - SetMapMode( MapMode( MAP_100TH_MM ) ); - EnableMapMode(); + const MapMode& rMapMode = _pParent->GetMapMode(); + SetMapMode( rMapMode ); ImplInitSettings(); - // TRY m_aSplitter.SetMapMode( MapMode( MAP_100TH_MM ) ); - m_aSplitter.EnableMapMode(); - m_aSplitter.SetStartSplitHdl(LINK(this, OSectionWindow,StartSplitHdl)); m_aSplitter.SetSplitHdl(LINK(this, OSectionWindow,SplitHdl)); m_aSplitter.SetEndSplitHdl(LINK(this, OSectionWindow,EndSplitHdl)); m_aSplitter.SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() )); m_aSplitter.SetSplitPosPixel(m_aSplitter.LogicToPixel(Size(0,_xSection->getHeight())).Height()); - m_aSplitter.Show(); + m_aStartMarker.setCollapsedHdl(LINK(this,OSectionWindow,Collapsed)); + m_aStartMarker.zoom(rMapMode.GetScaleX()); + setZoomFactor(rMapMode.GetScaleX(),m_aReportSection); + setZoomFactor(rMapMode.GetScaleX(),m_aSplitter); + setZoomFactor(rMapMode.GetScaleX(),m_aEndMarker); + + m_aSplitter.Show(); m_aStartMarker.Show(); m_aReportSection.Show(); m_aEndMarker.Show(); @@ -135,12 +138,13 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) { m_pParent->getView()->SetUpdateMode(FALSE); Resize(); - m_pParent->getView()->notifyHeightChanged(); + m_pParent->getView()->notifySizeChanged(); m_pParent->resize(*this); m_pParent->getView()->SetUpdateMode(TRUE); m_aStartMarker.Invalidate(INVALIDATE_NOERASE); m_aEndMarker.Invalidate(INVALIDATE_NOERASE); m_aReportSection.Invalidate(/*INVALIDATE_NOERASE*/); + getViewsWindow()->getView()->getReportView()->getController().resetZoomType(); // Invalidate(INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT); // m_pParent->Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE|INVALIDATE_TRANSPARENT); // m_pParent->Invalidate(/*INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE |*/ INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT); @@ -178,7 +182,7 @@ void OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& void OSectionWindow::ImplInitSettings() { SetBackground( ); - // SetBackground( Wallpaper( COL_RED )); + //SetBackground( Wallpaper( COL_RED )); } //----------------------------------------------------------------------------- void OSectionWindow::DataChanged( const DataChangedEvent& rDCEvt ) @@ -197,14 +201,12 @@ void OSectionWindow::Resize() { Window::Resize(); - //const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, SECTION_OFFSET ), MAP_APPFONT ); - Size aOutputSize = GetOutputSizePixel(); Fraction aEndWidth(long(REPORT_ENDMARKER_WIDTH)); aEndWidth *= GetMapMode().GetScaleX(); - const Point aOffset = m_pParent->getView()->getScrollOffset(); - aOutputSize.Width() -= aOffset.X(); + const Point aThumbPos = m_pParent->getView()->getThumbPos(); + aOutputSize.Width() -= aThumbPos.X(); aOutputSize.Height() -= m_aSplitter.GetSizePixel().Height(); if ( m_aStartMarker.isCollapsed() ) @@ -214,7 +216,7 @@ void OSectionWindow::Resize() } else { - const bool bShowEndMarker = m_pParent->getView()->GetTotalWidth() <= (aOffset.X() + aOutputSize.Width() ); + const bool bShowEndMarker = m_pParent->getView()->GetTotalWidth() <= (aThumbPos.X() + aOutputSize.Width() ); Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= GetMapMode().GetScaleX(); @@ -229,6 +231,7 @@ void OSectionWindow::Resize() aSectionSize.Width() = aOutputSize.Width() - (long)aStartWidth; if ( bShowEndMarker ) aSectionSize.Width() -= (long)aEndWidth; + m_aReportSection.SetPosSizePixel(aReportPos,aSectionSize); // set splitter @@ -248,7 +251,7 @@ void OSectionWindow::Resize() void OSectionWindow::setCollapsed(sal_Bool _bCollapsed) { m_aReportSection.Show(_bCollapsed); - m_aEndMarker.Show/*setCollapsed*/(_bCollapsed); + m_aEndMarker.Show(_bCollapsed); m_aSplitter.Show(_bCollapsed); } //----------------------------------------------------------------------------- @@ -278,14 +281,15 @@ IMPL_LINK( OSectionWindow, Collapsed, OStartMarker *, _pMarker ) return 0L; } // ----------------------------------------------------------------------------- -void OSectionWindow::zoom(const sal_Int16 _nZoom) +void OSectionWindow::zoom(const Fraction& _aZoom) { - setZoomFactor(_nZoom,*this); - m_aStartMarker.zoom(_nZoom); - setZoomFactor(_nZoom,m_aReportSection); - setZoomFactor(_nZoom,m_aSplitter); - setZoomFactor(_nZoom,m_aEndMarker); - Resize(); + setZoomFactor(_aZoom,*this); + m_aStartMarker.zoom(_aZoom); + + setZoomFactor(_aZoom,m_aReportSection); + setZoomFactor(_aZoom,m_aSplitter); + setZoomFactor(_aZoom,m_aEndMarker); + //Resize(); Invalidate(/*INVALIDATE_UPDATE |*/ /* | INVALIDATE_TRANSPARENT *//*INVALIDATE_NOCHILDREN*/); } //----------------------------------------------------------------------------- @@ -338,34 +342,40 @@ IMPL_LINK( OSectionWindow, SplitHdl, Splitter*, _pSplitter ) return 0L; } // ----------------------------------------------------------------------------- -void lcl_scroll(Window& _rWindow,const Size& _aDelta) +void lcl_scroll(Window& _rWindow,const Point& _aDelta) { - _rWindow.Scroll(-_aDelta.Width(),-_aDelta.Height(),SCROLL_CHILDREN/*|SCROLL_CLIP*/); + _rWindow.Scroll(-_aDelta.X(),-_aDelta.Y()/*,SCROLL_CHILDREN*//*|SCROLL_CLIP*/); _rWindow.Invalidate(INVALIDATE_TRANSPARENT); } // ----------------------------------------------------------------------------- -void lcl_setMapMode(Window& _rWindow,long _nDeltaX, long _nDeltaY) +void lcl_setOrigin(Window& _rWindow,long _nX, long _nY) { MapMode aMap = _rWindow.GetMapMode(); - Point aOrg = aMap.GetOrigin(); - aMap.SetOrigin( Point(aOrg.X() - _nDeltaX, aOrg.Y() - _nDeltaY)); + aMap.SetOrigin( Point(- _nX, - _nY)); _rWindow.SetMapMode( aMap ); } //---------------------------------------------------------------------------- -void OSectionWindow::scrollChildren(long _nDeltaX) +void OSectionWindow::scrollChildren(long _nX) { - const Size aDelta( PixelToLogic(Size(_nDeltaX,0)) ); - lcl_setMapMode(m_aReportSection,aDelta.Width(), 0); + const Point aDelta( _nX,0 ); + + MapMode aMapMode( m_aReportSection.GetMapMode() ); + const Point aOld = aMapMode.GetOrigin(); + lcl_setOrigin(m_aReportSection,aDelta.X(), 0); + + aMapMode = m_aReportSection.GetMapMode(); + const Point aNew = aMapMode.GetOrigin(); + const Point aDiff = aOld - aNew; { - OWindowPositionCorrector aCorrector(&m_aReportSection,-_nDeltaX,0); - lcl_scroll(m_aReportSection,aDelta); + //OWindowPositionCorrector aCorrector(&m_aReportSection,-aDelta.Width(),0); + lcl_scroll(m_aReportSection,aDiff); } - // lcl_setMapMode(m_aEndMarker,_nDeltaX, 0); - lcl_scroll(m_aEndMarker,aDelta); + //lcl_setOrigin(m_aEndMarker,_nDeltaX, 0); + lcl_scroll(m_aEndMarker,m_aEndMarker.PixelToLogic(Point(_nX,0))); - lcl_setMapMode(m_aSplitter,_nDeltaX, 0); - lcl_scroll(m_aSplitter,aDelta); + lcl_setOrigin(m_aSplitter,_nX, 0); + lcl_scroll(m_aSplitter,aDiff); Resize(); } diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index b3e6d81f7a94..b525a42f5dd8 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -45,7 +45,6 @@ #include <svtools/smplhint.hxx> #define CORNER_SPACE 5 -#define TEXT_WIDTH 10 //===================================================================== namespace rptui @@ -64,7 +63,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol : OColorListener(_pParent,_sColorEntry) ,m_aVRuler(this,WB_VERT) ,m_aText(this,WB_HYPHENATION) -,m_aImage(this,WB_LEFT|WB_TOP) +,m_aImage(this,WB_LEFT|WB_TOP|WB_SCALE) ,m_pParent(_pParent) ,m_bShowRuler(sal_True) { @@ -177,7 +176,7 @@ void OStartMarker::MouseButtonUp( const MouseEvent& rMEvt ) const Size aOutputSize = GetOutputSizePixel(); if( aPos.X() > aOutputSize.Width() || aPos.Y() > aOutputSize.Height() ) return; - Rectangle aRect(m_aImage.GetPosPixel(),m_aImage.GetImage().GetSizePixel()); + Rectangle aRect(m_aImage.GetPosPixel(),m_aImage.GetSizePixel()); if ( rMEvt.GetClicks() == 2 || aRect.IsInside( aPos ) ) { m_bCollapsed = !m_bCollapsed; @@ -237,25 +236,25 @@ void OStartMarker::Resize() const long nOutputWidth = aOutputSize.Width(); const long nOutputHeight = aOutputSize.Height(); + const long nVRulerWidth = m_aVRuler.GetSizePixel().Width(); + const Point aRulerPos(nOutputWidth - nVRulerWidth,0); + m_aVRuler.SetPosSizePixel(aRulerPos,Size(nVRulerWidth,nOutputHeight)); + Size aImageSize = m_aImage.GetImage().GetSizePixel(); const MapMode& rMapMode = GetMapMode(); aImageSize.Width() = long(aImageSize.Width() * (double)rMapMode.GetScaleX()); aImageSize.Height() = long(aImageSize.Height() * (double)rMapMode.GetScaleY()); - const long nVRulerWidth = m_aVRuler.GetSizePixel().Width(); - const Point aRulerPos(nOutputWidth - nVRulerWidth/* - 5*/,0); + Fraction aExtraWidth(long(REPORT_EXTRA_SPACE)); aExtraWidth *= rMapMode.GetScaleX(); Point aPos(aImageSize.Width() + (long)(aExtraWidth + aExtraWidth), aExtraWidth); - - m_aText.SetPosSizePixel(aPos,Size(aRulerPos.X() - aPos.X(),::std::max<sal_Int32>(nOutputHeight - 2*aPos.Y(),LogicToPixel(Size(0,m_aText.GetTextHeight())).Height()))); + const long nHeight = ::std::max<sal_Int32>(nOutputHeight - 2*aPos.Y(),LogicToPixel(Size(0,m_aText.GetTextHeight())).Height()); + m_aText.SetPosSizePixel(aPos,Size(aRulerPos.X() - aPos.X(),nHeight)); aPos.X() = aExtraWidth; aPos.Y() += static_cast<sal_Int32>((LogicToPixel(Size(0,m_aText.GetTextHeight())).Height() - aImageSize.Height()) * 0.5) ; - m_aImage.SetPosSizePixel(aPos,aImageSize);/*Size(aImageSize.Width() + (long)aExtraWidth,aImageSize.Height() + (long)aExtraWidth));*/ - //m_aImage.SetPosPixel(aPos); - - m_aVRuler.SetPosSizePixel(aRulerPos,Size(nVRulerWidth,nOutputHeight)); + m_aImage.SetPosSizePixel(aPos,aImageSize); } // ----------------------------------------------------------------------------- void OStartMarker::setTitle(const String& _sTitle) @@ -314,13 +313,11 @@ void OStartMarker::setCollapsed(sal_Bool _bCollapsed) showRuler(_bCollapsed); } // ----------------------------------------------------------------------- -void OStartMarker::zoom(const sal_Int16 _nZoom) +void OStartMarker::zoom(const Fraction& _aZoom) { - setZoomFactor(_nZoom,*this); - m_aVRuler.SetZoom(Fraction(_nZoom,100)); - // setZoomFactor(_nZoom,m_aVRuler); - setZoomFactor(_nZoom,m_aText); - setZoomFactor(_nZoom,m_aImage); + setZoomFactor(_aZoom,*this); + m_aVRuler.SetZoom(_aZoom); + setZoomFactor(_aZoom,m_aText); Resize(); Invalidate(); } diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index bc82a3b38d75..f51074e14d6f 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -189,7 +189,6 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow) SetPaintTransparent(TRUE); SetUniqueId(UID_RPT_VIEWSWINDOW); SetMapMode( MapMode( MAP_100TH_MM ) ); - EnableMapMode(); StartListening(m_aColorConfig); ImplInitSettings(); } @@ -251,11 +250,12 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow) pSectionWindow->getStartMarker().Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT ); } } // for (;aIter != aEnd ; ++aIter,++nPos) - Fraction aStartWith(long(REPORT_STARTMARKER_WIDTH)); - aStartWith *= GetMapMode().GetScaleX(); + Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + aStartWidth *= GetMapMode().GetScaleX(); Size aOut = GetOutputSizePixel(); - aOut.Width() = aStartWith; + aOut.Width() = aStartWidth; aOut = PixelToLogic(aOut); + m_pParent->notifySizeChanged(); Rectangle aRect(PixelToLogic(Point(0,0)),aOut); Invalidate(aRect,INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT); @@ -264,18 +264,18 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow) void OViewsWindow::Resize() { Window::Resize(); - if ( m_aSections.empty() ) - return; - - const Point aOffset = m_pParent->getScrollOffset(); - 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) + if ( !m_aSections.empty() ) { - const ::boost::shared_ptr<OSectionWindow> pSectionWindow = (*aIter); - impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,true); - } // for (;aIter != aEnd ; ++aIter) + const Point aOffset(m_pParent->getThumbPos()); + 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) + { + const ::boost::shared_ptr<OSectionWindow> pSectionWindow = (*aIter); + impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,true); + } // for (;aIter != aEnd ; ++aIter) + } } // ----------------------------------------------------------------------------- void OViewsWindow::Paint( const Rectangle& rRect ) @@ -283,13 +283,13 @@ void OViewsWindow::Paint( const Rectangle& rRect ) Window::Paint( rRect ); Size aOut = GetOutputSizePixel(); - Fraction aStartWith(long(REPORT_STARTMARKER_WIDTH)); - aStartWith *= GetMapMode().GetScaleX(); + Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + aStartWidth *= GetMapMode().GetScaleX(); - aOut.Width() -= (long)aStartWith; + aOut.Width() -= (long)aStartWidth; aOut = PixelToLogic(aOut); - Rectangle aRect(PixelToLogic(Point(aStartWith,0)),aOut); + Rectangle aRect(PixelToLogic(Point(aStartWidth,0)),aOut); Wallpaper aWall( m_aColorConfig.GetColorValue(::svtools::APPBACKGROUND).nColor ); DrawWallpaper(aRect,aWall); } @@ -317,7 +317,6 @@ void OViewsWindow::DataChanged( const DataChangedEvent& rDCEvt ) void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,USHORT _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); @@ -361,7 +360,6 @@ sal_Int32 OViewsWindow::getTotalHeight() const { nHeight += (*aIter)->GetSizePixel().Height(); } - return nHeight; } //---------------------------------------------------------------------------- @@ -1735,53 +1733,59 @@ void OViewsWindow::collapseSections(const uno::Sequence< beans::PropertyValue>& } } // ----------------------------------------------------------------------------- -void OViewsWindow::zoom(const sal_Int16 _nZoom) +void OViewsWindow::zoom(const Fraction& _aZoom) { - Fraction aStartWith(long(REPORT_STARTMARKER_WIDTH)); - aStartWith *= GetMapMode().GetScaleX(); + const MapMode& aMapMode = GetMapMode(); + + Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + if ( _aZoom < aMapMode.GetScaleX() ) + aStartWidth *= aMapMode.GetScaleX(); + else + aStartWidth *= _aZoom; - setZoomFactor(_nZoom,*this); + setZoomFactor(_aZoom,*this); TSectionsMap::iterator aIter = m_aSections.begin(); TSectionsMap::iterator aEnd = m_aSections.end(); for (;aIter != aEnd ; ++aIter) { - (*aIter)->zoom(_nZoom); + (*aIter)->zoom(_aZoom); } // for (;aIter != aEnd ; ++aIter) Resize(); Size aOut = GetOutputSizePixel(); - aOut.Width() = aStartWith; + aOut.Width() = aStartWidth; aOut = PixelToLogic(aOut); Rectangle aRect(PixelToLogic(Point(0,0)),aOut); Invalidate(aRect,/*INVALIDATE_NOERASE | */INVALIDATE_NOCHILDREN /*| INVALIDATE_TRANSPARENT*/); } //---------------------------------------------------------------------------- -void OViewsWindow::scrollChildren(long _nDeltaX, long _nDeltaY) +void OViewsWindow::scrollChildren(const Point& _aThumbPos) { - const Size aDelta( PixelToLogic(Size(_nDeltaX,_nDeltaY)) ); - if ( _nDeltaY ) + const Point aPos(PixelToLogic(_aThumbPos)); { - MapMode aMap = GetMapMode(); - Point aOrg = aMap.GetOrigin(); - aMap.SetOrigin( Point(aOrg.X() , aOrg.Y() - _nDeltaY)); - SetMapMode( aMap ); - OWindowPositionCorrector aCorrector(this,0,-_nDeltaY); - Scroll(0,-aDelta.Height(),SCROLL_CHILDREN); + MapMode aMapMode = GetMapMode(); + const Point aOld = aMapMode.GetOrigin(); + aMapMode.SetOrigin(m_pParent->GetMapMode().GetOrigin()); + + const Point aPosY(m_pParent->PixelToLogic(_aThumbPos,aMapMode)); + + aMapMode.SetOrigin( Point(aOld.X() , - aPosY.Y())); + SetMapMode( aMapMode ); + //OWindowPositionCorrector aCorrector(this,0,-( aOld.Y() + aPosY.Y())); + Scroll(0, -( aOld.Y() + aPosY.Y()),SCROLL_CHILDREN); + Resize(); Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_TRANSPARENT); } - if ( _nDeltaX ) + TSectionsMap::iterator aIter = m_aSections.begin(); + TSectionsMap::iterator aEnd = m_aSections.end(); + for (;aIter != aEnd ; ++aIter) { - TSectionsMap::iterator aIter = m_aSections.begin(); - TSectionsMap::iterator aEnd = m_aSections.end(); - for (;aIter != aEnd ; ++aIter) - { - (*aIter)->scrollChildren(_nDeltaX); - } // for (;aIter != aEnd ; ++aIter) - } + (*aIter)->scrollChildren(aPos.X()); + } // for (;aIter != aEnd ; ++aIter) } // ----------------------------------------------------------------------------- void OViewsWindow::fillControlModelSelection(::std::vector< uno::Reference< uno::XInterface > >& _rSelection) const diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 01dade9ca42d..e852beac5ff6 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -91,17 +91,17 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) OScrollWindowHelper* pScrollWindow = pReportWindow->getScrollWindow(); Size aOut = pReportWindow->GetOutputSizePixel(); - Fraction aStartWith(long(REPORT_STARTMARKER_WIDTH)); - aStartWith *= m_pParent->GetMapMode().GetScaleX(); + Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + aStartWidth *= m_pParent->GetMapMode().GetScaleX(); - aOut.Width() -= (long)aStartWith; + aOut.Width() -= (long)aStartWidth; - Rectangle aOutRect( pScrollWindow->getScrollOffset(), aOut ); + Rectangle aOutRect( pScrollWindow->getThumbPos(), aOut ); aOutRect = m_pParent->PixelToLogic( aOutRect ); //Rectangle aWorkArea = m_pParent->getView()->GetWorkArea(); Point aGcc3WorkaroundTemporary; Rectangle aWorkArea(aGcc3WorkaroundTemporary,pScrollWindow->getTotalSize()); - aWorkArea.Right() -= (long)aStartWith; + aWorkArea.Right() -= (long)aStartWidth; aWorkArea = pScrollWindow->PixelToLogic( aWorkArea ); if( !aOutRect.IsInside( rPos ) && aWorkArea.IsInside( rPos ) ) { @@ -388,6 +388,13 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) } } break; + case KEY_DELETE: + if ( !rCode.IsMod1() && !rCode.IsMod2() ) + { + bReturn = TRUE; + break; + } // if ( !rCode.IsMod1() && !rCode.IsMod2() ) + // run through default: { bReturn = m_rView.KeyInput(_rEvent, m_pParent); diff --git a/reportdesign/source/ui/report/makefile.mk b/reportdesign/source/ui/report/makefile.mk index 7cc2c2befd6e..b7c700d141b3 100644 --- a/reportdesign/source/ui/report/makefile.mk +++ b/reportdesign/source/ui/report/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.5.2.1 $ # # This file is part of OpenOffice.org. # @@ -56,7 +56,6 @@ SLOFILES =\ $(SLO)$/dlgedclip.obj \ $(SLO)$/ReportWindow.obj \ $(SLO)$/DesignView.obj \ - $(SLO)$/InsertFunctions.obj \ $(SLO)$/propbrw.obj diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src index 6612311d5c33..4a45d9c9e063 100644 --- a/reportdesign/source/ui/report/report.src +++ b/reportdesign/source/ui/report/report.src @@ -583,7 +583,7 @@ Image REPORT_TREE_ICON }; String RID_STR_COULD_NOT_CREATE_REPORT { - Text [ en-US ] = "An error occured while creating the report." ; + Text [ en-US ] = "An error occurred while creating the report." ; }; String RID_STR_CAUGHT_FOREIGN_EXCEPTION { diff --git a/reportdesign/uiconfig/dbreport/menubar/menubar.xml b/reportdesign/uiconfig/dbreport/menubar/menubar.xml index 0b84d9bcd326..3e678b5b2f37 100644 --- a/reportdesign/uiconfig/dbreport/menubar/menubar.xml +++ b/reportdesign/uiconfig/dbreport/menubar/menubar.xml @@ -1,168 +1,172 @@ <?xml version="1.0" encoding="UTF-8"?> <menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar"> - <menu:menu menu:id=".uno:PickList" > + <menu:menu menu:id=".uno:PickList" > + <menu:menupopup> + <menu:menuitem menu:id=".uno:AddDirect"/> + <menu:menuitem menu:id=".uno:Open"/> + <menu:menuitem menu:id=".uno:RecentFileList"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:AutoPilotMenu"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:CloseDoc"/> + <menu:menuitem menu:id=".uno:Save"/> + <menu:menuitem menu:id=".uno:SaveAs"/> + <menu:menuitem menu:id=".uno:SaveAll"/> + <menu:menuseparator/> + <menu:menu menu:id=".uno:ExportReportTo"> <menu:menupopup> - <menu:menuitem menu:id=".uno:AddDirect"/> - <menu:menuitem menu:id=".uno:Open"/> - <menu:menuitem menu:id=".uno:RecentFileList"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:AutoPilotMenu"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:CloseDoc"/> - <menu:menuitem menu:id=".uno:Save"/> - <menu:menuitem menu:id=".uno:SaveAs"/> - <menu:menuitem menu:id=".uno:SaveAll"/> - <menu:menuseparator/> - <menu:menu menu:id=".uno:ExportReportTo"> - <menu:menupopup> - <menu:menuitem menu:id=".uno:TextDocument"/> + <menu:menuitem menu:id=".uno:TextDocument"/> <menu:menuitem menu:id=".uno:Spreadsheet"/> - </menu:menupopup> - </menu:menu> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:Quit"/> </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:EditMenu" > + </menu:menu> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:Quit"/> + </menu:menupopup> + </menu:menu> + <menu:menu menu:id=".uno:EditMenu" > + <menu:menupopup> + <menu:menuitem menu:id=".uno:Undo"/> + <menu:menuitem menu:id=".uno:Redo"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:Cut"/> + <menu:menuitem menu:id=".uno:Copy"/> + <menu:menuitem menu:id=".uno:Paste"/> + <menu:menu menu:id=".uno:Select"> <menu:menupopup> - <menu:menuitem menu:id=".uno:Undo"/> - <menu:menuitem menu:id=".uno:Redo"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:Cut"/> - <menu:menuitem menu:id=".uno:Copy"/> - <menu:menuitem menu:id=".uno:Paste"/> - <menu:menuitem menu:id=".uno:SelectAll"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:Delete"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:PageHeaderFooter"/> - <menu:menuitem menu:id=".uno:ReportHeaderFooter"/> - <menu:menuitem menu:id=".uno:ColumnHeaderFooter"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:SelectReport"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:ExecuteReport"/> + <menu:menuitem menu:id=".uno:SelectAll"/> + <menu:menuitem menu:id=".uno:SelectAllLabels"/> + <menu:menuitem menu:id=".uno:SelectAllEdits"/> + <menu:menuitem menu:id=".uno:SelectReport"/> </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:ViewMenu" > + </menu:menu> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:Delete"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:PageHeaderFooter"/> + <menu:menuitem menu:id=".uno:ReportHeaderFooter"/> + <menu:menuitem menu:id=".uno:ColumnHeaderFooter"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:ExecuteReport"/> + </menu:menupopup> + </menu:menu> + <menu:menu menu:id=".uno:ViewMenu" > + <menu:menupopup> + <menu:menuitem menu:id=".uno:SwitchControlDesignMode"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:ControlProperties"/> + <menu:menuitem menu:id=".uno:AddField"/> + <menu:menuitem menu:id=".uno:DbSortingAndGrouping"/> + <menu:menuitem menu:id=".uno:ReportNavigator"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:AvailableToolbars"/> + <menu:menuitem menu:id=".uno:StatusBarVisible"/> + <menu:menuitem menu:id=".uno:ShowRuler"/> + <menu:menu menu:id=".uno:GridMenu" > <menu:menupopup> - <menu:menuitem menu:id=".uno:SwitchControlDesignMode"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:SubReportInNewWindow"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:ControlProperties"/> - <menu:menuitem menu:id=".uno:AddField"/> - <menu:menuitem menu:id=".uno:DbSortingAndGrouping"/> - <menu:menuitem menu:id=".uno:ReportNavigator"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:AvailableToolbars"/> - <menu:menuitem menu:id=".uno:StatusBarVisible"/> - <menu:menuitem menu:id=".uno:ShowRuler"/> - <menu:menu menu:id=".uno:GridMenu" > - <menu:menupopup> - <menu:menuitem menu:id=".uno:GridVisible"/> - <menu:menuitem menu:id=".uno:GridUse"/> - </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:SnapLinesMenu"> - <menu:menupopup> - <menu:menuitem menu:id=".uno:HelplinesMove"/> - </menu:menupopup> - </menu:menu> + <menu:menuitem menu:id=".uno:GridVisible"/> + <menu:menuitem menu:id=".uno:GridUse"/> </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:InsertMenu" > + </menu:menu> + <menu:menu menu:id=".uno:SnapLinesMenu"> <menu:menupopup> - <menu:menuitem menu:id=".uno:InsertPageNumberField"/> - <menu:menuitem menu:id=".uno:InsertDateTimeField"/> - <menu:menuseparator/> - <menu:menu menu:id=".uno:GraphicMenu"> - <menu:menupopup> - <menu:menuitem menu:id=".uno:InsertGraphic"/> - </menu:menupopup> - </menu:menu> + <menu:menuitem menu:id=".uno:HelplinesMove"/> </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:FormatMenu" > + </menu:menu> + <menu:menuitem menu:id=".uno:Zoom"/> + </menu:menupopup> + </menu:menu> + <menu:menu menu:id=".uno:InsertMenu" > + <menu:menupopup> + <menu:menuitem menu:id=".uno:InsertPageNumberField"/> + <menu:menuitem menu:id=".uno:InsertDateTimeField"/> + <menu:menuseparator/> + <menu:menu menu:id=".uno:GraphicMenu"> <menu:menupopup> - <menu:menuitem menu:id=".uno:ConditionalFormatting"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:FontDialog"/> - <menu:menuitem menu:id=".uno:PageDialog"/> - <menu:menuseparator/> - <menu:menu menu:id=".uno:ArrangeMenu"> - <menu:menupopup> - <menu:menuitem menu:id=".uno:BringToFront"/> - <menu:menuitem menu:id=".uno:ObjectBackOne"/> - <menu:menuitem menu:id=".uno:ObjectForwardOne"/> - <menu:menuitem menu:id=".uno:SendToBack"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:SetObjectToForeground"/> - <menu:menuitem menu:id=".uno:SetObjectToBackground"/> - </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:ObjectAlign" > - <menu:menupopup> - <menu:menuitem menu:id=".uno:ObjectAlignLeft"/> - <menu:menuitem menu:id=".uno:AlignCenter"/> - <menu:menuitem menu:id=".uno:ObjectAlignRight"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:AlignUp"/> - <menu:menuitem menu:id=".uno:AlignMiddle"/> - <menu:menuitem menu:id=".uno:AlignDown"/> - </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:ObjectResize" > - <menu:menupopup> - <menu:menuitem menu:id=".uno:SmallestWidth"/> - <menu:menuitem menu:id=".uno:GreatestWidth"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:SmallestHeight"/> - <menu:menuitem menu:id=".uno:GreatestHeight"/> - </menu:menupopup> - </menu:menu> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:Distribution"/> + <menu:menuitem menu:id=".uno:InsertGraphic"/> </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:ToolsMenu" > + </menu:menu> + </menu:menupopup> + </menu:menu> + <menu:menu menu:id=".uno:FormatMenu" > + <menu:menupopup> + <menu:menuitem menu:id=".uno:ConditionalFormatting"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:FontDialog"/> + <menu:menuitem menu:id=".uno:PageDialog"/> + <menu:menuseparator/> + <menu:menu menu:id=".uno:ArrangeMenu"> <menu:menupopup> - <menu:menu menu:id=".uno:MacrosMenu" > - <menu:menupopup> - <menu:menuitem menu:id=".uno:MacroRecorder"/> - <menu:menuitem menu:id=".uno:RunMacro"/> - <menu:menu menu:id=".uno:ScriptOrganizer"/> - <menu:menuitem menu:id=".uno:MacroSignature"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/> - </menu:menupopup> - </menu:menu> - <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/> - <menu:menuitem menu:id=".uno:ConfigureDialog"/> - <menu:menuitem menu:id=".uno:OptionsTreeDialog"/> + <menu:menuitem menu:id=".uno:BringToFront"/> + <menu:menuitem menu:id=".uno:ObjectBackOne"/> + <menu:menuitem menu:id=".uno:ObjectForwardOne"/> + <menu:menuitem menu:id=".uno:SendToBack"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:SetObjectToForeground"/> + <menu:menuitem menu:id=".uno:SetObjectToBackground"/> </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:WindowList" > + </menu:menu> + <menu:menu menu:id=".uno:ObjectAlign" > <menu:menupopup> - <menu:menuitem menu:id=".uno:NewWindow"/> - <menu:menuitem menu:id=".uno:CloseWin"/> - <menu:menuseparator/> + <menu:menuitem menu:id=".uno:ObjectAlignLeft"/> + <menu:menuitem menu:id=".uno:AlignCenter"/> + <menu:menuitem menu:id=".uno:ObjectAlignRight"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:AlignUp"/> + <menu:menuitem menu:id=".uno:AlignMiddle"/> + <menu:menuitem menu:id=".uno:AlignDown"/> </menu:menupopup> - </menu:menu> - <menu:menu menu:id=".uno:HelpMenu"> + </menu:menu> + <menu:menu menu:id=".uno:ObjectResize" > <menu:menupopup> - <menu:menuitem menu:id=".uno:HelpIndex"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:ExtendedHelp"/> - <menu:menuitem menu:id=".uno:HelpTip"/> - <menu:menuitem menu:id=".uno:ActiveHelp"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:HelperDialog"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:HelpSupport"/> - <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/> - <menu:menuseparator/> - <menu:menuitem menu:id=".uno:About"/> + <menu:menuitem menu:id=".uno:SmallestWidth"/> + <menu:menuitem menu:id=".uno:GreatestWidth"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:SmallestHeight"/> + <menu:menuitem menu:id=".uno:GreatestHeight"/> </menu:menupopup> - </menu:menu> + </menu:menu> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:Distribution"/> + </menu:menupopup> + </menu:menu> + <menu:menu menu:id=".uno:ToolsMenu" > + <menu:menupopup> + <menu:menu menu:id=".uno:MacrosMenu" > + <menu:menupopup> + <menu:menuitem menu:id=".uno:MacroRecorder"/> + <menu:menuitem menu:id=".uno:RunMacro"/> + <menu:menu menu:id=".uno:ScriptOrganizer"/> + <menu:menuitem menu:id=".uno:MacroSignature"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/> + </menu:menupopup> + </menu:menu> + <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/> + <menu:menuitem menu:id=".uno:ConfigureDialog"/> + <menu:menuitem menu:id=".uno:OptionsTreeDialog"/> + </menu:menupopup> + </menu:menu> + <menu:menu menu:id=".uno:WindowList" > + <menu:menupopup> + <menu:menuitem menu:id=".uno:NewWindow"/> + <menu:menuitem menu:id=".uno:CloseWin"/> + <menu:menuseparator/> + </menu:menupopup> + </menu:menu> + <menu:menu menu:id=".uno:HelpMenu"> + <menu:menupopup> + <menu:menuitem menu:id=".uno:HelpIndex"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:ExtendedHelp"/> + <menu:menuitem menu:id=".uno:HelpTip"/> + <menu:menuitem menu:id=".uno:ActiveHelp"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:HelperDialog"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:HelpSupport"/> + <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:About"/> + </menu:menupopup> + </menu:menu> </menu:menubar> diff --git a/reportdesign/uiconfig/dbreport/statusbar/statusbar.xml b/reportdesign/uiconfig/dbreport/statusbar/statusbar.xml index 74a549121c91..7e50780b633d 100644 --- a/reportdesign/uiconfig/dbreport/statusbar/statusbar.xml +++ b/reportdesign/uiconfig/dbreport/statusbar/statusbar.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE statusbar:statusbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "statusbar.dtd"> <statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink"> - <statusbar:statusbaritem xlink:href=".uno:ReportStatusDummy" statusbar:align="center" statusbar:ownerdraw="true" statusbar:autosize="true"/> + <statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="130" statusbar:helpid="helpid:11065"/> + <statusbar:statusbaritem xlink:href=".uno:Zoom" statusbar:align="center" statusbar:width="35" statusbar:helpid="helpid:10000"/> </statusbar:statusbar> diff --git a/reportdesign/util/description.xml b/reportdesign/util/description.xml index a7f78e8b6e6a..e93c239d67d1 100644 --- a/reportdesign/util/description.xml +++ b/reportdesign/util/description.xml @@ -1,22 +1,27 @@ -<?xml version="1.0" encoding="utf-8"?>
-<description xmlns="http://openoffice.org/extensions/description/2006"
- xmlns:d="http://openoffice.org/extensions/description/2006"
- xmlns:xlink="http://www.w3.org/1999/xlink">
- <display-name>
- <name lang="en-US">Sun™ Report Builder</name>
- <!-- <name lang="en-US">Sun(TM) Report Builder</name> -->
- </display-name>
- <registration>
- <simple-license accept-by="admin" default-license-id="en-US" >
- <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/>
- </simple-license>
- </registration>
- <version value="1.0.6"/>
- <identifier value="com.sun.reportdesigner"/>
- <dependencies>
- <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/>
- </dependencies>
- <publisher>
- <name xlink:href="http://www.sun.com/staroffice" lang="en">Sun Microsystems, Inc.</name>
- </publisher>
-</description>
+<?xml version="1.0" encoding="utf-8"?> +<description xmlns="http://openoffice.org/extensions/description/2006" + xmlns:d="http://openoffice.org/extensions/description/2006" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <display-name> + <name lang="en-US">Sun™ Report Builder</name> + <!-- <name lang="en-US">Sun(TM) Report Builder</name> --> + </display-name> + <registration> + <simple-license accept-by="admin" default-license-id="en-US" > + <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> + </simple-license> + </registration> + <version value="#VERSION#"/> + <identifier value="com.sun.reportdesigner"/> + <dependencies> + <OpenOffice.org-minimal-version value="3.1" d:name="OpenOffice.org 3.1"/> + </dependencies> + <publisher> + <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Sun Microsystems, Inc.</name> + </publisher> + <icon> + <default xlink:href="images/em42.png" /> + <high-contrast xlink:href="images/em42_hc.png" /> + </icon> +</description> + diff --git a/reportdesign/util/makefile.mk b/reportdesign/util/makefile.mk index c1b5c2fd3bac..293fb8691873 100644 --- a/reportdesign/util/makefile.mk +++ b/reportdesign/util/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.21 $ +# $Revision: 1.21.2.2 $ # # This file is part of OpenOffice.org. # @@ -37,6 +37,13 @@ TARGET2=$(TARGET)ui GEN_HID=TRUE GEN_HID_OTHER=TRUE +EXTENSION_VERSION_BASE=1.0.9 +.IF "$(PRODUCT)" != "" + EXTENSION_VERSION=$(EXTENSION_VERSION_BASE) +.ELSE + EXTENSION_VERSION=$(EXTENSION_VERSION_BASE).$(BUILD) +.ENDIF + # --- Settings ---------------------------------- .INCLUDE : makefile.pmk @@ -202,8 +209,12 @@ DEF3NAME=$(SHL3TARGET) .IF "$(SOLAR_JAVA)"!="" -XMLFILES = $(EXTENSIONDIR)$/description.xml \ - $(EXTENSIONDIR)$/META-INF$/manifest.xml +XMLFILES = $(EXTENSIONDIR)$/META-INF$/manifest.xml + +# DESCRIPTION_SRC is the source file which is copied into the extension +# It is defaulted to "descriptio.xml", but we want to pre-process it, so we use an intermediate +# file +DESCRIPTION_SRC = $(MISC)$/description.xml COMPONENT_MERGED_XCU= \ $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Setup.xcu \ @@ -223,6 +234,10 @@ COMPONENT_MERGED_XCU= \ COMPONENT_OTR_FILES= \ $(EXTENSIONDIR)$/template$/en-US$/wizard$/report$/default.otr + +COMPONENT_IMAGES= \ + $(EXTENSIONDIR)$/images$/em42.png \ + $(EXTENSIONDIR)$/images$/em42_hc.png COMPONENT_HTMLFILES = $(EXTENSIONDIR)$/THIRDPARTYREADMELICENSE.html \ $(EXTENSIONDIR)$/readme_en-US.html \ @@ -254,7 +269,7 @@ COMPONENT_MANIFEST_GENERIC:=TRUE COMPONENT_MANIFEST_SEARCHDIR:=registry # make sure to add your custom files here -EXTENSION_PACKDEPS=$(COMPONENT_EXTJARFILES) $(COMPONENT_HTMLFILES) $(COMPONENT_OTR_FILES) $(COMPONENT_HELP) +EXTENSION_PACKDEPS=$(COMPONENT_EXTJARFILES) $(COMPONENT_HTMLFILES) $(COMPONENT_OTR_FILES) $(COMPONENT_HELP) $(COMPONENT_IMAGES) # --- Targets ---------------------------------- @@ -316,6 +331,10 @@ $(EXTENSIONDIR)$/readme_en-US.% : $(PRJ)$/license$/readme_en-US.% @@-$(MKDIRHIER) $(@:d) $(COPY) $< $@ +$(EXTENSIONDIR)$/images$/%.png : $(PRJ)$/images$/%.png + @@-$(MKDIRHIER) $(@:d) + $(COPY) $< $@ + $(EXTENSIONDIR)$/THIRDPARTYREADMELICENSE.html : $(PRJ)$/license$/THIRDPARTYREADMELICENSE.html @@-$(MKDIRHIER) $(@:d) $(COPY) $< $@ @@ -324,6 +343,9 @@ $(COMPONENT_HELP) : $$(@:f) @@-$(MKDIRHIER) $(@:d) $(COPY) $< $@ +$(DESCRIPTION_SRC): description.xml + $(TYPE) description.xml | $(SED) s/#VERSION#/$(EXTENSION_VERSION)/> $@ + .ELSE # "$(SOLAR_JAVA)"!="" .INCLUDE : target.mk .ENDIF # "$(SOLAR_JAVA)"!="" |