Tag: cws_src680_rpt23fix01 User: lla Date: 2007-07-16 07:49:04+0000 Modified: dba/reportdesign/source/ui/report/DesignView.cxx dba/reportdesign/source/ui/report/ReportController.cxx dba/reportdesign/source/ui/report/ReportSection.cxx dba/reportdesign/source/ui/report/ReportWindow.cxx dba/reportdesign/source/ui/report/ScrollHelper.cxx dba/reportdesign/source/ui/report/ViewsWindow.cxx
Log: #77986# toolbar fix File Changes: Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: DesignView.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/DesignView.cxx?r1=1.2&r2=1.2.2.1 Delta lines: +9 -3 ------------------- --- DesignView.cxx 2007-07-09 11:56:32+0000 1.2 +++ DesignView.cxx 2007-07-16 07:49:01+0000 1.2.2.1 @@ -4,9 +4,9 @@ * * $RCSfile: DesignView.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.2.1 $ * - * last change: $Author: rt $ $Date: 2007/07/09 11:56:32 $ + * last change: $Author: lla $ $Date: 2007/07/16 07:49:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -325,7 +325,13 @@ if ( m_pScrollWindow ) m_pScrollWindow->SetInsertObj( eObj,_sShapeType ); } - +//---------------------------------------------------------------------------- +rtl::OUString ODesignView::GetInsertObjString() const +{ + if ( m_pScrollWindow ) + return m_pScrollWindow->GetInsertObjString(); + return rtl::OUString(); +} //---------------------------------------------------------------------------- USHORT ODesignView::GetInsertObj() const File [changed]: ReportController.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportController.cxx?r1=1.2.2.4&r2=1.2.2.5 Delta lines: +55 -10 --------------------- --- ReportController.cxx 2007-07-12 13:47:35+0000 1.2.2.4 +++ ReportController.cxx 2007-07-16 07:49:01+0000 1.2.2.5 @@ -4,9 +4,9 @@ * * $RCSfile: ReportController.cxx,v $ * - * $Revision: 1.2.2.4 $ + * $Revision: 1.2.2.5 $ * - * last change: $Author: lla $ $Date: 2007/07/12 13:47:35 $ + * last change: $Author: lla $ $Date: 2007/07/16 07:49:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -720,11 +720,14 @@ case SID_DRAWTBX_CS_BASIC20: case SID_DRAWTBX_CS_BASIC21: case SID_DRAWTBX_CS_BASIC22: + { + aReturn.bEnabled = isEditable(); + rtl::OUString sShapeType = m_pMyOwnView->GetInsertObjString(); + aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && + sShapeType.compareToAscii("diamond") == 0; + } + break; case SID_DRAWTBX_CS_SYMBOL: - case SID_DRAWTBX_CS_ARROW: - case SID_DRAWTBX_CS_FLOWCHART: - case SID_DRAWTBX_CS_CALLOUT: - case SID_DRAWTBX_CS_STAR: case SID_DRAWTBX_CS_SYMBOL1: case SID_DRAWTBX_CS_SYMBOL2: case SID_DRAWTBX_CS_SYMBOL3: @@ -743,6 +746,14 @@ case SID_DRAWTBX_CS_SYMBOL16: case SID_DRAWTBX_CS_SYMBOL17: case SID_DRAWTBX_CS_SYMBOL18: + { + aReturn.bEnabled = isEditable(); + rtl::OUString sShapeType = m_pMyOwnView->GetInsertObjString(); + aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && + sShapeType.compareToAscii("smiley") == 0; + } + break; + case SID_DRAWTBX_CS_ARROW: case SID_DRAWTBX_CS_ARROW1: case SID_DRAWTBX_CS_ARROW2: case SID_DRAWTBX_CS_ARROW3: @@ -769,6 +780,14 @@ case SID_DRAWTBX_CS_ARROW24: case SID_DRAWTBX_CS_ARROW25: case SID_DRAWTBX_CS_ARROW26: + { + aReturn.bEnabled = isEditable(); + rtl::OUString sShapeType = m_pMyOwnView->GetInsertObjString(); + aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && + sShapeType.compareToAscii("left-right-arrow") == 0; + } + break; + case SID_DRAWTBX_CS_STAR: case SID_DRAWTBX_CS_STAR1: case SID_DRAWTBX_CS_STAR2: case SID_DRAWTBX_CS_STAR3: @@ -781,6 +800,14 @@ case SID_DRAWTBX_CS_STAR10: case SID_DRAWTBX_CS_STAR11: case SID_DRAWTBX_CS_STAR12: + { + aReturn.bEnabled = isEditable(); + rtl::OUString sShapeType = m_pMyOwnView->GetInsertObjString(); + aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && + sShapeType.compareToAscii("star5") == 0; + } + break; + case SID_DRAWTBX_CS_FLOWCHART: case SID_DRAWTBX_CS_FLOWCHART1: case SID_DRAWTBX_CS_FLOWCHART2: case SID_DRAWTBX_CS_FLOWCHART3: @@ -809,6 +836,14 @@ case SID_DRAWTBX_CS_FLOWCHART26: case SID_DRAWTBX_CS_FLOWCHART27: case SID_DRAWTBX_CS_FLOWCHART28: + { + aReturn.bEnabled = isEditable(); + rtl::OUString sShapeType = m_pMyOwnView->GetInsertObjString(); + aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && + sShapeType.compareToAscii("flowchart-internal-storage") == 0; + } + break; + case SID_DRAWTBX_CS_CALLOUT: case SID_DRAWTBX_CS_CALLOUT1: case SID_DRAWTBX_CS_CALLOUT2: case SID_DRAWTBX_CS_CALLOUT3: @@ -816,8 +851,12 @@ case SID_DRAWTBX_CS_CALLOUT5: case SID_DRAWTBX_CS_CALLOUT6: case SID_DRAWTBX_CS_CALLOUT7: + { aReturn.bEnabled = isEditable(); - aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE; + rtl::OUString sShapeType = m_pMyOwnView->GetInsertObjString(); + aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && + sShapeType.compareToAscii("round-rectangular-callout") == 0; + } break; case SID_RPT_SHOWREPORTEXPLORER: aReturn.bEnabled = m_xReportDefinition.is(); @@ -3321,9 +3360,15 @@ aMap.createItemIfMissing(PROPERTY_FORMATKEY,aMap.getUnpackedValueOrDefault(PROPERTY_FORMATKEYDATE,sal_Int32(0))); uno::Reference< report::XSection> xSection = aMap.getUnpackedValueOrDefault(PROPERTY_SECTION,uno::Reference< report::XSection>()); - ::rtl::OUString sFunction(RTL_CONSTASCII_USTRINGPARAM("TODAY()")); + ::rtl::OUString sFunction; + + sal_Bool bDate = aMap.getUnpackedValueOrDefault(PROPERTY_DATE_STATE,sal_False); + if ( bDate ) + { + sFunction = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("TODAY()")); createControl(aMap.getAsConstPropertyValueList(),xSection,sFunction); - sal_Bool bTime = aMap.getUnpackedValueOrDefault(PROPERTY_STATE,sal_False); + } + sal_Bool bTime = aMap.getUnpackedValueOrDefault(PROPERTY_TIME_STATE,sal_False); if ( bTime ) { sFunction = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("NOW()")); File [changed]: ReportSection.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportSection.cxx?r1=1.2.2.1&r2=1.2.2.2 Delta lines: +14 -2 -------------------- --- ReportSection.cxx 2007-07-11 09:58:18+0000 1.2.2.1 +++ ReportSection.cxx 2007-07-16 07:49:01+0000 1.2.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: ReportSection.cxx,v $ * - * $Revision: 1.2.2.1 $ + * $Revision: 1.2.2.2 $ * - * last change: $Author: oj $ $Date: 2007/07/11 09:58:18 $ + * last change: $Author: lla $ $Date: 2007/07/16 07:49:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -112,11 +112,22 @@ #include <svtools/itempool.hxx> #endif #include <svx/unoshape.hxx> +#include <unotools/confignode.hxx> +#include <svtools/extcolorcfg.hxx> + // ============================================================================= namespace rptui { // ============================================================================= using namespace ::com::sun::star; +// ----------------------------------------------------------------------------- + +sal_Int32 lcl_getOverlappedControlColor(const uno::Reference <lang::XMultiServiceFactory> _rxFactory) +{ + svtools::ExtendedColorConfig aConfig; + sal_Int32 nColor = aConfig.GetColorValue(rtl::OUString::createFromAscii("ReportDesigner"), rtl::OUString::createFromAscii("OverlappedControl")).nColor; + return nColor; +} //------------------------------------------------------------------------------ DBG_NAME( rpt_OReportSection ) OReportSection::OReportSection(OViewsWindow* _pParent,const uno::Reference< report::XSection >& _xSection) @@ -142,6 +153,7 @@ try { fill(); + m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( m_pParent->getView()->getReportView()->getController()->getORB() ) ); } catch(uno::Exception&) { File [changed]: ReportWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportWindow.cxx?r1=1.2&r2=1.2.2.1 Delta lines: +10 -2 -------------------- --- ReportWindow.cxx 2007-07-09 11:56:33+0000 1.2 +++ ReportWindow.cxx 2007-07-16 07:49:01+0000 1.2.2.1 @@ -4,9 +4,9 @@ * * $RCSfile: ReportWindow.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.2.1 $ * - * last change: $Author: rt $ $Date: 2007/07/09 11:56:33 $ + * last change: $Author: lla $ $Date: 2007/07/16 07:49:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -168,6 +168,14 @@ if ( m_pViews ) m_pViews->SetInsertObj( eObj,_sShapeType); } + +//---------------------------------------------------------------------------- +rtl::OUString OReportWindow::GetInsertObjString() const +{ + if ( m_pViews ) + return m_pViews->GetInsertObjString(); + return rtl::OUString(); +} //------------------------------------------------------------------------------ void OReportWindow::SetMode( DlgEdMode eNewMode ) { File [changed]: ScrollHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ScrollHelper.cxx?r1=1.2.2.1&r2=1.2.2.2 Delta lines: +7 -2 ------------------- --- ScrollHelper.cxx 2007-07-11 09:43:37+0000 1.2.2.1 +++ ScrollHelper.cxx 2007-07-16 07:49:01+0000 1.2.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: ScrollHelper.cxx,v $ * - * $Revision: 1.2.2.1 $ + * $Revision: 1.2.2.2 $ * - * last change: $Author: oj $ $Date: 2007/07/11 09:43:37 $ + * last change: $Author: lla $ $Date: 2007/07/16 07:49:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -286,6 +286,11 @@ { m_pChild->SetInsertObj(eObj,_sShapeType); } +//---------------------------------------------------------------------------- +rtl::OUString OScrollWindowHelper::GetInsertObjString() const +{ + return m_pChild->GetInsertObjString(); +} //------------------------------------------------------------------------------ void OScrollWindowHelper::SetMode( DlgEdMode _eNewMode ) { File [changed]: ViewsWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ViewsWindow.cxx?r1=1.2.2.2&r2=1.2.2.3 Delta lines: +7 -2 ------------------- --- ViewsWindow.cxx 2007-07-11 11:29:54+0000 1.2.2.2 +++ ViewsWindow.cxx 2007-07-16 07:49:01+0000 1.2.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: ViewsWindow.cxx,v $ * - * $Revision: 1.2.2.2 $ + * $Revision: 1.2.2.3 $ * - * last change: $Author: oj $ $Date: 2007/07/11 11:29:54 $ + * last change: $Author: lla $ $Date: 2007/07/16 07:49:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -513,6 +513,11 @@ m_sShapeType = _sShapeType; } //---------------------------------------------------------------------------- +rtl::OUString OViewsWindow::GetInsertObjString() const +{ + return m_sShapeType; +} + //------------------------------------------------------------------------------ void OViewsWindow::SetMode( DlgEdMode eNewMode ) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
