diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-20 09:52:21 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-20 09:52:21 +0200 |
commit | e70b1417d22d22e3d5bdffb1f4b55bc83a4c36ef (patch) | |
tree | 3bd3a7fe6854916ee1afa9ee042fc91b3fb9c24e /reportdesign/source/ui | |
parent | c00fe9ce1105c6c2a26954eeaee5e51336909a2a (diff) | |
parent | f1ea4ba4479f4a29eb0a42389d5f03c2ad280e8f (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
dbaccess/AllLangResTarget_adabasui.mk
dbaccess/AllLangResTarget_dba.mk
dbaccess/AllLangResTarget_dbmm.mk
dbaccess/AllLangResTarget_sdbt.mk
dbaccess/Executable_odbcconfig.mk
dbaccess/JunitTest_dbaccess_unoapi.mk
dbaccess/Library_adabasui.mk
dbaccess/Library_dba.mk
dbaccess/Library_dbaxml.mk
dbaccess/Library_dbmm.mk
dbaccess/Library_sdbt.mk
dbaccess/Makefile
dbaccess/Module_dbaccess.mk
dbaccess/Package_inc.mk
dbaccess/Package_uiconfig.mk
dbaccess/prj/build.lst
dbaccess/qa/unoapi/Test.java
dbaccess/source/core/api/CacheSet.hxx
dbaccess/source/core/dataaccess/SharedConnection.hxx
dbaccess/source/core/dataaccess/connection.cxx
dbaccess/source/filter/xml/xmlAutoStyle.cxx
dbaccess/source/filter/xml/xmlColumn.cxx
dbaccess/source/filter/xml/xmlComponent.cxx
dbaccess/source/filter/xml/xmlConnectionData.cxx
dbaccess/source/filter/xml/xmlConnectionResource.cxx
dbaccess/source/filter/xml/xmlDataSource.cxx
dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
dbaccess/source/filter/xml/xmlDatabaseDescription.cxx
dbaccess/source/filter/xml/xmlDocuments.cxx
dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
dbaccess/source/filter/xml/xmlHelper.cxx
dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
dbaccess/source/filter/xml/xmlLogin.cxx
dbaccess/source/filter/xml/xmlQuery.cxx
dbaccess/source/filter/xml/xmlServerDatabase.cxx
dbaccess/source/filter/xml/xmlTable.cxx
dbaccess/source/filter/xml/xmlTableFilterList.cxx
dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
dbaccess/source/ui/app/AppDetailPageHelper.cxx
dbaccess/source/ui/app/AppDetailView.cxx
dbaccess/source/ui/app/AppIconControl.cxx
dbaccess/source/ui/app/AppSwapWindow.cxx
dbaccess/source/ui/app/AppTitleWindow.cxx
dbaccess/source/ui/app/AppView.cxx
dbaccess/source/ui/browser/AsyncronousLink.cxx
dbaccess/source/ui/browser/genericcontroller.cxx
dbaccess/source/ui/control/ColumnControlWindow.cxx
dbaccess/source/ui/control/RelationControl.cxx
dbaccess/source/ui/control/SqlNameEdit.cxx
dbaccess/source/ui/control/TableGrantCtrl.cxx
dbaccess/source/ui/control/VertSplitView.cxx
dbaccess/source/ui/control/toolboxcontroller.cxx
dbaccess/source/ui/dlg/CollectionView.cxx
dbaccess/source/ui/dlg/ConnectionHelper.cxx
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
dbaccess/source/ui/dlg/RelationDlg.cxx
dbaccess/source/ui/dlg/TextConnectionHelper.cxx
dbaccess/source/ui/dlg/detailpages.cxx
dbaccess/source/ui/dlg/dlgsize.cxx
dbaccess/source/ui/dlg/queryorder.cxx
dbaccess/source/ui/dlg/tablespage.cxx
dbaccess/source/ui/misc/TableCopyHelper.cxx
dbaccess/source/ui/misc/ToolBoxHelper.cxx
dbaccess/source/ui/misc/WExtendPages.cxx
dbaccess/source/ui/misc/WNameMatch.cxx
dbaccess/source/ui/misc/WTypeSelect.cxx
dbaccess/source/ui/querydesign/ConnectionLine.cxx
dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
dbaccess/source/ui/querydesign/ConnectionLineData.cxx
dbaccess/source/ui/querydesign/JAccess.cxx
dbaccess/source/ui/querydesign/JoinController.cxx
dbaccess/source/ui/querydesign/JoinDesignView.cxx
dbaccess/source/ui/querydesign/JoinExchange.cxx
dbaccess/source/ui/querydesign/JoinTableView.cxx
dbaccess/source/ui/querydesign/QTableConnection.cxx
dbaccess/source/ui/querydesign/QTableConnectionData.cxx
dbaccess/source/ui/querydesign/QTableWindow.cxx
dbaccess/source/ui/querydesign/QTableWindowData.cxx
dbaccess/source/ui/querydesign/QueryDesignView.cxx
dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
dbaccess/source/ui/querydesign/QueryTextView.cxx
dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
dbaccess/source/ui/querydesign/TableConnection.cxx
dbaccess/source/ui/querydesign/TableConnectionData.cxx
dbaccess/source/ui/querydesign/TableWindow.cxx
dbaccess/source/ui/querydesign/TableWindowAccess.cxx
dbaccess/source/ui/querydesign/TableWindowData.cxx
dbaccess/source/ui/querydesign/TableWindowListBox.cxx
dbaccess/source/ui/querydesign/TableWindowTitle.cxx
dbaccess/source/ui/querydesign/querydlg.cxx
dbaccess/source/ui/querydesign/queryview.cxx
dbaccess/source/ui/relationdesign/RTableConnection.cxx
dbaccess/source/ui/relationdesign/RelationDesignView.cxx
dbaccess/source/ui/relationdesign/RelationTableView.cxx
dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
dbaccess/source/ui/tabledesign/TEditControl.cxx
dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
dbaccess/source/ui/tabledesign/TableDesignView.cxx
dbaccess/source/ui/tabledesign/TableFieldControl.cxx
dbaccess/source/ui/tabledesign/TableRow.cxx
dbaccess/source/ui/tabledesign/TableRowExchange.cxx
dbaccess/source/ui/tabledesign/TableUndo.cxx
dbaccess/source/ui/uno/ColumnControl.cxx
dbaccess/source/ui/uno/ColumnPeer.cxx
reportdesign/AllLangResTarget_rpt.mk
reportdesign/AllLangResTarget_rptui.mk
reportdesign/Library_rpt.mk
reportdesign/Library_rptui.mk
reportdesign/Library_rptxml.mk
reportdesign/Module_reportdesign.mk
reportdesign/Package_uiconfig.mk
reportdesign/Package_xml.mk
reportdesign/prj/build.lst
reportdesign/prj/makefile.mk
Diffstat (limited to 'reportdesign/source/ui')
94 files changed, 598 insertions, 1376 deletions
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 4c42761a46f5..81f24d3eb2d8 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,8 +76,6 @@ class OAddFieldWindowListBox : public SvTreeListBox OAddFieldWindowListBox(const OAddFieldWindowListBox&); void operator =(const OAddFieldWindowListBox&); -protected: -// virtual void Command( const CommandEvent& rEvt ); public: OAddFieldWindowListBox( OAddFieldWindow* _pParent ); @@ -206,7 +205,6 @@ OAddFieldWindow::OAddFieldWindow(Window* pParent m_aHelpText.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() ); SetSizePixel(Size(STD_WIN_SIZE_X,STD_WIN_SIZE_Y)); - //Show(); if ( m_xRowSet.is() ) { @@ -447,7 +445,7 @@ void OAddFieldWindow::fillDescriptor(SvLBoxEntry* _pSelected,::svx::ODataAccessD uno::Reference<frame::XModel> xModel(xDocument->getDatabaseDocument(),uno::UNO_QUERY); if ( xModel.is() ) _rDescriptor[ daDatabaseLocation ] <<= xModel->getURL(); - } // if ( xDocument.is() ) + } } _rDescriptor[ ::svx::daCommand ] <<= GetCommand(); @@ -456,7 +454,6 @@ void OAddFieldWindow::fillDescriptor(SvLBoxEntry* _pSelected,::svx::ODataAccessD _rDescriptor[ ::svx::daConnection ] <<= getConnection(); ColumnInfo* pInfo = static_cast<ColumnInfo*>(_pSelected->GetUserData()); - // ::rtl::OUString sColumnName = m_pListBox->GetEntryText( _pSelected ); _rDescriptor[ ::svx::daColumnName ] <<= pInfo->sColumnName; if ( m_xColumns->hasByName( pInfo->sColumnName ) ) _rDescriptor[ ::svx::daColumnObject ] <<= m_xColumns->getByName(pInfo->sColumnName); @@ -511,16 +508,12 @@ IMPL_LINK( OAddFieldWindow, OnDoubleClickHdl, void* ,/*_pAddFieldDlg*/) return 0L; } //------------------------------------------------------------------------------ -ImageList OAddFieldWindow::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const +ImageList OAddFieldWindow::getImageList(sal_Int16 _eBitmapSet) const { sal_Int16 nN = IMG_ADDFIELD_DLG_SC; - sal_Int16 nH = IMG_ADDFIELD_DLG_SCH; if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE ) - { nN = IMG_ADDFIELD_DLG_LC; - nH = IMG_ADDFIELD_DLG_LCH; - } - return ImageList(ModuleRes( _bHiContast ? nH : nN )); + return ImageList(ModuleRes(nN)); } //------------------------------------------------------------------ void OAddFieldWindow::resizeControls(const Size& _rDiff) @@ -556,7 +549,7 @@ IMPL_LINK( OAddFieldWindow, OnSortAction, ToolBox*, /*NOTINTERESTEDIN*/ ) eSortMode = SortAscending; else if ( m_aActions.IsItemChecked(SID_FM_SORTDOWN) ) eSortMode = SortDescending; - } // if ( SID_FM_REMOVE_FILTER_SORT != nCurItem ) + } m_pListBox->GetModel()->SetSortMode(eSortMode); if ( SID_FM_REMOVE_FILTER_SORT == nCurItem ) @@ -572,3 +565,4 @@ IMPL_LINK( OAddFieldWindow, OnSortAction, ToolBox*, /*NOTINTERESTEDIN*/ ) } // namespace rptui // ============================================================================= +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index e14d363441b1..77cb28e7ce0d 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -368,7 +369,7 @@ namespace rptui aPos += LogicToPixel( Point( 0 , UNRELATED_CONTROLS ), MAP_APPFONT ); Window* pWindows[] = { &m_aPB_OK, &m_aPB_CANCEL, &m_aPB_Help }; - for ( size_t i= 0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i ) + for ( size_t i= 0; i < SAL_N_ELEMENTS(pWindows); ++i ) { pWindows[i]->SetPosSizePixel( 0, aPos.Y(), 0, 0, WINDOW_POSSIZE_Y ); } @@ -393,7 +394,7 @@ namespace rptui } catch(Exception&) { - OSL_ENSURE(0,"Can not access format condition!"); + OSL_FAIL("Can not access format condition!"); } impl_conditionCountChanged(); @@ -623,3 +624,5 @@ namespace rptui // ............................................................................. } // rptui // ............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/CondFormat.hrc b/reportdesign/source/ui/dlg/CondFormat.hrc index 89e0e1b88246..47091374dec8 100644 --- a/reportdesign/source/ui/dlg/CondFormat.hrc +++ b/reportdesign/source/ui/dlg/CondFormat.hrc @@ -67,8 +67,6 @@ #define BTN_MOVE_DOWN 21 #define BTN_ADD_CONDITION 22 #define BTN_REMOVE_CONDITION 23 -#define IMG_MOVE_UP_HC 24 -#define IMG_MOVE_DOWN_HC 25 #define ROW_0_POS ( RELATED_CONTROLS ) #define ROW_0_HEIGTH ( FIXEDTEXT_HEIGHT ) diff --git a/reportdesign/source/ui/dlg/CondFormat.src b/reportdesign/source/ui/dlg/CondFormat.src index 14fe6649aff1..e062e14779d1 100644 --- a/reportdesign/source/ui/dlg/CondFormat.src +++ b/reportdesign/source/ui/dlg/CondFormat.src @@ -190,16 +190,6 @@ Control WIN_CONDITION Size = MAP_APPFONT( IMAGE_BUTTON_WIDTH, IMAGE_BUTTON_HEIGHT ); Text = "-"; }; - - Image IMG_MOVE_UP_HC - { - ImageBitmap = Bitmap { File = "arrow_move_up_hc" ; }; - }; - - Image IMG_MOVE_DOWN_HC - { - ImageBitmap = Bitmap { File = "arrow_move_down_hc" ; }; - }; }; ModalDialog RID_CONDFORMAT @@ -286,57 +276,29 @@ ImageList IMG_CONDFORMAT_DLG_SC MASKCOLOR; FileList = { - < "res/commandimagelist/sc_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ; - < "res/commandimagelist/sc_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ; - < "res/commandimagelist/sc_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ; - < "res/commandimagelist/sc_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ; - < "res/commandimagelist/sc_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ; - < "res/commandimagelist/sc_fontdialog.png" ; SID_CHAR_DLG ; > ; + < "cmd/sc_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ; + < "cmd/sc_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ; + < "cmd/sc_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ; + < "cmd/sc_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ; + < "cmd/sc_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ; + < "cmd/sc_fontdialog.png" ; SID_CHAR_DLG ; > ; }; }; -ImageList IMG_CONDFORMAT_DLG_SCH -{ - MASKCOLOR; - FileList = - { - < "res/commandimagelist/sch_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ; - < "res/commandimagelist/sch_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ; - < "res/commandimagelist/sch_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ; - < "res/commandimagelist/sch_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ; - < "res/commandimagelist/sch_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ; - < "res/commandimagelist/sch_fontdialog.png" ; SID_CHAR_DLG ; > ; - }; -}; ImageList IMG_CONDFORMAT_DLG_LC { MASKCOLOR; FileList = { - < "res/commandimagelist/lc_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ; - < "res/commandimagelist/lc_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ; - < "res/commandimagelist/lc_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ; - < "res/commandimagelist/lc_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ; - < "res/commandimagelist/lc_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ; - < "res/commandimagelist/lc_fontdialog.png" ; SID_CHAR_DLG ; > ; - }; -}; -ImageList IMG_CONDFORMAT_DLG_LCH -{ - MASKCOLOR; - FileList = - { - < "res/commandimagelist/lch_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ; - < "res/commandimagelist/lch_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ; - < "res/commandimagelist/lch_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ; - < "res/commandimagelist/lch_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ; - < "res/commandimagelist/lch_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ; - < "res/commandimagelist/lch_fontdialog.png" ; SID_CHAR_DLG ; > ; + < "cmd/lc_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ; + < "cmd/lc_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ; + < "cmd/lc_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ; + < "cmd/lc_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ; + < "cmd/lc_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ; + < "cmd/lc_fontdialog.png" ; SID_CHAR_DLG ; > ; }; }; - - ImageList 31000 { MASKCOLOR; @@ -388,20 +350,9 @@ ImageList IMG_ADDFIELD_DLG_SC MASKCOLOR; FileList = { - < "res/commandimagelist/sc_sortup.png" ; SID_FM_SORTUP ; > ; - < "res/commandimagelist/sc_sortdown.png" ; SID_FM_SORTDOWN ; > ; - < "res/commandimagelist/sc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ; - }; -}; - -ImageList IMG_ADDFIELD_DLG_SCH -{ - MASKCOLOR; - FileList = - { - < "res/commandimagelist/sch_sortup.png" ; SID_FM_SORTUP ; > ; - < "res/commandimagelist/sch_sortdown.png" ; SID_FM_SORTDOWN ; > ; - < "res/commandimagelist/sch_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ; + < "cmd/sc_sortup.png" ; SID_FM_SORTUP ; > ; + < "cmd/sc_sortdown.png" ; SID_FM_SORTDOWN ; > ; + < "cmd/sc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ; }; }; @@ -410,20 +361,9 @@ ImageList IMG_ADDFIELD_DLG_LC MASKCOLOR; FileList = { - < "res/commandimagelist/lc_sortup.png" ; SID_FM_SORTUP ; > ; - < "res/commandimagelist/lc_sortdown.png" ; SID_FM_SORTDOWN ; > ; - < "res/commandimagelist/lc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ; - }; -}; - -ImageList IMG_ADDFIELD_DLG_LCH -{ - MASKCOLOR; - FileList = - { - < "res/commandimagelist/lch_sortup.png" ; SID_FM_SORTUP ; > ; - < "res/commandimagelist/lch_sortdown.png" ; SID_FM_SORTDOWN ; > ; - < "res/commandimagelist/lch_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ; + < "cmd/lc_sortup.png" ; SID_FM_SORTUP ; > ; + < "cmd/lc_sortdown.png" ; SID_FM_SORTDOWN ; > ; + < "cmd/lc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ; }; }; diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index ed8b87c8c4ae..2825cba14163 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,7 +106,7 @@ IMPL_LINK( ConditionField, OnFormula, Button*, /*_pClickedButton*/ ) { ReportFormula aFormula( sFormula ); sFormula = aFormula.getCompleteFormula(); - } // if ( nLen ) + } uno::Reference< awt::XWindow> xInspectorWindow = VCLUnoHelper::GetInterface(this); uno::Reference< beans::XPropertySet> xProp(m_pParent->getController().getRowSet(),uno::UNO_QUERY); if ( rptui::openDialogFormula_nothrow( sFormula, m_pParent->getController().getContext(),xInspectorWindow,xProp ) ) @@ -211,7 +212,7 @@ void OColorPopup::SetSlotId(sal_uInt16 _nSlotId) { m_aColorSet.SetStyle( m_aColorSet.GetStyle() | WB_NONEFIELD ); m_aColorSet.SetText( String(ModuleRes( STR_TRANSPARENT )) ); - } // if ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId ) + } } // ----------------------------------------------------------------------------- IMPL_LINK( OColorPopup, SelectHdl, void *, EMPTYARG ) @@ -219,7 +220,7 @@ IMPL_LINK( OColorPopup, SelectHdl, void *, EMPTYARG ) sal_uInt16 nItemId = m_aColorSet.GetSelectItemId(); Color aColor( nItemId == 0 ? Color( COL_TRANSPARENT ) : m_aColorSet.GetItemColor( nItemId ) ); - /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() calls. + /* #i33380# Moved the following line above the Dispatch() calls. This instance may be deleted in the meantime (i.e. when a dialog is opened while in Dispatch()), accessing members will crash in this case. */ m_aColorSet.SetNoSelection(); @@ -258,9 +259,6 @@ Condition::Condition( Window* _pParent, IConditionalFormatAction& _rAction, ::rp ,m_nLastKnownWindowWidth( -1 ) ,m_bInDestruction( false ) { - m_aMoveUp.SetModeImage( ModuleRes( IMG_MOVE_UP_HC ), BMP_COLOR_HIGHCONTRAST ); - m_aMoveDown.SetModeImage( ModuleRes( IMG_MOVE_DOWN_HC ), BMP_COLOR_HIGHCONTRAST ); - FreeResource(); m_aActions.SetStyle(m_aActions.GetStyle()|WB_LINESPACING); m_aCondLHS.GrabFocus(); @@ -345,7 +343,7 @@ IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ ) break; default: break; - } // switch(nId) + } if ( nTextId ) m_pColorFloat->SetText(String(ModuleRes(nTextId))); m_pColorFloat->SetSlotId(nId); @@ -388,16 +386,12 @@ void Condition::ApplyCommand( sal_uInt16 _nCommandId, const ::Color& _rColor) m_rAction.applyCommand( m_nCondIndex, _nCommandId, _rColor ); } //------------------------------------------------------------------------------ -ImageList Condition::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const +ImageList Condition::getImageList(sal_Int16 _eBitmapSet) const { sal_Int16 nN = IMG_CONDFORMAT_DLG_SC; - sal_Int16 nH = IMG_CONDFORMAT_DLG_SCH; if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE ) - { nN = IMG_CONDFORMAT_DLG_LC; - nH = IMG_CONDFORMAT_DLG_LCH; - } - return ImageList(ModuleRes( _bHiContast ? nH : nN )); + return ImageList(ModuleRes(nN)); } //------------------------------------------------------------------ void Condition::resizeControls(const Size& _rDiff) @@ -405,7 +399,6 @@ void Condition::resizeControls(const Size& _rDiff) // we use large images so we must change them if ( _rDiff.Width() || _rDiff.Height() ) { - Point aPos = LogicToPixel( Point( 2*RELATED_CONTROLS , 0), MAP_APPFONT ); Invalidate(); } } @@ -433,7 +426,6 @@ void Condition::StateChanged( StateChangedType nType ) { // The physical toolbar changed its outlook and shows another logical toolbar! // We have to set the correct high contrast mode on the new tbx manager. - // pMgr->SetHiContrast( IsHiContrastMode() ); checkImageList(); } } @@ -738,3 +730,4 @@ bool Condition::isEmpty() const } // rptui // ============================================================================= +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx index 36f0a8ecb697..aa34d461fc46 100644 --- a/reportdesign/source/ui/dlg/Condition.hxx +++ b/reportdesign/source/ui/dlg/Condition.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,10 +113,8 @@ namespace rptui /** will be called when the id of the image list is needed. @param _eBitmapSet <svtools/imgdef.hxx> - @param _bHiContast - <TRUE/> when in high contrast mode. */ - virtual ImageList getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const; + virtual ImageList getImageList(sal_Int16 _eBitmapSet) const; /** will be called when the controls need to be resized. */ @@ -196,3 +195,4 @@ namespace rptui // ============================================================================= #endif // RPTUI_CONDITION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx index e159866aa092..8e8df3f2b4fb 100644 --- a/reportdesign/source/ui/dlg/DateTime.cxx +++ b/reportdesign/source/ui/dlg/DateTime.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,39 +27,21 @@ ************************************************************************/ #include "precompiled_rptui.hxx" #include "DateTime.hxx" -#ifndef RPTUI_DATETIME_HRC #include "DateTime.hrc" -#endif #include <com/sun/star/beans/XPropertySet.hpp> #include <tools/debug.hxx> -#ifndef _RPTUI_DLGRESID_HRC #include "RptResId.hrc" -#endif -#ifndef _RPTUI_SLOTID_HRC_ #include "rptui_slotid.hrc" -#endif -#ifndef _RPTUI_MODULE_HELPER_DBU_HXX_ #include "ModuleHelper.hxx" -#endif -#ifndef RTPUI_REPORTDESIGN_HELPID_HRC #include "helpids.hrc" -#endif #include <vcl/msgbox.hxx> -#ifndef _GLOBLMN_HRC #include <svx/globlmn.hrc> -#endif -#ifndef _SBASLTID_HRC #include <svx/svxids.hrc> -#endif #include <connectivity/dbconversion.hxx> #include <unotools/syslocale.hxx> -#ifndef RPTUI_TOOLS_HXX #include "UITools.hxx" -#endif #include "RptDef.hxx" -#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" -#endif #include "ReportController.hxx" #include <com/sun/star/report/XFormattedField.hpp> #include <com/sun/star/util/Time.hpp> @@ -123,7 +106,7 @@ ODateTimeDialog::ODateTimeDialog( Window* _pParent m_aTimeControlling.enableOnCheckMark( m_aTime, m_aFTTimeFormat, m_aTimeListBox); CheckBox* pCheckBoxes[] = { &m_aDate,&m_aTime}; - for ( size_t i = 0 ; i < sizeof(pCheckBoxes)/sizeof(pCheckBoxes[0]); ++i) + for ( size_t i = 0 ; i < SAL_N_ELEMENTS(pCheckBoxes); ++i) pCheckBoxes[i]->SetClickHdl(LINK(this,ODateTimeDialog,CBClickHdl)); FreeResource(); @@ -258,12 +241,10 @@ sal_Int32 ODateTimeDialog::getFormatKey(sal_Bool _bDate) const sal_Int32 nFormatKey; if ( _bDate ) { - // nFormat = m_aDateF1.IsChecked() ? i18n::NumberFormatIndex::DATE_SYSTEM_LONG : (m_aDateF2.IsChecked() ? i18n::NumberFormatIndex::DATE_SYS_DMMMYYYY : i18n::NumberFormatIndex::DATE_SYSTEM_SHORT); nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_aDateListBox.GetEntryData( m_aDateListBox.GetSelectEntryPos() ))); } else { - // nFormat = m_aTimeF1.IsChecked() ? i18n::NumberFormatIndex::TIME_HHMMSS : (m_aTimeF2.IsChecked() ? i18n::NumberFormatIndex::TIME_HHMMSSAMPM : i18n::NumberFormatIndex::TIME_HHMM); nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_aTimeListBox.GetEntryData( m_aTimeListBox.GetSelectEntryPos() ))); } return nFormatKey; @@ -271,3 +252,5 @@ sal_Int32 ODateTimeDialog::getFormatKey(sal_Bool _bDate) const // ============================================================================= } // rptui // ============================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/DateTime.src b/reportdesign/source/ui/dlg/DateTime.src index 09e557007ab4..e9378da1725c 100644 --- a/reportdesign/source/ui/dlg/DateTime.src +++ b/reportdesign/source/ui/dlg/DateTime.src @@ -76,8 +76,8 @@ ModalDialog RID_DATETIME_DLG { Pos = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS + 2*UNRELATED_CONTROLS + CHECKBOX_HEIGHT + LISTBOX_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , 1 ) ; - // Text [ en-US ] = "Time"; }; + CheckBox CB_TIME { HelpID = "reportdesign:CheckBox:RID_DATETIME_DLG:CB_TIME"; @@ -104,11 +104,13 @@ ModalDialog RID_DATETIME_DLG TabStop = TRUE; Sort = FALSE; }; + FixedLine FL_SEPARATOR1 { Pos = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS + 5*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + 2*LISTBOX_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , 1 ) ; }; + OKButton PB_OK { Pos = MAP_APPFONT ( UNRELATED_CONTROLS, RELATED_CONTROLS + 6*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + 2*LISTBOX_HEIGHT +1) ; @@ -116,12 +118,14 @@ ModalDialog RID_DATETIME_DLG TabStop = TRUE ; DefButton = TRUE ; }; + CancelButton PB_CANCEL { Pos = MAP_APPFONT ( RELATED_CONTROLS + UNRELATED_CONTROLS + BUTTON_WIDTH , RELATED_CONTROLS + 6*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + 2*LISTBOX_HEIGHT +1) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; TabStop = TRUE ; }; + HelpButton PB_HELP { TabStop = TRUE ; diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index 7d73faab4cdf..77b6e2e4ca86 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -217,7 +218,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton) } m_pAddField->Update(); - } // if ( !m_pAddField ) + } RefInputStartAfter( aPair.second, aPair.first ); m_pAddField->Show(); @@ -239,7 +240,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg) sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("[")) + sName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]")); m_pEdit->SetText(sName); } - } // if ( m_pEdit && aArgs.getLength() ) + } m_pEdit = NULL; _pAddFieldDlg->Hide(); RefInputDoneAfter( sal_True ); @@ -271,3 +272,5 @@ table::CellAddress FormulaDialog::getReferencePosition() const // ============================================================================= } // rptui // ============================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/GroupExchange.cxx b/reportdesign/source/ui/dlg/GroupExchange.cxx index 8519a378ebb9..0aaf04bc4811 100644 --- a/reportdesign/source/ui/dlg/GroupExchange.cxx +++ b/reportdesign/source/ui/dlg/GroupExchange.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,3 +75,5 @@ namespace rptui } // ----------------------------------------------------------------------------- } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/GroupExchange.hxx b/reportdesign/source/ui/dlg/GroupExchange.hxx index 7c8afeedeb03..f46304d897ba 100644 --- a/reportdesign/source/ui/dlg/GroupExchange.hxx +++ b/reportdesign/source/ui/dlg/GroupExchange.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,3 +52,4 @@ namespace rptui } #endif // RPTUI_GROUP_EXCHANGE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 5353b462cdaf..917f4c9732df 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,6 +35,7 @@ #include <com/sun/star/report/GroupOn.hpp> #include <com/sun/star/sdbc/DataType.hpp> +#include <sal/macros.h> #include <tools/debug.hxx> #include "RptResId.hrc" #include "rptui_slotid.hrc" @@ -106,7 +108,6 @@ class OFieldExpressionControl : public TContainerListenerBase OGroupsSortingDialog* m_pParent; bool m_bIgnoreEvent; - void fillListBox(const uno::Reference< beans::XPropertySet>& _xDest,long nRow,sal_uInt16 nColumnId); sal_Bool SaveModified(bool _bAppend); @@ -135,7 +136,6 @@ public: inline ::svt::ComboBoxControl* getExpressionControl() const { return m_pComboCell; } - /** returns the sequence with the selected groups */ uno::Sequence<uno::Any> fillSelectedGroups(); @@ -149,7 +149,6 @@ public: protected: virtual sal_Bool IsTabAllowed(sal_Bool bForward) const; - virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ); virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ); virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const; @@ -244,12 +243,12 @@ uno::Sequence<uno::Any> OFieldExpressionControl::fillSelectedGroups() } catch(uno::Exception&) { - OSL_ENSURE(0,"Can not access group!"); + OSL_FAIL("Can not access group!"); } } if ( !vClipboardList.empty() ) aList = uno::Sequence< uno::Any >(&vClipboardList[0], vClipboardList.size()); - } // if ( nCount > 1 ) + } return aList; } //------------------------------------------------------------------------------ @@ -265,7 +264,7 @@ void OFieldExpressionControl::StartDrag( sal_Int8 /*_nAction*/ , const Point& /* OGroupExchange* pData = new OGroupExchange(aClipboardList); uno::Reference< ::com::sun::star::datatransfer::XTransferable> xRef = pData; pData->StartDrag(this, DND_ACTION_MOVE ); - } // if(!vClipboardList.empty()) + } } } //------------------------------------------------------------------------------ @@ -342,11 +341,11 @@ void OFieldExpressionControl::moveGroups(const uno::Sequence<uno::Any>& _aGroups m_pParent->m_pController->executeChecked(SID_GROUP_APPEND,aArgs); ++nRow; } - } // for(;pIter != pEnd;++pIter) + } } m_bIgnoreEvent = false; Invalidate(); - } // if ( _aGroups.getLength() ) + } } // ----------------------------------------------------------------------------- void OFieldExpressionControl::fillColumns(const uno::Reference< container::XNameAccess>& _xColumns) @@ -384,7 +383,7 @@ void OFieldExpressionControl::lateInit() m_pComboCell->SetHelpId(HID_RPT_FIELDEXPRESSION); Control* pControls[] = {m_pComboCell}; - for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) { pControls[i]->SetGetFocusHdl(LINK(m_pParent, OGroupsSortingDialog, OnControlFocusGot)); pControls[i]->SetLoseFocusHdl(LINK(m_pParent, OGroupsSortingDialog, OnControlFocusLost)); @@ -515,7 +514,7 @@ sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow) } catch(uno::Exception&) { - OSL_ENSURE(0,"OFieldExpressionControl::SaveModified: Exception caught!"); + OSL_FAIL("OFieldExpressionControl::SaveModified: Exception caught!"); } } @@ -546,9 +545,9 @@ String OFieldExpressionControl::GetCellText( long nRow, sal_uInt16 /*nColId*/ ) } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception caught while getting expression value from the group"); + OSL_FAIL("Exception caught while getting expression value from the group"); } - } // if ( nRow != BROWSER_ENDOFSELECTION && nRow < m_pParent->getGroups()->getCount() ) + } return sText; } @@ -627,7 +626,7 @@ EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(long nRow) const } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception cathced while try to get a group!"); + OSL_FAIL("Exception cathced while try to get a group!"); } } return EditBrowseBox::CLEAN; @@ -644,7 +643,7 @@ void SAL_CALL OFieldExpressionControl::elementInserted(const container::Containe { if ( m_bIgnoreEvent ) return; - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); sal_Int32 nGroupPos = 0; if ( evt.Accessor >>= nGroupPos ) @@ -674,13 +673,6 @@ void SAL_CALL OFieldExpressionControl::elementInserted(const container::Containe for(++aFind;aFind != aEnd;++aFind) if ( *aFind != NO_GROUP ) ++*aFind; - - //::std::vector<sal_Int32>::reverse_iterator aRIter = m_aGroupPositions.rbegin(); - //::std::vector<sal_Int32>::reverse_iterator aREnd = m_aGroupPositions.rend(); - //for (; aRIter != aREnd && *aRIter != NO_GROUP; ++aRIter) - // continue; - //if ( aRIter != aREnd ) - // m_aGroupPositions.erase(m_aGroupPositions.begin() + (m_aGroupPositions.size() - 1 - (aRIter - m_aGroupPositions.rbegin()))); } } Invalidate(); @@ -693,7 +685,7 @@ void SAL_CALL OFieldExpressionControl::elementReplaced(const container::Containe //------------------------------------------------------------------------------ void SAL_CALL OFieldExpressionControl::elementRemoved(const container::ContainerEvent& evt) throw(uno::RuntimeException) { - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bIgnoreEvent ) @@ -710,7 +702,6 @@ void SAL_CALL OFieldExpressionControl::elementRemoved(const container::Container for(++aFind;aFind != aEnd;++aFind) if ( *aFind != NO_GROUP ) --*aFind; - //PaintCell(*this,GetFieldRect(FIELD_EXPRESSION),FIELD_EXPRESSION); Invalidate(); } } @@ -752,7 +743,6 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt) if ( nColId == HANDLE_ID ) { - //long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y()); PopupMenu aContextMenu(ModuleRes(RID_GROUPSROWPOPUPMENU)); sal_Bool bEnable = sal_False; long nIndex = FirstSelectedRow(); @@ -762,10 +752,6 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt) bEnable = sal_True; nIndex = NextSelectedRow(); } - //aContextMenu.EnableItem( SID_CUT, IsDeleteAllowed() && bEnable); - //aContextMenu.EnableItem( SID_COPY, bEnable); - //TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); - //aContextMenu.EnableItem( SID_PASTE, aTransferData.HasFormat(SOT_FORMATSTR_ID_RPT_GRPED) ); aContextMenu.EnableItem( SID_DELETE, IsDeleteAllowed() && bEnable ); switch (aContextMenu.Execute(this, rEvt.GetMousePosPixel())) { @@ -787,7 +773,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt) default: break; } - } // if ( nColId == HANDLE_ID ) + } // run through } default: @@ -841,7 +827,7 @@ void OFieldExpressionControl::DeleteRows() --*aFind; } nIndex = NextSelectedRow(); - } // while( nIndex >= 0 ) + } if ( !bFirstTime ) m_pParent->m_pController->getUndoManager().LeaveListAction(); @@ -983,11 +969,6 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent ,OPropertyChangeListener(m_aMutex) ,m_aFL2(this, ModuleRes(FL_SEPARATOR2) ) ,m_aMove(this, ModuleRes(FT_MOVELABEL) ) -/* - ,m_aPB_Up(this, ModuleRes(PB_UP) ) - ,m_aPB_Down(this, ModuleRes(PB_DOWN) ) - ,m_aPB_Delete(this, ModuleRes(PB_DELETE) ) -*/ ,m_aToolBox(this, ModuleRes(TB_TOOLBOX) ) ,m_aFL3(this, ModuleRes(FL_SEPARATOR3) ) @@ -1013,26 +994,25 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent { DBG_CTOR( rpt_OGroupsSortingDialog,NULL); - Control* pControlsLst[] = { &m_aHeaderLst, &m_aFooterLst, &m_aGroupOnLst, &m_aKeepTogetherLst, &m_aOrderLst, &m_aGroupIntervalEd}; - for (size_t i = 0; i < sizeof(pControlsLst)/sizeof(pControlsLst[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControlsLst); ++i) { pControlsLst[i]->SetGetFocusHdl(LINK(this, OGroupsSortingDialog, OnControlFocusGot)); pControlsLst[i]->SetLoseFocusHdl(LINK(this, OGroupsSortingDialog, OnControlFocusLost)); pControlsLst[i]->Show(sal_True); - } // for (int i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + } - for (size_t i = 0; i < (sizeof(pControlsLst)/sizeof(pControlsLst[0]))-1; ++i) + for (size_t i = 0; i < (SAL_N_ELEMENTS(pControlsLst))-1; ++i) static_cast<ListBox*>(pControlsLst[i])->SetSelectHdl(LINK(this,OGroupsSortingDialog,LBChangeHdl)); Control* pControls[] = { &m_aHeader, &m_aFooter, &m_aGroupOn, &m_aGroupInterval, &m_aKeepTogether, &m_aOrder , &m_aMove,&m_aFL2}; sal_Int32 nMaxTextWidth = 0; MnemonicGenerator aMnemonicGenerator; - for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) aMnemonicGenerator.RegisterMnemonic( pControls[i]->GetText() ); - for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) { pControls[i]->Show(sal_True); String sText = pControls[i]->GetText(); @@ -1047,7 +1027,6 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent Size aOutSize(nMaxTextWidth + m_aHeader.GetSizePixel().Width() + 3*aSpace.Width(),aSpace.Height()); SetMinOutputSizePixel(aOutSize); SetOutputSizePixel(aOutSize); -// Resize(); m_pReportListener = new OPropertyChangeMultiplexer(this,m_pController->getReportDefinition().get()); m_pReportListener->addProperty(PROPERTY_COMMAND); @@ -1057,20 +1036,11 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent fillColumns(); m_pFieldExpression->Show(); - //m_aHelpWindow.SetReadOnly(); m_aHelpWindow.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() ); - //BTN m_aPB_Up.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl)); - //BTN m_aPB_Down.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl)); - //BTN m_aPB_Delete.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl)); m_pFieldExpression->SetZOrder(&m_aFL2, WINDOW_ZORDER_BEHIND); m_aMove.SetZOrder(m_pFieldExpression, WINDOW_ZORDER_BEHIND); - //BTN m_aPB_Up.SetZOrder(&m_aMove, WINDOW_ZORDER_BEHIND); - //BTN m_aPB_Down.SetZOrder(&m_aPB_Up, WINDOW_ZORDER_BEHIND); - // set Hi contrast bitmaps - //BTN m_aPB_Up.SetModeImage( ModuleRes(IMG_UP_H),BMP_COLOR_HIGHCONTRAST); - //BTN m_aPB_Down.SetModeImage( ModuleRes(IMG_DOWN_H),BMP_COLOR_HIGHCONTRAST); m_aToolBox.SetStyle(m_aToolBox.GetStyle()|WB_LINESPACING); m_aToolBox.SetSelectHdl(LINK(this, OGroupsSortingDialog, OnFormatAction)); m_aToolBox.SetImageListProvider(this); @@ -1172,7 +1142,7 @@ void OGroupsSortingDialog::SaveData( sal_Int32 _nRow) xGroup->setSortAscending( m_aOrderLst.GetSelectEntryPos() == 0 ); ListBox* pControls[] = { &m_aHeaderLst,&m_aFooterLst,&m_aGroupOnLst,&m_aKeepTogetherLst,&m_aOrderLst}; - for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) pControls[i]->SaveValue(); } @@ -1193,7 +1163,7 @@ sal_Int32 OGroupsSortingDialog::getColumnDataType(const ::rtl::OUString& _sColum } catch(uno::Exception&) { - OSL_ENSURE(0,"Eception caught while getting the type of a column"); + OSL_FAIL("Eception caught while getting the type of a column"); } return nDataType; @@ -1204,7 +1174,7 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusGot, Control*, pControl ) if ( m_pFieldExpression && m_pFieldExpression->getExpressionControl() ) { Control* pControls[] = { m_pFieldExpression->getExpressionControl(),&m_aHeaderLst,&m_aFooterLst,&m_aGroupOnLst,&m_aGroupIntervalEd,&m_aKeepTogetherLst,&m_aOrderLst}; - for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) { if ( pControl == pControls[i] ) { @@ -1233,7 +1203,6 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusLost, Control*, pControl ) } // ----------------------------------------------------------------------------- IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ ) -// IMPL_LINK( OGroupsSortingDialog, ClickHdl, ImageButton*, _pButton ) { DBG_CHKTHIS( rpt_OGroupsSortingDialog,NULL); @@ -1249,22 +1218,17 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ ) aClipboardList.realloc(1); aClipboardList[0] = m_xGroups->getByIndex(nGroupPos); } - //BTN if ( _pButton == &m_aPB_Up ) if ( nCommand == SID_RPT_GROUPSORT_MOVE_UP ) { --nIndex; } - //BTN if ( _pButton == &m_aPB_Down ) if ( nCommand == SID_RPT_GROUPSORT_MOVE_DOWN ) { ++nIndex; } - //BTN if ( _pButton == &m_aPB_Delete ) if ( nCommand == SID_RPT_GROUPSORT_DELETE ) { - // m_pFieldExpression->DeleteCurrentRow(); Application::PostUserEvent( LINK(m_pFieldExpression, OFieldExpressionControl, DelayedDelete) ); - // UpdateData( ); } else { @@ -1274,7 +1238,6 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ ) m_pFieldExpression->moveGroups(aClipboardList,nIndex,sal_False); m_pFieldExpression->DeactivateCell(); m_pFieldExpression->GoToRow(nIndex); - //long nCurRow = m_pFieldExpression->GetCurRow(); m_pFieldExpression->ActivateCell(nIndex, m_pFieldExpression->GetCurColumnId()); DisplayData(nIndex); } @@ -1363,7 +1326,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x case sdbc::DataType::TIMESTAMP: { sal_uInt16 nIds[] = { STR_RPT_YEAR, STR_RPT_QUARTER,STR_RPT_MONTH,STR_RPT_WEEK,STR_RPT_DAY,STR_RPT_HOUR,STR_RPT_MINUTE }; - for (sal_uInt16 i = 0; i < sizeof(nIds)/sizeof(nIds[0]); ++i) + for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS(nIds); ++i) { m_aGroupOnLst.InsertEntry(String(ModuleRes(nIds[i]))); m_aGroupOnLst.SetEntryData(i+1,reinterpret_cast<void*>(i+2)); @@ -1374,7 +1337,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x m_aGroupOnLst.InsertEntry(String(ModuleRes(STR_RPT_INTERVAL))); m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::INTERVAL)); break; - } // switch(nDataType) + } sal_uInt16 nPos = 0; switch(_xGroup->getGroupOn()) { @@ -1419,12 +1382,12 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x m_aOrderLst.SelectEntryPos(_xGroup->getSortAscending() ? 0 : 1); ListBox* pControls[] = { &m_aHeaderLst,&m_aFooterLst,&m_aGroupOnLst,&m_aKeepTogetherLst,&m_aOrderLst}; - for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) pControls[i]->SaveValue(); ListBox* pControlsLst2[] = { &m_aHeaderLst, &m_aFooterLst, &m_aGroupOnLst, &m_aKeepTogetherLst,&m_aOrderLst}; sal_Bool bReadOnly = !m_pController->isEditable(); - for (size_t i = 0; i < sizeof(pControlsLst2)/sizeof(pControlsLst2[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControlsLst2); ++i) pControlsLst2[i]->SetReadOnly(bReadOnly); m_aGroupIntervalEd.SetReadOnly(bReadOnly); } @@ -1439,13 +1402,12 @@ void OGroupsSortingDialog::Resize() Control* pControlsLst[] = { &m_aHeaderLst, &m_aFooterLst, &m_aGroupOnLst, &m_aGroupIntervalEd,&m_aKeepTogetherLst,&m_aOrderLst}; Control* pControls[] = { &m_aHeader, &m_aFooter, &m_aGroupOn, &m_aGroupInterval, &m_aKeepTogether, &m_aOrder}; sal_Int32 nMaxTextWidth = 0; - for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) { nMaxTextWidth = ::std::max<sal_Int32>(static_cast<sal_Int32>(GetTextWidth(pControls[i]->GetText())),nMaxTextWidth); - } // for (int i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + } - // aTotalOutputSize.Width() - m_aHeaderLst.GetSizePixel().Width() - 3*aSpace.Width() - for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i) { pControls[i]->SetSizePixel(Size(nMaxTextWidth,pControls[i]->GetSizePixel().Height())); Point aPos = pControls[i]->GetPosPixel(); @@ -1453,20 +1415,11 @@ void OGroupsSortingDialog::Resize() aPos.Y() = pControlsLst[i]->GetPosPixel().Y(); pControlsLst[i]->SetPosSizePixel(aPos,Size(aTotalOutputSize.Width() - aPos.X() - aSpace.Width(),pControlsLst[i]->GetSizePixel().Height())); - } // for (int i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i) + } m_aFL.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL.GetSizePixel().Height())); m_aFL2.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL2.GetSizePixel().Height())); m_aFL3.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL3.GetSizePixel().Height())); - -//BTN sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aPB_Up.GetSizePixel().Width(); -//BTN m_aPB_Delete.SetPosPixel(Point(nPos,m_aPB_Delete.GetPosPixel().Y())); -//BTN -//BTN nPos -= (m_aPB_Up.GetSizePixel().Width() + LogicToPixel( Size( UNRELATED_CONTROLS, 0 ), MAP_APPFONT ).Width()); -//BTN m_aPB_Down.SetPosPixel(Point(nPos,m_aPB_Down.GetPosPixel().Y())); -//BTN -//BTN nPos -= (m_aPB_Up.GetSizePixel().Width() + LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ).Width()); -//BTN m_aPB_Up.SetPosPixel(Point(nPos,m_aPB_Up.GetPosPixel().Y())); sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aToolBox.GetSizePixel().Width(); m_aToolBox.SetPosPixel(Point(nPos,m_aToolBox.GetPosPixel().Y())); @@ -1480,7 +1433,7 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow) sal_Int32 nRowCount = m_pFieldExpression->GetRowCount(); sal_Bool bEnabled = nGroupCount > 1; - if (bEnabled && _nRow > 0 /* && _nRow < nGroupCount */ ) + if (bEnabled && _nRow > 0 ) { m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_UP, sal_True); } @@ -1488,7 +1441,7 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow) { m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_UP, sal_False); } - if (bEnabled && _nRow < (nRowCount - 1) /* && _nRow < (nGroupCount - 1) */ ) + if (bEnabled && _nRow < (nRowCount - 1) ) { m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, sal_True); } @@ -1496,34 +1449,25 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow) { m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, sal_False); } - //BTN m_aPB_Up.Enable(bEnable && _nRow > 0 ); - //BTN m_aPB_Down.Enable(bEnable && _nRow < (m_pFieldExpression->GetRowCount()-1) ); - // m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, bEnable && _nRow < (-1) ); sal_Int32 nGroupPos = m_pFieldExpression->getGroupPosition(_nRow); if ( nGroupPos != NO_GROUP ) { sal_Bool bEnableDelete = nGroupCount > 0; - //BTN m_aPB_Delete.Enable(bEnableDelete ); m_aToolBox.EnableItem(SID_RPT_GROUPSORT_DELETE, bEnableDelete); } else { - //BTN m_aPB_Delete.Enable( sal_False ); m_aToolBox.EnableItem(SID_RPT_GROUPSORT_DELETE, sal_False); } } -ImageList OGroupsSortingDialog::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const +ImageList OGroupsSortingDialog::getImageList(sal_Int16 _eBitmapSet) const { sal_Int16 nN = IMG_CONDFORMAT_DLG_SC; - sal_Int16 nH = IMG_CONDFORMAT_DLG_SCH; if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE ) - { nN = IMG_CONDFORMAT_DLG_LC; - nH = IMG_CONDFORMAT_DLG_LCH; - } - return ImageList(ModuleRes( _bHiContast ? nH : nN )); + return ImageList(ModuleRes( nN )); } //------------------------------------------------------------------ @@ -1532,31 +1476,19 @@ void OGroupsSortingDialog::resizeControls(const Size& _rDiff) // we use large images so we must change them if ( _rDiff.Width() || _rDiff.Height() ) { - Point aPos = LogicToPixel( Point( 2*RELATED_CONTROLS , 0), MAP_APPFONT ); Invalidate(); } } //------------------------------------------------------------------ // load the images -ImageList OGroupsSortingDialog::getImageList(vcl::ImageListType _eType) SAL_THROW (( com::sun::star::lang::IllegalArgumentException )) +ImageList OGroupsSortingDialog::getImageList(vcl::ImageListType) SAL_THROW (( com::sun::star::lang::IllegalArgumentException )) { - if (_eType == vcl::HIGHCONTRAST_NO) - { - return ImageList(ModuleRes(IMGLST_GROUPSORT_DLG_SC)); - } - else if (_eType == vcl::HIGHCONTRAST_YES) - { - return ImageList(ModuleRes(IMGLST_GROUPSORT_DLG_SCH)); - } - else - { - throw com::sun::star::lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("High contrast parameter is wrong.")), NULL, 0); - } + return ImageList(ModuleRes(IMGLST_GROUPSORT_DLG_SC)); } - - // ============================================================================= } // rptui // ============================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/GroupsSorting.hrc b/reportdesign/source/ui/dlg/GroupsSorting.hrc index 8dfbfd3224a4..049afa79d37b 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.hrc +++ b/reportdesign/source/ui/dlg/GroupsSorting.hrc @@ -50,18 +50,8 @@ #define PB_DOWN (21) #define FL_SEPARATOR2 (22) #define FL_SEPARATOR3 (23) -//BTN #define IMG_UP_H (24) -//BTN #define IMG_DOWN_H (25) -//BTN #define PB_DELETE (26) #define TB_TOOLBOX (27) -// #define IMG_GROUPSORT_MOVE_DOWN (28) -// #define IMG_GROUPSORT_MOVE_UP (29) -// #define IMG_GROUPSORT_DELETE (30) -// #define IMG_GROUPSORT_MOVE_DOWN_H (31) -// #define IMG_GROUPSORT_MOVE_UP_H (32) -// #define IMG_GROUPSORT_DELETE_H (33) - #define CHECKBOX_HEIGHT 8 #define FIXEDTEXT_HEIGHT 8 diff --git a/reportdesign/source/ui/dlg/GroupsSorting.src b/reportdesign/source/ui/dlg/GroupsSorting.src index 186fb771ad46..d8f80f45aaf1 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.src +++ b/reportdesign/source/ui/dlg/GroupsSorting.src @@ -66,86 +66,36 @@ FloatingWindow RID_GROUPS_SORTING { Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 3*UNRELATED_CONTROLS + BROWSER_HEIGHT ) ; Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ; -// Text [ en-US ] = "Move group" ; Text [ en-US ] = "Group actions" ; }; -// /* -// | PAGE_WIDTH | -// | /-----\ {-------\ /---------\ | -// | unreleated FT_MOVELABEL |PB_UP| unreleated |PB_DOWN| unreleated |PD_DELETE| unreleated | -// | \_____/ \_______/ \_________/ | -// -// Don't set any position here, it will be done in OGroupsSortingDialog::Resize() -// -// Find possible IMAGEBUTTON_* in rscicpx.cxx -// Symbol is vclrsc.hxx -// */ -// ImageButton PB_UP -// { -// Pos = MAP_APPFONT ( PAGE_WIDTH - 3*UNRELATED_CONTROLS - 3*14 - 2*RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT -1 ) ; -// Size = MAP_APPFONT ( 14 , 14 ) ; -// TabStop = TRUE; -// // Symbol = IMAGEBUTTON_ARROW_UP ; // arrow up -// Symbol = IMAGEBUTTON_SPIN_UP ; // triangle up -// // Symbol = IMAGEBUTTON_FLOAT; -// }; -// -// ImageButton PB_DOWN -// { -// Pos = MAP_APPFONT ( PAGE_WIDTH - 2*UNRELATED_CONTROLS - 2*14 - 2*RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ; -// Size = MAP_APPFONT ( 14 , 14 ) ; -// TabStop = TRUE; -// // Symbol = IMAGEBUTTON_ARROW_DOWN ; // arrow down -// // Symbol = IMAGEBUTTON_FIRST ; -// Symbol = IMAGEBUTTON_SPIN_DOWN; -// -// }; -// -// ImageButton PB_DELETE -// { -// Pos = MAP_APPFONT ( PAGE_WIDTH - UNRELATED_CONTROLS - 14, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ; -// Size = MAP_APPFONT ( 14 , 14 ) ; -// TabStop = TRUE; -// Symbol = IMAGEBUTTON_CLOSE ; -// }; - - ToolBox TB_TOOLBOX { Pos = MAP_APPFONT ( PAGE_WIDTH - 4*14 - UNRELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ; ButtonType = BUTTON_SYMBOL; -// Align = BOXALIGN_TOP; -// HelpId = HID_RPT_CONDFORMAT_TB; Customize = FALSE; ItemList = { ToolBoxItem { Identifier = SID_RPT_GROUPSORT_MOVE_UP ; - // Command = ".uno:ReportGroupMoveUp" ; // default_images/res/commandimages/sc_reportgroupmoveup.png HelpID = HID_RPT_GROUPSORT_MOVE_UP ; Text [ en-US ] = "Move up" ; Checkable = TRUE; -// Disable = TRUE; }; ToolBoxItem { Identifier = SID_RPT_GROUPSORT_MOVE_DOWN ; - // Command = ".uno:ReportGroupMoveDown" ; HelpID = HID_RPT_GROUPSORT_MOVE_DOWN ; Text [ en-US ] = "Move down" ; Checkable = TRUE; -// Disable = TRUE; }; ToolBoxItem { Identifier = SID_RPT_GROUPSORT_DELETE ; - // Command = ".uno:ReportGroupDelete" ; HelpID = HID_RPT_GROUPSORT_DELETE ; Text [ en-US ] = "~Delete" ; Checkable = TRUE; -// Disable = TRUE; }; }; }; @@ -164,6 +114,7 @@ FloatingWindow RID_GROUPS_SORTING Hide = TRUE; Text [ en-US ] = "Sorting" ; }; + ListBox LST_ORDER { HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_ORDER"; @@ -181,6 +132,7 @@ FloatingWindow RID_GROUPS_SORTING }; }; + FixedText FT_HEADER { Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 5*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 2*FIXEDTEXT_HEIGHT) ; @@ -189,6 +141,7 @@ FloatingWindow RID_GROUPS_SORTING Text [ en-US ] = "Group Header" ; }; + ListBox LST_HEADERLST { HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_HEADERLST"; @@ -205,6 +158,7 @@ FloatingWindow RID_GROUPS_SORTING < "Not present" ; Default ; > ; }; }; + FixedText FT_FOOTER { Pos = MAP_APPFONT ( UNRELATED_CONTROLS, 6*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 3*FIXEDTEXT_HEIGHT) ; @@ -213,6 +167,7 @@ FloatingWindow RID_GROUPS_SORTING Text [ en-US ] = "Group Footer" ; }; + ListBox LST_FOOTERLST { HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_FOOTERLST"; @@ -229,6 +184,7 @@ FloatingWindow RID_GROUPS_SORTING < "Not present" ; Default ; > ; }; }; + FixedText FT_GROUPON { Pos = MAP_APPFONT ( UNRELATED_CONTROLS, 7*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 4*FIXEDTEXT_HEIGHT) ; @@ -237,6 +193,7 @@ FloatingWindow RID_GROUPS_SORTING Text [ en-US ] = "Group On" ; }; + ListBox LST_GROUPONLST { HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_GROUPONLST"; @@ -252,6 +209,7 @@ FloatingWindow RID_GROUPS_SORTING < "Each Value" ; Default ; > ; }; }; + FixedText FT_GROUPINTERVAL { Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 8*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 5*FIXEDTEXT_HEIGHT) ; @@ -259,6 +217,7 @@ FloatingWindow RID_GROUPS_SORTING Hide = TRUE; Text [ en-US ] = "Group Interval" ; }; + NumericField ED_GROUPINTERVALLST { HelpID = "reportdesign:NumericField:RID_GROUPS_SORTING:ED_GROUPINTERVALLST"; @@ -308,58 +267,58 @@ FloatingWindow RID_GROUPS_SORTING WordBreak = TRUE; }; -//BTN Image IMG_UP_H -//BTN { -//BTN ImageBitmap = Bitmap { File = "arrow_move_up_hc" ; }; -//BTN }; -//BTN Image IMG_DOWN_H -//BTN { -//BTN ImageBitmap = Bitmap { File = "arrow_move_down_hc" ; }; -//BTN }; - - }; String STR_RPT_EXPRESSION { Text [ en-US ] = "Field/Expression" ; }; + String STR_RPT_SORTING { Text [ en-US ] = "Sort Order" ; }; + String STR_RPT_PREFIXCHARS { Text [ en-US ] = "Prefix Characters" ; }; + String STR_RPT_YEAR { Text [ en-US ] = "Year" ; }; + String STR_RPT_QUARTER { Text [ en-US ] = "Quarter" ; }; + String STR_RPT_MONTH { Text [ en-US ] = "Month" ; }; + String STR_RPT_WEEK { Text [ en-US ] = "Week" ; }; + String STR_RPT_DAY { Text [ en-US ] = "Day" ; }; + String STR_RPT_HOUR { Text [ en-US ] = "Hour" ; }; + String STR_RPT_MINUTE { Text [ en-US ] = "Minute" ; }; + String STR_RPT_INTERVAL { Text [ en-US ] = "Interval" ; @@ -379,42 +338,31 @@ String STR_RPT_HELP_FOOTER { Text [ en-US ] = "Display a footer for this group?" ; }; + String STR_RPT_HELP_GROUPON { Text [ en-US ] = "Select the value or range of values that starts a new group." ; }; + String STR_RPT_HELP_INTERVAL { Text [ en-US ] = "Interval or number of characters to group on." ; }; + String STR_RPT_HELP_KEEP { Text [ en-US ] = "Keep group together on one page?" ; }; + String STR_RPT_HELP_SORT { Text [ en-US ] = "Select ascending or descending sort order. Ascending means from A to Z or 0 to 9" ; }; - Menu RID_GROUPSROWPOPUPMENU { ItemList = { -/* - MenuItem - { - ITEM_EDIT_CUT - }; - MenuItem - { - ITEM_EDIT_COPY - }; - MenuItem - { - ITEM_EDIT_PASTE - }; -*/ MenuItem { ITEM_EDIT_DELETE @@ -442,61 +390,3 @@ ImageList IMGLST_GROUPSORT_DLG_SC prefix = "sc"; DEF_IL_GROUPSORT ; }; - -ImageList IMGLST_GROUPSORT_DLG_SCH -{ - DEF_MASKCOLOR; - prefix = "sch"; - DEF_IL_GROUPSORT ; -}; - - -// Image IMG_GROUPSORT_MOVEUP -// { -// ImageBitmap = Bitmap -// { -// File = "reportgroupmoveup"; // reportdesign/res/... -// }; -// DEF_MASKCOLOR; -// }; -// Image IMG_GROUPSORT_MOVEDOWN -// { -// ImageBitmap = Bitmap -// { -// File = "reportgroupmovedown"; -// }; -// DEF_MASKCOLOR; -// }; -// Image IMG_GROUPSORT_DELETE -// { -// ImageBitmap = Bitmap -// { -// File = "reportgroupdelete"; -// }; -// DEF_MASKCOLOR; -// }; -// -// Image IMG_GROUPSORT_MOVEUP_H -// { -// ImageBitmap = Bitmap -// { -// File = "reportgroupmoveup_h"; // reportdesign/res/... -// }; -// DEF_MASKCOLOR; -// }; -// Image IMG_GROUPSORT_MOVEDOWN_H -// { -// ImageBitmap = Bitmap -// { -// File = "reportgroupmovedown_h"; -// }; -// DEF_MASKCOLOR; -// }; -// Image IMG_GROUPSORT_DELETE_H -// { -// ImageBitmap = Bitmap -// { -// File = "reportgroupdelete_h"; -// }; -// DEF_MASKCOLOR; -// }; diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index f2400ec0ac99..4209e456621d 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -153,7 +154,6 @@ class NavigatorTree : public ::cppu::BaseMutex AutoTimer m_aDropActionTimer; Timer m_aSynchronizeTimer; ImageList m_aNavigatorImages; - ImageList m_aNavigatorImagesHC; Point m_aTimerTriggered; // die Position, an der der DropTimer angeschaltet wurde DROP_ACTION m_aDropActionType; OReportController& m_rController; @@ -243,17 +243,10 @@ NavigatorTree::NavigatorTree( Window* pParent,OReportController& _rController ) SetHelpId( HID_REPORT_NAVIGATOR_TREE ); m_aNavigatorImages = ImageList( ModuleRes( RID_SVXIMGLIST_RPTEXPL ) ); - m_aNavigatorImagesHC = ImageList( ModuleRes( RID_SVXIMGLIST_RPTEXPL_HC ) ); SetNodeBitmaps( m_aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ), - m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ), - BMP_COLOR_NORMAL - ); - SetNodeBitmaps( - m_aNavigatorImagesHC.GetImage( RID_SVXIMG_COLLAPSEDNODE ), - m_aNavigatorImagesHC.GetImage( RID_SVXIMG_EXPANDEDNODE ), - BMP_COLOR_HIGHCONTRAST + m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ) ); SetDragDropMode(0xFFFF); @@ -334,7 +327,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt ) else aContextMenu.EnableItem(nId,bEnabled); } - } // for (sal_uInt16 i = 0; i < nCount; ++i) + } sal_uInt16 nId = aContextMenu.Execute(this, aWhere); if ( nId ) { @@ -418,7 +411,6 @@ sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& _rEvt ) // ------------------------------------------------------------------------- sal_Int8 NavigatorTree::ExecuteDrop( const ExecuteDropEvent& /*_rEvt*/ ) { - // _rEvt.mnAction; return DND_ACTION_NONE; } // ------------------------------------------------------------------------- @@ -527,12 +519,6 @@ SvLBoxEntry* NavigatorTree::insertEntry(const ::rtl::OUString& _sName,SvLBoxEntr { const Image aImage( m_aNavigatorImages.GetImage( _nImageId ) ); pEntry = InsertEntry(_sName,aImage,aImage,_pParent,sal_False,_nPosition,_pData); - if ( pEntry ) - { - const Image aImageHC( m_aNavigatorImagesHC.GetImage( _nImageId ) ); - SetExpandedEntryBmp( pEntry, aImageHC, BMP_COLOR_HIGHCONTRAST ); - SetCollapsedEntryBmp( pEntry, aImageHC, BMP_COLOR_HIGHCONTRAST ); - } } else pEntry = InsertEntry(_sName,_pParent,sal_False,_nPosition,_pData); @@ -851,8 +837,6 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent& ++nPos; m_pTree->traverseSection(pMemFunSection(&aGroupHelper),pEntry,bFooterOn ? SID_GROUPFOOTER : SID_GROUPHEADER,nPos); } - //else - // m_pTree->removeEntry(m_pTree->GetEntry(pEntry,nPos)); } else if ( PROPERTY_EXPRESSION == _rEvent.PropertyName) { @@ -936,10 +920,6 @@ ONavigator::ONavigator( Window* _pParent m_pImpl.reset(new ONavigatorImpl(_rController,this)); - //Size aSpace = LogicToPixel( Size( 7, 120), MAP_APPFONT ); - //Size aOutSize(nMaxTextWidth + m_aHeader.GetSizePixel().Width() + 3*aSpace.Width(),aSpace.Height()); - //SetMinOutputSizePixel(aOutSize); - //SetOutputSizePixel(aOutSize); FreeResource(); m_pImpl->m_pNavigatorTree->Show(); m_pImpl->m_pNavigatorTree->GrabFocus(); @@ -984,3 +964,4 @@ void ONavigator::GetFocus() } // rptui // ============================================================================= +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/Navigator.src b/reportdesign/source/ui/dlg/Navigator.src index b9e639dfe646..150c98d88343 100644 --- a/reportdesign/source/ui/dlg/Navigator.src +++ b/reportdesign/source/ui/dlg/Navigator.src @@ -88,13 +88,6 @@ ImageList RID_SVXIMGLIST_RPTEXPL NAVIGATOR_IMAGEIDS; }; -ImageList RID_SVXIMGLIST_RPTEXPL_HC -{ - Prefix = "sxh"; - MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; - NAVIGATOR_IMAGEIDS; -}; - String RID_STR_FUNCTIONS { Text [ en-US ] = "Functions" ; diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx b/reportdesign/source/ui/dlg/PageNumber.cxx index 635938552f4e..39454ffb8c85 100644 --- a/reportdesign/source/ui/dlg/PageNumber.cxx +++ b/reportdesign/source/ui/dlg/PageNumber.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,37 +27,19 @@ ************************************************************************/ #include "precompiled_rptui.hxx" #include "PageNumber.hxx" -#ifndef RPTUI_PAGENUMBER_HRC #include "PageNumber.hrc" -#endif #include <com/sun/star/beans/XPropertySet.hpp> #include <tools/debug.hxx> -#ifndef _RPTUI_DLGRESID_HRC #include "RptResId.hrc" -#endif -#ifndef _RPTUI_SLOTID_HRC_ #include "rptui_slotid.hrc" -#endif -#ifndef _RPTUI_MODULE_HELPER_DBU_HXX_ #include "ModuleHelper.hxx" -#endif #include "RptDef.hxx" -#ifndef RTPUI_REPORTDESIGN_HELPID_HRC #include "helpids.hrc" -#endif #include <vcl/msgbox.hxx> -#ifndef _GLOBLMN_HRC #include <svx/globlmn.hrc> -#endif -#ifndef _SBASLTID_HRC #include <svx/svxids.hrc> -#endif -#ifndef RPTUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" -#endif #include "ReportController.hxx" #include <com/sun/star/report/XFixedText.hpp> #include <algorithm> @@ -160,3 +143,5 @@ short OPageNumberDialog::Execute() // ============================================================================= } // rptui // ============================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/PageNumber.src b/reportdesign/source/ui/dlg/PageNumber.src index c5c760e1755d..83e979d72d29 100644 --- a/reportdesign/source/ui/dlg/PageNumber.src +++ b/reportdesign/source/ui/dlg/PageNumber.src @@ -120,8 +120,6 @@ ModalDialog RID_PAGENUMBERS < "Left" ; Default ; > ; < "Center" ; Default ; > ; < "Right" ; Default ; > ; - //< "Inside" ; Default ; > ; - //< "Outside" ; Default ; > ; }; }; CheckBox CB_SHOWNUMBERONFIRSTPAGE diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx index e8d603809e76..90a197d435a0 100644 --- a/reportdesign/source/ui/dlg/dlgpage.cxx +++ b/reportdesign/source/ui/dlg/dlgpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,7 @@ #include "dlgpage.hxx" #include "ModuleHelper.hxx" #include "RptResId.hrc" -#include <svl/intitem.hxx> //add CHINA001 +#include <svl/intitem.hxx> #include <svl/cjkoptions.hxx> #include <svl/aeitem.hxx> @@ -52,15 +53,13 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ), rOutAttrs ( *pAttr ) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet fail!"); + OSL_ENSURE(pFact, "Dialogdiet fail!"); switch( _nPageId ) { case RID_PAGEDIALOG_BACKGROUND: AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1))); break; case RID_PAGEDIALOG_PAGE: - //AddTabPage( RID_SVXPAGE_PAGE,String(ModuleRes(1))); - // AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1))); AddTabPage(RID_SVXPAGE_PAGE, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 ); AddTabPage(RID_SVXPAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 ); break; @@ -75,11 +74,9 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ), break; case RID_PAGEDIALOG_LINE: AddTabPage( RID_SVXPAGE_LINE,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), 0 ); - //AddTabPage( RID_SVXPAGE_LINE_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE_DEF ), 0 ); - //AddTabPage( RID_SVXPAGE_LINEEND_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINEEND_DEF ), 0 ); break; default: - OSL_ENSURE(0,"Unknown page id"); + OSL_FAIL("Unknown page id"); } SvtCJKOptions aCJKOptions; @@ -91,3 +88,5 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ), // ============================================================================= } // namespace rptui // ============================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/dlgpage.src b/reportdesign/source/ui/dlg/dlgpage.src index b8dfcd377994..dd05a94b6395 100644 --- a/reportdesign/source/ui/dlg/dlgpage.src +++ b/reportdesign/source/ui/dlg/dlgpage.src @@ -79,7 +79,6 @@ TabDialog RID_PAGEDIALOG_PAGE { Pos = MAP_APPFONT ( 169 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Zurück : Zur³ck */ Text [ en-US ] = "Return" ; TabStop = TRUE ; }; @@ -129,7 +128,6 @@ TabDialog RID_PAGEDIALOG_BACKGROUND { Pos = MAP_APPFONT ( 169 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Zurück : Zur³ck */ Text [ en-US ] = "Return" ; TabStop = TRUE ; Text [ x-comment ] = " "; @@ -218,7 +216,6 @@ TabDialog RID_PAGEDIALOG_CHAR { Pos = MAP_APPFONT ( 169 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Zurück : Zur³ck */ Text [ en-US ] = "Return" ; TabStop = TRUE ; Text [ x-comment ] = " "; @@ -290,7 +287,6 @@ TabDialog RID_PAGEDIALOG_LINE { Pos = MAP_APPFONT ( 169 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Zurück : Zur³ck */ Text [ en-US ] = "Return" ; TabStop = TRUE ; Text [ x-comment ] = " "; diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx index fe9cbff6aa6c..374ec169a055 100644 --- a/reportdesign/source/ui/inc/AddField.hxx +++ b/reportdesign/source/ui/inc/AddField.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,10 +110,8 @@ public: /** will be called when the id of the image list is needed. @param _eBitmapSet <svtools/imgdef.hxx> - @param _bHiContast - <TRUE/> when in high contrast mode. */ - virtual ImageList getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const; + virtual ImageList getImageList(sal_Int16 _eBitmapSet) const; /** will be called when the controls need to be resized. */ @@ -141,3 +140,4 @@ private: //============================================================================== #endif // RPTUI_ADDFIELDWINDOW_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ColorChanger.hxx b/reportdesign/source/ui/inc/ColorChanger.hxx index a2e01c135007..db58419fca42 100644 --- a/reportdesign/source/ui/inc/ColorChanger.hxx +++ b/reportdesign/source/ui/inc/ColorChanger.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,3 +69,4 @@ namespace rptui } #endif //RPTUI_COLORCHANGER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ColorListener.hxx b/reportdesign/source/ui/inc/ColorListener.hxx index 4216e39a3652..b3ded2a5aaf8 100644 --- a/reportdesign/source/ui/inc/ColorListener.hxx +++ b/reportdesign/source/ui/inc/ColorListener.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,4 @@ namespace rptui } #endif // RPTUI_COLORLISTENER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ColumnInfo.hxx b/reportdesign/source/ui/inc/ColumnInfo.hxx index 392a141e6382..bdbdfd3d5f6d 100644 --- a/reportdesign/source/ui/inc/ColumnInfo.hxx +++ b/reportdesign/source/ui/inc/ColumnInfo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -6,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: AddField.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -55,3 +53,5 @@ namespace rptui } // namespace rptui // ============================================================================= #endif // RPTUI_COLUMNINFO_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx index e4e56d59e91a..5ccd968c6a66 100644 --- a/reportdesign/source/ui/inc/CondFormat.hxx +++ b/reportdesign/source/ui/inc/CondFormat.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -184,3 +185,5 @@ namespace rptui // ............................................................................. #endif // RPTUI_CONDFORMAT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/DataProviderHandler.hxx b/reportdesign/source/ui/inc/DataProviderHandler.hxx index d5b3221f7745..458debb305b3 100644 --- a/reportdesign/source/ui/inc/DataProviderHandler.hxx +++ b/reportdesign/source/ui/inc/DataProviderHandler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -127,3 +128,5 @@ namespace rptui //........................................................................ #endif // RPT_DATAPROVIDERHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/DateTime.hxx b/reportdesign/source/ui/inc/DateTime.hxx index 1526e5978331..4d6f9a233a55 100644 --- a/reportdesign/source/ui/inc/DateTime.hxx +++ b/reportdesign/source/ui/inc/DateTime.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,17 +28,11 @@ #ifndef RPTUI_DATETIME_HXX #define RPTUI_DATETIME_HXX -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif -#ifndef _FIXED_HXX //autogen #include <vcl/fixed.hxx> -#endif #include <vcl/lstbox.hxx> #include <vcl/field.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <com/sun/star/report/XReportDefinition.hpp> #include <com/sun/star/util/XNumberFormats.hpp> #include <com/sun/star/lang/Locale.hpp> @@ -54,7 +49,6 @@ class OReportController; \************************************************************************/ class ODateTimeDialog : public ModalDialog { - // FixedLine m_aFLDate; CheckBox m_aDate; FixedText m_aFTDateFormat; ListBox m_aDateListBox; @@ -107,3 +101,5 @@ public: } // namespace rptui // ============================================================================= #endif // RPTUI_DATETIME_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/DefaultInspection.hxx b/reportdesign/source/ui/inc/DefaultInspection.hxx index a0382ab0e7f8..43c62a761458 100644 --- a/reportdesign/source/ui/inc/DefaultInspection.hxx +++ b/reportdesign/source/ui/inc/DefaultInspection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,3 +110,4 @@ namespace rptui #endif // RPT_DEFAULTINSPECTION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index 52780fdb65ed..a85f500de4df 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -157,12 +158,6 @@ namespace rptui */ void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection, bool bBoundRects = false); -#if 0 - /** checks if alignment is possible in the current section - */ - sal_Bool isAlignPossible() const; -#endif - /** All objects will be marked. */ void SelectAll(const sal_uInt16 _nObjectType); @@ -296,3 +291,4 @@ namespace rptui //================================================================== #endif // RPTUI_DESIGNVIEW_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/EndMarker.hxx b/reportdesign/source/ui/inc/EndMarker.hxx index 90655077a167..7c435e94d35e 100644 --- a/reportdesign/source/ui/inc/EndMarker.hxx +++ b/reportdesign/source/ui/inc/EndMarker.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,3 +52,4 @@ namespace rptui } #endif // RPTUI_ENDMARKER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/FixedTextColor.hxx b/reportdesign/source/ui/inc/FixedTextColor.hxx index cbec4e46a0c9..9120aa433537 100644 --- a/reportdesign/source/ui/inc/FixedTextColor.hxx +++ b/reportdesign/source/ui/inc/FixedTextColor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,8 +39,6 @@ /** === end UNO includes === **/ #include <IReportControllerObserver.hxx> - -//#include <boost/noncopyable.hpp> #include <vector> namespace rptui @@ -55,8 +54,6 @@ namespace rptui void setPropertyTextColor(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer >& _xVclWindowPeer, sal_Int32 _nFormatKey); - // sal_Int32 getTextColor(); - public: FixedTextColor(const OReportController & _aObserver); virtual ~FixedTextColor(); @@ -71,3 +68,5 @@ namespace rptui #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx b/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx index 84119777a160..4c2038e8e6a3 100644 --- a/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx +++ b/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,6 @@ #include <com/sun/star/report/XReportComponent.hpp> /** === end UNO includes === **/ -//#include <boost/noncopyable.hpp> #include <vector> #include <IReportControllerObserver.hxx> @@ -68,3 +68,5 @@ namespace rptui #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx index b08e14f52b4a..c458ccf240e4 100644 --- a/reportdesign/source/ui/inc/Formula.hxx +++ b/reportdesign/source/ui/inc/Formula.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -110,3 +111,4 @@ protected: #endif // RPTUI_FORMULA_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx index 13525e8f2e0e..e59be1a5c8bf 100644 --- a/reportdesign/source/ui/inc/FunctionHelper.hxx +++ b/reportdesign/source/ui/inc/FunctionHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -110,3 +111,5 @@ public: // ============================================================================= #endif //RPTUI_FUNCTIONHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx index 200b7c29a60a..91504e7f1cb9 100644 --- a/reportdesign/source/ui/inc/GeometryHandler.hxx +++ b/reportdesign/source/ui/inc/GeometryHandler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -319,3 +320,5 @@ namespace rptui //........................................................................ #endif // RPT_GeometryHandler_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx index 239858c605a4..22f195bac07e 100644 --- a/reportdesign/source/ui/inc/GroupsSorting.hxx +++ b/reportdesign/source/ui/inc/GroupsSorting.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ #define RPTUI_GROUPS_SORTING_HXX #include <vcl/floatwin.hxx> -#ifndef _FIXED_HXX //autogen #include <vcl/fixed.hxx> -#endif #include <vcl/lstbox.hxx> #include <vcl/edit.hxx> #include <vcl/field.hxx> @@ -66,18 +65,15 @@ class OReportController; \************************************************************************/ class OGroupsSortingDialog : public FloatingWindow - , public ::cppu::BaseMutex - , public ::comphelper::OPropertyChangeListener - ,public dbaui::OToolBoxHelper - ,public vcl::IImageListProvider + , public ::cppu::BaseMutex + , public ::comphelper::OPropertyChangeListener + , public dbaui::OToolBoxHelper + , public vcl::IImageListProvider { friend class OFieldExpressionControl; FixedLine m_aFL2; FixedText m_aMove; -//BTN ImageButton m_aPB_Up; -//BTN ImageButton m_aPB_Down; -//BTN ImageButton m_aPB_Delete; ToolBox m_aToolBox; FixedLine m_aFL3; @@ -107,7 +103,6 @@ private: DECL_LINK( OnControlFocusLost, Control* ); DECL_LINK( OnControlFocusGot, Control* ); DECL_LINK( LBChangeHdl, ListBox* ); -//BTN DECL_LINK( ClickHdl, ImageButton* ); DECL_LINK( OnFormatAction, ToolBox* ); /** returns the groups @@ -189,10 +184,8 @@ public: /** will be called when the image list is needed. @param _eSymbolsSize <svtools/imgdef.hxx> - @param _bHiContast - <TRUE/> when in high contrast mode. */ - virtual ImageList getImageList(sal_Int16 _eSymbolsSize,sal_Bool _bHiContast) const; + virtual ImageList getImageList(sal_Int16 _eSymbolsSize) const; // ImageListProvider interface virtual ImageList getImageList(vcl::ImageListType) SAL_THROW ((com::sun::star::lang::IllegalArgumentException )); @@ -202,3 +195,5 @@ public: } // namespace rptui // ============================================================================= #endif // RPTUI_GROUPS_SORTING_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/IReportControllerObserver.hxx b/reportdesign/source/ui/inc/IReportControllerObserver.hxx index 497fe874b3ef..09d76f9769b4 100644 --- a/reportdesign/source/ui/inc/IReportControllerObserver.hxx +++ b/reportdesign/source/ui/inc/IReportControllerObserver.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,4 @@ namespace rptui #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/InsertFunctions.hxx b/reportdesign/source/ui/inc/InsertFunctions.hxx index b177377fd5fd..802a6b993850 100644 --- a/reportdesign/source/ui/inc/InsertFunctions.hxx +++ b/reportdesign/source/ui/inc/InsertFunctions.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ #ifndef RPT_INSERTFUNCTIONS_HXX_INCLUDED #define RPT_INSERTFUNCTIONS_HXX_INCLUDED -#ifndef _EVENT_HXX //autogen #include <vcl/event.hxx> -#endif #include <vcl/timer.hxx> class SdrView; @@ -44,3 +43,4 @@ namespace rptui // --------- #endif // RPT_INSERTFUNCTIONS_HXX_INCLUDED +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/MarkedSection.hxx b/reportdesign/source/ui/inc/MarkedSection.hxx index eb892aee92eb..a879e7053d2a 100644 --- a/reportdesign/source/ui/inc/MarkedSection.hxx +++ b/reportdesign/source/ui/inc/MarkedSection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,5 @@ namespace rptui } // rptui #endif /* RPTUI_MARKEDSECTION_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/Navigator.hxx b/reportdesign/source/ui/inc/Navigator.hxx index a9cf2fd9222e..05cb003b85f0 100644 --- a/reportdesign/source/ui/inc/Navigator.hxx +++ b/reportdesign/source/ui/inc/Navigator.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,5 @@ namespace rptui } // namespace rptui // ============================================================================= #endif // INCLUDED_RPTUI_NAVIGATOR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/PageNumber.hxx b/reportdesign/source/ui/inc/PageNumber.hxx index fd574ff5fa8b..e42530dd22a8 100644 --- a/reportdesign/source/ui/inc/PageNumber.hxx +++ b/reportdesign/source/ui/inc/PageNumber.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,17 +28,11 @@ #ifndef RPTUI_PAGENUMBER_HXX #define RPTUI_PAGENUMBER_HXX -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif -#ifndef _FIXED_HXX //autogen #include <vcl/fixed.hxx> -#endif #include <vcl/lstbox.hxx> #include <vcl/field.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <com/sun/star/report/XReportDefinition.hpp> @@ -86,3 +81,5 @@ public: } // namespace rptui // ============================================================================= #endif // RPTUI_PAGENUMBER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ReportComponentHandler.hxx b/reportdesign/source/ui/inc/ReportComponentHandler.hxx index 080d913d59ab..c2b1929e1612 100644 --- a/reportdesign/source/ui/inc/ReportComponentHandler.hxx +++ b/reportdesign/source/ui/inc/ReportComponentHandler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -113,3 +114,5 @@ namespace rptui //........................................................................ #endif // RPT_REPORTCOMPONENTHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index b25f49770f5b..007b42d225fb 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -484,3 +485,4 @@ namespace rptui } #endif // RPTUI_REPORTCONTROLLER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx b/reportdesign/source/ui/inc/ReportControllerObserver.hxx index 5f7868c9fa14..9beba004407b 100644 --- a/reportdesign/source/ui/inc/ReportControllerObserver.hxx +++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,6 @@ #include <dllapi.h> #include <vector> -// #include <svl/lstner.hxx> #include <vcl/svapp.hxx> #include <tools/link.hxx> @@ -49,12 +49,11 @@ namespace rptui class OXReportControllerObserverImpl; //======================================================================== - class /* REPORTDESIGN_DLLPUBLIC */ OXReportControllerObserver + class OXReportControllerObserver : public ::cppu::WeakImplHelper3< ::com::sun::star::beans::XPropertyChangeListener , ::com::sun::star::container::XContainerListener , ::com::sun::star::util::XModifyListener > - /*,public SfxListener*/ { const ::std::auto_ptr<OXReportControllerObserverImpl> m_pImpl; @@ -69,7 +68,6 @@ namespace rptui public: OXReportControllerObserver(const OReportController& _rController); -// protected: // XPropertyChangeListener virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException); @@ -91,9 +89,6 @@ namespace rptui void AddSection( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection); void RemoveSection( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection ); - // SfxListener - // virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - /** Create an object ob OUndoEnvLock locks the undo possibility As long as in the OUndoEnvLock scope, no undo is possible for manipulated object. @@ -117,7 +112,6 @@ namespace rptui void switchListening( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxContainer, bool _bStartListening ) SAL_THROW(()); void switchListening( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject, bool _bStartListening ) SAL_THROW(()); - // void ModeChanged(); // will be called from 'Notify' DECL_LINK(SettingsChanged, VclWindowEvent* ); private: @@ -130,3 +124,4 @@ namespace rptui #endif /* INCLUDED_REPORTCONTROLLEROBSERVER_HXX */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ReportDefines.hxx b/reportdesign/source/ui/inc/ReportDefines.hxx index 9d207c9c9142..0e45ca91c418 100644 --- a/reportdesign/source/ui/inc/ReportDefines.hxx +++ b/reportdesign/source/ui/inc/ReportDefines.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,3 +38,5 @@ namespace rptui } #endif //RPTUI_REPORT_DEFINES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ReportRuler.hxx b/reportdesign/source/ui/inc/ReportRuler.hxx index a14e3a2dffdb..092054b9faf5 100644 --- a/reportdesign/source/ui/inc/ReportRuler.hxx +++ b/reportdesign/source/ui/inc/ReportRuler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ namespace rptui } // rptui //============================================================================== #endif // RPTUI_RULER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx index ac8383d1acff..11e2ada247a0 100644 --- a/reportdesign/source/ui/inc/ReportSection.hxx +++ b/reportdesign/source/ui/inc/ReportSection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -175,3 +176,4 @@ namespace rptui //================================================================== #endif // REPORT_REPORTSECTION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx index cb576ebc32ef..27200bd2f3d0 100644 --- a/reportdesign/source/ui/inc/ReportWindow.hxx +++ b/reportdesign/source/ui/inc/ReportWindow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -243,3 +244,4 @@ namespace rptui //================================================================== #endif // RPTUI_REPORT_WINDOW_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/RptUndo.hxx b/reportdesign/source/ui/inc/RptUndo.hxx index bd3b9606a8e3..1ac8295fb7c2 100644 --- a/reportdesign/source/ui/inc/RptUndo.hxx +++ b/reportdesign/source/ui/inc/RptUndo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -151,3 +152,5 @@ namespace rptui }; } #endif // RPTUI_UNDO_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx index 1f9f73533340..06d9daeb1a6b 100644 --- a/reportdesign/source/ui/inc/ScrollHelper.hxx +++ b/reportdesign/source/ui/inc/ScrollHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -227,3 +228,5 @@ namespace rptui }; } #endif // RPTUI_SCROLLHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/SectionView.hxx b/reportdesign/source/ui/inc/SectionView.hxx index 71d07db7b7a2..63424dfc38a2 100644 --- a/reportdesign/source/ui/inc/SectionView.hxx +++ b/reportdesign/source/ui/inc/SectionView.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,5 @@ public: }; } #endif //_REPORT_SECTIONVIEW_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx index 8afd59ee2de8..700550ee99d5 100644 --- a/reportdesign/source/ui/inc/SectionWindow.hxx +++ b/reportdesign/source/ui/inc/SectionWindow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,3 +139,4 @@ namespace rptui //============================================================================== #endif // RPTUI_SECTIONWINDOW_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/StartMarker.hxx b/reportdesign/source/ui/inc/StartMarker.hxx index d1746cc46b11..2ae45214b44b 100644 --- a/reportdesign/source/ui/inc/StartMarker.hxx +++ b/reportdesign/source/ui/inc/StartMarker.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,8 +46,6 @@ namespace rptui OSectionWindow* m_pParent; static Image* s_pDefCollapsed; static Image* s_pDefExpanded; - static Image* s_pDefCollapsedHC; - static Image* s_pDefExpandedHC; static oslInterlockedCount s_nImageRefCount; /// When 0 all static images will be destroyed sal_Bool m_bShowRuler; @@ -86,3 +85,4 @@ namespace rptui } #endif // RPTUI_STARTMARKER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx index 2b5ab62bcb11..569c0b138e7c 100644 --- a/reportdesign/source/ui/inc/UITools.hxx +++ b/reportdesign/source/ui/inc/UITools.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,7 +69,7 @@ namespace rptui ::com::sun::star::uno::Reference< T > xObject(_xCollection->getByIndex(i),::com::sun::star::uno::UNO_QUERY); if ( xObject == _xSearch ) break; - } // for (;i<nCount ; ++i) + } return i; } @@ -187,3 +188,4 @@ namespace rptui } #endif //RPTUI_UITOOLS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index 9bee09a0b335..041da5de03ce 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -251,7 +252,6 @@ namespace rptui /** returns the report section window for the given xsection @param _xSection the section */ - // ::boost::shared_ptr<OSectionWindow> getReportSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection); ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; /** checks if the keycode is known by the child windows @@ -327,7 +327,6 @@ namespace rptui OSectionView* getSectionRelativeToPosition(const OSectionView* _pSection,Point& _rPnt); void MovAction(const Point& rPnt,const OSectionView* _pSection,bool _bMove /*= true */, bool _bControlKeySet); - // void MovAction2(const Point& rPnt,const OSectionView* _pSection); sal_uInt32 getMarkedObjectCount() const; @@ -359,3 +358,4 @@ namespace rptui //============================================================================== #endif // RPTUI_VIEWSWINDOW_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/dlgedclip.hxx b/reportdesign/source/ui/inc/dlgedclip.hxx index bc57a83dc45c..dc5533fbea8d 100644 --- a/reportdesign/source/ui/inc/dlgedclip.hxx +++ b/reportdesign/source/ui/inc/dlgedclip.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,3 +85,5 @@ private: }; } #endif // _REPORT_RPTUICLIP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/dlgedfac.hxx b/reportdesign/source/ui/inc/dlgedfac.hxx index fd5738447cd6..415d27e9ba7b 100644 --- a/reportdesign/source/ui/inc/dlgedfac.hxx +++ b/reportdesign/source/ui/inc/dlgedfac.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,3 +49,4 @@ public: } #endif // _REPORT_RPTUIFAC_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/dlgedfunc.hxx b/reportdesign/source/ui/inc/dlgedfunc.hxx index f7eb0cb6d00e..2ac110a70396 100644 --- a/reportdesign/source/ui/inc/dlgedfunc.hxx +++ b/reportdesign/source/ui/inc/dlgedfunc.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -158,3 +159,5 @@ public: } #endif //_REPORT_RPTUIFUNC_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/dlgpage.hxx b/reportdesign/source/ui/inc/dlgpage.hxx index aec98e42cdd6..4f713dad90ef 100644 --- a/reportdesign/source/ui/inc/dlgpage.hxx +++ b/reportdesign/source/ui/inc/dlgpage.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,5 @@ public: } // namespace rptui // ============================================================================= #endif // RPTUI_DLGPAGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx index 3cc2a20cc465..2d0b49f74640 100644 --- a/reportdesign/source/ui/inc/metadata.hxx +++ b/reportdesign/source/ui/inc/metadata.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,6 +30,8 @@ #include "ModuleHelper.hxx" +#include <sal/macros.h> + /** === begin UNO includes === **/ #include <com/sun/star/beans/Property.hpp> #include <com/sun/star/inspection/XPropertyHandler.hpp> @@ -160,3 +163,4 @@ namespace rptui #endif // RPTUI_METADATA_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/propbrw.hxx b/reportdesign/source/ui/inc/propbrw.hxx index bf64f7687046..ad31dfb4b24c 100644 --- a/reportdesign/source/ui/inc/propbrw.hxx +++ b/reportdesign/source/ui/inc/propbrw.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,3 +117,5 @@ private: } // rptui //============================================================================== #endif // _REPORT_PROPBRW_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/statusbarcontroller.hxx b/reportdesign/source/ui/inc/statusbarcontroller.hxx index 6fffd36cc4df..cd25a477d02e 100644 --- a/reportdesign/source/ui/inc/statusbarcontroller.hxx +++ b/reportdesign/source/ui/inc/statusbarcontroller.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -90,3 +91,4 @@ namespace rptui } #endif // DBAUI_STATUSBARCONTROLLER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/toolboxcontroller.hxx b/reportdesign/source/ui/inc/toolboxcontroller.hxx index 447db93fe667..0b12e6551176 100644 --- a/reportdesign/source/ui/inc/toolboxcontroller.hxx +++ b/reportdesign/source/ui/inc/toolboxcontroller.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,4 @@ namespace rptui //.......................................................................... #endif //RPTUI_TOOLBOXCONTROLLER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index 59cee2e16559..d6a6a15bfc4b 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,7 +55,7 @@ #include <tools/fldunit.hxx> #include "metadata.hxx" #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include "helpids.hrc" #include "uistrings.hrc" #include "RptResId.hrc" @@ -168,13 +169,6 @@ void SAL_CALL DataProviderHandler::inspect(const uno::Reference< uno::XInterface m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), m_xReportComponent.get(), aPropertyMediation,sal_True ); } - - //const ::rtl::OUString sRowSet(RTL_CONSTASCII_USTRINGPARAM("RowSet")); - //if ( xNameCont->hasByName(sRowSet) ) - //{ - // uno::Reference<beans::XPropertySet> xProp(m_xFormComponentHandler,uno::UNO_QUERY); - // xProp->setPropertyValue(sRowSet,xNameCont->getByName(sRowSet)); - //} } catch(uno::Exception) { @@ -270,7 +264,7 @@ void DataProviderHandler::impl_updateChartTitle_throw(const uno::Any& _aValue) aArgs[0] = xFormatted; xTitle->setText(aArgs); } - } // if ( xTitled.is() ) + } } beans::PropertyState SAL_CALL DataProviderHandler::getPropertyState(const ::rtl::OUString & PropertyName) throw (uno::RuntimeException, beans::UnknownPropertyException) @@ -329,7 +323,7 @@ uno::Any SAL_CALL DataProviderHandler::convertToPropertyValue(const ::rtl::OUStr } catch( const uno::Exception& ) { - OSL_ENSURE( sal_False, "DataProviderHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" ); + OSL_FAIL( "DataProviderHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" ); } break; case PROPERTY_ID_MASTERFIELDS: @@ -363,7 +357,7 @@ uno::Any SAL_CALL DataProviderHandler::convertToControlValue(const ::rtl::OUStri } catch( const uno::Exception& ) { - OSL_ENSURE( sal_False, "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" ); + OSL_FAIL( "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" ); } break; default: @@ -395,10 +389,9 @@ uno::Sequence< beans::Property > SAL_CALL DataProviderHandler::getSupportedPrope ,PROPERTY_MASTERFIELDS ,PROPERTY_DETAILFIELDS ,PROPERTY_PREVIEW_COUNT - //,PROPERTY_TITLE }; - for (size_t nPos = 0; nPos < sizeof(s_pProperties)/sizeof(s_pProperties[0]) ;++nPos ) + for (size_t nPos = 0; nPos < SAL_N_ELEMENTS(s_pProperties) ;++nPos ) { aValue.Name = s_pProperties[nPos]; aNewProps.push_back(aValue); @@ -479,9 +472,9 @@ void SAL_CALL DataProviderHandler::actuatingPropertyChanged(const ::rtl::OUStrin xReceiver->setArguments( aArgs.getPropertyValues() ); if ( !bModified ) xReport->setModified(sal_False); - } // if ( NewValue != OldValue ) + } m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, InspectorUI, FirstTimeInit); - } // if ( ActuatingPropertyName == PROPERTY_COMMAND ) + } else if ( ActuatingPropertyName == PROPERTY_TITLE ) { if ( NewValue != OldValue ) @@ -563,3 +556,4 @@ bool DataProviderHandler::impl_dialogChartType_nothrow( ::osl::ClearableMutexGua } // namespace rptui //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx index 666b87000418..f402224077ef 100644 --- a/reportdesign/source/ui/inspection/DefaultInspection.cxx +++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,13 +30,9 @@ #include <comphelper/sequence.hxx> #include <com/sun/star/ucb/AlreadyInitializedException.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> -#ifndef _REPORT_DLGRESID_HRC #include <RptResId.hrc> -#endif #include "ModuleHelper.hxx" -#ifndef RTPUI_REPORTDESIGN_HELPID_HRC #include "helpids.hrc" -#endif #include <cppuhelper/implbase1.hxx> #include <osl/diagnose.h> #include <rtl/ustrbuf.hxx> @@ -146,7 +143,7 @@ namespace rptui }; - const size_t nFactories = sizeof( aFactories ) / sizeof( aFactories[ 0 ] ); + const size_t nFactories = SAL_N_ELEMENTS( aFactories ); Sequence< Any > aReturn( nFactories ); Any* pReturn = aReturn.getArray(); for ( size_t i = 0; i < nFactories; ++i ) @@ -244,7 +241,7 @@ namespace rptui { "Data", RID_STR_PROPPAGE_DATA, HID_RPT_PROPDLG_TAB_DATA }, }; - const size_t nCategories = sizeof( aCategories ) / sizeof( aCategories[0] ); + const size_t nCategories = SAL_N_ELEMENTS( aCategories ); Sequence< PropertyCategoryDescriptor > aReturn( nCategories ); PropertyCategoryDescriptor* pReturn = aReturn.getArray(); for ( size_t i=0; i<nCategories; ++i, ++pReturn ) @@ -282,3 +279,4 @@ namespace rptui } // namespace rptui //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 80eaeaf03663..a0f655540c98 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,6 +116,8 @@ #include "helpids.hrc" #include <toolkit/helper/convert.hxx> +#include <o3tl/compat_functional.hxx> + #define DATA_OR_FORMULA 0 #define FUNCTION 1 #define COUNTER 2 @@ -126,18 +129,17 @@ namespace rptui { //........................................................................ using namespace ::com::sun::star; -//using namespace formula; // comparing two property instances struct PropertyCompare : public ::std::binary_function< beans::Property, ::rtl::OUString , bool > { bool operator() (const beans::Property& x, const ::rtl::OUString& y) const { - return x.Name.equals(y);// ? true : false; + return x.Name.equals(y); } bool operator() (const ::rtl::OUString& x,const beans::Property& y) const { - return x.equals(y.Name);// ? true : false; + return x.equals(y.Name); } }; @@ -806,9 +808,9 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const { // add function names ::std::for_each( m_aFunctionNames.begin(), m_aFunctionNames.end(), - ::std::compose1( + ::o3tl::compose1( ::boost::bind( &inspection::XStringListControl::appendListEntry, xListControl,_1 ), - ::std::select1st<TFunctions::value_type>())); + ::o3tl::select1st<TFunctions::value_type>())); } else { @@ -1024,7 +1026,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const ::rtl::OUString } catch( const uno::Exception& ) { - OSL_ENSURE( sal_False, "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" ); + OSL_FAIL( "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" ); } } } @@ -1169,7 +1171,7 @@ uno::Any SAL_CALL GeometryHandler::convertToControlValue(const ::rtl::OUString & } catch( const uno::Exception& ) { - OSL_ENSURE( sal_False, "GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" ); + OSL_FAIL( "GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" ); } } break; @@ -1312,7 +1314,7 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie }; const uno::Reference < beans::XPropertySetInfo > xInfo = m_xReportComponent->getPropertySetInfo(); const uno::Sequence< beans::Property> aSeq = xInfo->getProperties(); - for (size_t i = 0; i < sizeof(pIncludeProperties)/sizeof(pIncludeProperties[0]) ;++i ) + for (size_t i = 0; i < SAL_N_ELEMENTS(pIncludeProperties) ;++i ) { const beans::Property* pIter = aSeq.getConstArray(); const beans::Property* pEnd = pIter + aSeq.getLength(); @@ -1332,7 +1334,7 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie } aNewProps.push_back(*pFind); } - } // 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() ) @@ -1453,7 +1455,6 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr eResult = inspection::InteractiveSelectionResult_ObtainedValue; beans::PropertyChangeEvent aScopeEvent; aScopeEvent.PropertyName = PROPERTY_FILLCOLOR; - // aScopeEvent.OldValue <<= _nOldDataFieldType; aScopeEvent.NewValue <<= xShape->getPropertyValue(PROPERTY_FILLCOLOR); m_aPropertyListeners.notify( aScopeEvent, &beans::XPropertyChangeListener::propertyChange ); } @@ -1522,7 +1523,7 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString & { _rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD); _rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST); - } // if ( bEnable ) + } m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit); } break; @@ -1612,7 +1613,7 @@ bool GeometryHandler::impl_dialogFilter_nothrow( ::rtl::OUString& _out_rSelected catch (sdbc::SQLException& e) { aErrorInfo = e; } catch( const uno::Exception& ) { - OSL_ENSURE( sal_False, "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" ); + OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" ); } if ( aErrorInfo.isValid() ) @@ -1654,7 +1655,7 @@ void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< ::rtl::OUStrin if ( m_nDataFieldType == FUNCTION ) ::std::transform(m_aDefaultFunctions.begin(),m_aDefaultFunctions.end(),::std::back_inserter(_out_rList),::boost::bind( &DefaultFunction::getName, _1 )); else if ( m_nDataFieldType == USER_DEF_FUNCTION ) - ::std::transform(m_aFunctionNames.begin(),m_aFunctionNames.end(),::std::back_inserter(_out_rList),::std::select1st<TFunctions::value_type>()); + ::std::transform(m_aFunctionNames.begin(),m_aFunctionNames.end(),::std::back_inserter(_out_rList),::o3tl::select1st<TFunctions::value_type>()); } // ----------------------------------------------------------------------------- ::rtl::OUString GeometryHandler::impl_ConvertUIToMimeType_nothrow(const ::rtl::OUString& _sUIName) const @@ -1672,7 +1673,7 @@ void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< ::rtl::OUStrin const uno::Sequence< ::rtl::OUString > aMimeTypes( xReportDefinition->getAvailableMimeTypes() ); sRet = aMimeTypes[nPos]; } - } // if ( aFind != aList.end() ) + } return sRet; } // ----------------------------------------------------------------------------- @@ -1709,7 +1710,7 @@ void GeometryHandler::impl_fillMimeTypes_nothrow(::std::vector< ::rtl::OUString } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception caught!"); + OSL_FAIL("Exception caught!"); } } // ----------------------------------------------------------------------------- @@ -1741,7 +1742,7 @@ void GeometryHandler::impl_fillScopeList_nothrow(::std::vector< ::rtl::OUString } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception caught!"); + OSL_FAIL("Exception caught!"); } } // ----------------------------------------------------------------------------- @@ -1859,7 +1860,7 @@ sal_Bool GeometryHandler::isDefaultFunction( const ::rtl::OUString& _sQuotedFunc } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception caught!"); + OSL_FAIL("Exception caught!"); } return bDefaultFunction; } @@ -1899,7 +1900,7 @@ sal_Bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference< } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception caught!"); + OSL_FAIL("Exception caught!"); } return bDefaultFunction; } @@ -1919,13 +1920,6 @@ void GeometryHandler::loadDefaultFunctions() DefaultFunction aDefault; aDefault.m_bDeepTraversing = sal_False; - //aDefault.m_sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Counter")); - //aDefault.m_sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:[%FunctionName] + 1")); - //aDefault.m_sSearchString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:\\[[:alpha:]+[:alnum:]*\\][:space:]*\\+[:space:]*1")); - //aDefault.m_sInitialFormula.IsPresent = sal_True; - //aDefault.m_sInitialFormula.Value = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:1")); - //m_aDefaultFunctions.push_back(aDefault); - aDefault.m_bPreEvaluated = sal_True; aDefault.m_sName = String(ModuleRes(RID_STR_F_ACCUMULATION)); @@ -1997,7 +1991,7 @@ void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception caught!"); + OSL_FAIL("Exception caught!"); } } // ----------------------------------------------------------------------------- @@ -2087,7 +2081,7 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< ::rtl::OUString } catch (uno::Exception&) { - DBG_ERROR( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" ); + OSL_FAIL( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" ); } } // ----------------------------------------------------------------------------- @@ -2248,3 +2242,4 @@ void SAL_CALL GeometryHandler::propertyChange(const beans::PropertyChangeEvent& } // namespace rptui //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx index 022f815ced4e..8b066a19a42c 100644 --- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx +++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ #include "ReportComponentHandler.hxx" #include <com/sun/star/lang/XInitialization.hpp> #include <comphelper/sequence.hxx> -#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" -#endif #include <comphelper/types.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <unotools/syslocale.hxx> @@ -48,7 +47,6 @@ namespace rptui { //........................................................................ using namespace ::com::sun::star; -// using namespace comphelper; ReportComponentHandler::ReportComponentHandler(uno::Reference< uno::XComponentContext > const & context) :ReportComponentHandler_Base(m_aMutex) @@ -230,3 +228,4 @@ void SAL_CALL ReportComponentHandler::actuatingPropertyChanged(const ::rtl::OUSt } // namespace rptui //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx index 65017ff7349d..a0582427c889 100644 --- a/reportdesign/source/ui/inspection/metadata.cxx +++ b/reportdesign/source/ui/inspection/metadata.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,15 +31,9 @@ #include "com/sun/star/inspection/XPropertyHandler.hpp" #include <tools/debug.hxx> #include <comphelper/extract.hxx> -#ifndef RTPUI_REPORTDESIGN_HELPID_HRC #include "helpids.hrc" -#endif -#ifndef _RPTUI_DLGRESID_HRC #include "RptResId.hrc" -#endif -#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" -#endif #include <functional> #include <algorithm> @@ -178,9 +173,8 @@ namespace rptui }; s_pPropertyInfos = aPropertyInfos; - s_nCount = sizeof(aPropertyInfos) / sizeof(OPropertyInfoImpl); - - ::std::sort( aPropertyInfos, aPropertyInfos + s_nCount, PropertyInfoLessByName() ); + s_nCount = SAL_N_ELEMENTS(aPropertyInfos); + ::std::sort( aPropertyInfos, aPropertyInfos + SAL_N_ELEMENTS(aPropertyInfos), PropertyInfoLessByName() ); return s_pPropertyInfos; } @@ -325,9 +319,9 @@ namespace rptui for (; pPropsIter != pPropsEnd; ++pPropsIter) { size_t nPos = 0; - for (; nPos < sizeof(pExcludeProperties)/sizeof(pExcludeProperties[0]) && pExcludeProperties[nPos] != pPropsIter->Name;++nPos ) + for (; nPos < SAL_N_ELEMENTS(pExcludeProperties) && pExcludeProperties[nPos] != pPropsIter->Name;++nPos ) ; - if ( nPos == sizeof(pExcludeProperties)/sizeof(pExcludeProperties[0]) ) + if ( nPos == SAL_N_ELEMENTS(pExcludeProperties) ) _rExcludeProperties.push_back(*pPropsIter); } } @@ -337,3 +331,4 @@ namespace rptui } // namespace pcr //............................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx index c48f31cd02d9..02c1be5dd3a4 100644 --- a/reportdesign/source/ui/misc/ColorListener.cxx +++ b/reportdesign/source/ui/misc/ColorListener.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ #include "precompiled_rptui.hxx" #include "ColorListener.hxx" #include <svl/smplhint.hxx> -#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" -#endif #define BORDERCOLORCHANGE 191 //===================================================================== @@ -101,3 +100,5 @@ void OColorListener::setMarked(sal_Bool _bMark) // ======================================================================= } // ======================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx index 3fc410919548..378a3879b4c7 100644 --- a/reportdesign/source/ui/misc/FunctionHelper.cxx +++ b/reportdesign/source/ui/misc/FunctionHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,7 +58,7 @@ sal_Unicode FunctionManager::getSingleToken(const formula::IFunctionManager::ETo return sal_Unicode('{'); case eArrayClose: return sal_Unicode('}'); - } // switch(_eToken) + } return 0; } // ----------------------------------------------------------------------------- @@ -92,11 +93,6 @@ const formula::IFunctionDescription* FunctionManager::getFunctionByName(const :: // ----------------------------------------------------------------------------- void FunctionManager::fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription*>& /*_rLastRUFunctions*/) const { - //const sal_uInt32 nCount = getCount(); - //for(sal_uInt32 i = 0 ; i < nCount ; ++i) - //{ - // const formula::IFunctionCategory* pCategory = getCategory( - //} } // ----------------------------------------------------------------------------- ::boost::shared_ptr< FunctionDescription > FunctionManager::get(const uno::Reference< report::meta::XFunctionDescription>& _xFunctionDescription) const @@ -117,9 +113,9 @@ void FunctionManager::fillLastRecentlyUsedFunctions(::std::vector< const formula m_aCategoryIndex.push_back( aCategoryFind ); } aFunctionFind = m_aFunctions.insert(TFunctionsMap::value_type(sFunctionName,::boost::shared_ptr<FunctionDescription>(new FunctionDescription(aCategoryFind->second.get(),_xFunctionDescription)))).first; - } // if ( aFind == m_aFunctions.end() ) + } pDesc = aFunctionFind->second; - } // if ( _xFunctionDescription.is() ) + } return pDesc; } // ----------------------------------------------------------------------------- @@ -198,7 +194,7 @@ xub_StrLen FunctionDescription::getSuppressedArgumentCount() const } catch(const uno::Exception&) { - DBG_ERROR("Exception caught!"); + OSL_FAIL("Exception caught!"); } return sFormula; } @@ -255,3 +251,5 @@ bool FunctionDescription::isParameterOptional(sal_uInt32 _nPos) const // ============================================================================= } // rptui // ============================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx index ef3cdad3f331..bbb628903768 100644 --- a/reportdesign/source/ui/misc/RptUndo.cxx +++ b/reportdesign/source/ui/misc/RptUndo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,7 +71,7 @@ namespace _xSection->remove(xShape); --nCount; } - } // if ( _xSection.is() ) + } } //---------------------------------------------------------------------------- void lcl_insertElements(const uno::Reference< report::XSection >& _xSection,const ::std::vector< uno::Reference< drawing::XShape> >& _aControls) @@ -91,7 +92,7 @@ namespace } catch(const uno::Exception&) { - OSL_ENSURE(0,"lcl_insertElements:Exception caught!"); + OSL_FAIL("lcl_insertElements:Exception caught!"); } } } @@ -111,7 +112,7 @@ namespace } catch(const uno::Exception&) { - OSL_ENSURE(0,"lcl_setValues:Exception caught!"); + OSL_FAIL("lcl_setValues:Exception caught!"); } } } @@ -156,7 +157,7 @@ OSectionUndo::~OSectionUndo() } catch(uno::Exception) { - OSL_ENSURE(0,"Exception caught!"); + OSL_FAIL("Exception caught!"); } } } @@ -202,7 +203,7 @@ void OSectionUndo::Undo() } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OSectionUndo::Undo: caught an exception!" ); + OSL_FAIL( "OSectionUndo::Undo: caught an exception!" ); } } //---------------------------------------------------------------------------- @@ -223,7 +224,7 @@ void OSectionUndo::Redo() } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OSectionUndo::Redo: caught an exception!" ); + OSL_FAIL( "OSectionUndo::Redo: caught an exception!" ); } } //---------------------------------------------------------------------------- @@ -359,7 +360,7 @@ void OGroupUndo::implReInsert( ) } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception catched while undoing remove group"); + OSL_FAIL("Exception catched while undoing remove group"); } } //---------------------------------------------------------------------------- @@ -371,7 +372,7 @@ void OGroupUndo::implReRemove( ) } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception catched while redoing remove group"); + OSL_FAIL("Exception catched while redoing remove group"); } } //---------------------------------------------------------------------------- @@ -409,3 +410,4 @@ void OGroupUndo::Redo() //============================================================================ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 0b550481bc2f..6fafee3d07ca 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,6 +38,7 @@ #include <tools/diagnose_ex.h> #include <tools/string.hxx> +#include <sal/macros.h> #include <vcl/svapp.hxx> #include <vcl/window.hxx> @@ -69,6 +71,7 @@ #include <editeng/flstitem.hxx> #include <editeng/akrnitem.hxx> #include <editeng/colritem.hxx> +#include <editeng/justifyitem.hxx> #include <svx/drawitem.hxx> #include <editeng/twolinesitem.hxx> #include <editeng/charreliefitem.hxx> @@ -172,14 +175,14 @@ void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32 ::rtl::OUString sName = String(ModuleRes(RID_STR_GROUPHEADER)); sName += ::rtl::OUString::valueOf(_nPos); _xGroup->getHeader()->setName(sName); - } // if ( _xGroup->getHeaderOn() ) + } if ( _xGroup->getFooterOn() && !_xGroup->getFooter()->getName().getLength() ) { ::rtl::OUString sName = String(ModuleRes(RID_STR_GROUPFOOTER)); sName += ::rtl::OUString::valueOf(_nPos); _xGroup->getFooter()->setName(sName); - } // if ( _xGroup->getHeaderOn() ) + } } // ----------------------------------------------------------------------------- ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> addStyleListener(const uno::Reference< report::XReportDefinition >& _xReportDefinition,::comphelper::OPropertyChangeListener* _pListener) @@ -258,7 +261,7 @@ namespace case COMPLEX: aLocale = _rxReportControlFormat->getCharLocaleComplex(); break; - } // switch(_nWhich) + } _rItemSet.Put(SvxLanguageItem(MsLangId::convertLocaleToLanguageWithFallback(aLocale),_nLanguage)); @@ -285,7 +288,7 @@ namespace pClone->PutValue(_xShape->getPropertyValue(aIt->sName), aIt->nMemberId); _rItemSet.Put(*pClone, aIt->nWID); } - } // if ( xInfo->hasPropertyByName(sPropertyName) ) + } ++aIt; } } @@ -316,11 +319,11 @@ namespace catch(uno::Exception&) { // shapes have a bug so we ignore this one. } - } // if ( pItem ) + } } } ++aIt; - } // while ( pPropertyMap->pName ) + } } // ------------------------------------------------------------------------- void lcl_CharPropertiesToItems( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, @@ -350,7 +353,6 @@ namespace _rItemSet.Put(aUnderLineItem); _rItemSet.Put(SvxKerningItem(_rxReportControlFormat->getCharKerning(),ITEMID_KERNING)); _rItemSet.Put(SvxEmphasisMarkItem(static_cast<FontEmphasisMark>(_rxReportControlFormat->getCharEmphasis()),ITEMID_EMPHASISMARK)); - //_rItemSet.Put(SvxTwoLinesItem()); _rItemSet.Put(SvxCharReliefItem(static_cast<FontRelief>(_rxReportControlFormat->getCharRelief()),ITEMID_CHARRELIEF)); _rItemSet.Put(SvxColorItem(::Color(_rxReportControlFormat->getCharColor()),ITEMID_COLOR)); _rItemSet.Put(SvxCharRotateItem(_rxReportControlFormat->getCharRotation(),sal_False,ITEMID_CHARROTATE)); @@ -359,11 +361,9 @@ namespace SvxHorJustifyItem aHorJustifyItem(ITEMID_HORJUSTIFY); aHorJustifyItem.PutValue(xSet->getPropertyValue(PROPERTY_PARAADJUST),MID_HORJUST_ADJUST); _rItemSet.Put(aHorJustifyItem); - //_rItemSet.Put(SfxInt32Item(ITEMID_DEGREES,_rxReportControlFormat->getCharRotation())); SvxVerJustifyItem aVerJustifyItem(ITEMID_VERJUSTIFY); aVerJustifyItem.PutValue(xSet->getPropertyValue(PROPERTY_VERTICALALIGN),MID_HORJUST_ADJUST); _rItemSet.Put(aVerJustifyItem); - //_rItemSet.Put(SfxInt32Item(ITEMID_IDENT,_rxReportControlFormat->getCharRotation())); uno::Reference< report::XShape> xShape(_rxReportControlFormat,uno::UNO_QUERY); if ( !xShape.is() ) @@ -395,7 +395,7 @@ namespace aNewFont.SetFamily(pFontItem->GetFamily()); aNewFont.SetPitch(pFontItem->GetPitch()); aNewFont.SetCharSet(pFontItem->GetCharSet()); - } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_FONT,sal_True,&pItem) && pItem->ISA(SvxFontItem)) + } if ( SFX_ITEM_SET == _rItemSet.GetItemState( _nFontHeight,sal_True,&pItem) && pItem->ISA(SvxFontHeightItem)) { const SvxFontHeightItem* pFontItem = static_cast<const SvxFontHeightItem*>(pItem); @@ -541,7 +541,7 @@ namespace { const SvxCaseMapItem* pFontItem = static_cast<const SvxCaseMapItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::makeAny( pFontItem->GetValue() ) ); - } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CASEMAP,sal_True,&pItem) && pItem->ISA(SvxCaseMapItem)) + } struct Items { sal_uInt16 nWhich; ::rtl::OUString sPropertyName; @@ -550,7 +550,7 @@ namespace ,{ITEMID_LANGUAGE_ASIAN,PROPERTY_CHARLOCALEASIAN} ,{ITEMID_LANGUAGE_COMPLEX,PROPERTY_CHARLOCALECOMPLEX} }; - for(size_t k = 0; k < sizeof(pItems)/sizeof(pItems[0]);++k) + for(size_t k = 0; k < SAL_N_ELEMENTS(pItems);++k) { if ( SFX_ITEM_SET == _rItemSet.GetItemState( pItems[k].nWhich,sal_True,&pItem) && pItem->ISA(SvxLanguageItem)) { @@ -558,7 +558,7 @@ namespace lang::Locale aCharLocale; MsLangId::convertLanguageToLocale( pFontItem->GetLanguage(), aCharLocale ); lcl_pushBack( _out_rProperties, pItems[k].sPropertyName, uno::makeAny( aCharLocale ) ); - } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_LANGUAGE,sal_True,&pItem) && pItem->ISA(SvxLanguageItem)) + } } if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_ESCAPEMENT,sal_True,&pItem) && pItem->ISA(SvxEscapementItem)) { @@ -638,7 +638,6 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep { SID_ATTR_CHAR_SCALEWIDTH, SFX_ITEM_POOLABLE }, { SID_ATTR_CHAR_RELIEF, SFX_ITEM_POOLABLE }, { SID_ATTR_CHAR_HIDDEN, SFX_ITEM_POOLABLE }, - //{ SID_ATTR_BRUSH_CHAR, SFX_ITEM_POOLABLE }, { SID_ATTR_BRUSH, SFX_ITEM_POOLABLE }, { SID_ATTR_ALIGN_HOR_JUSTIFY, SFX_ITEM_POOLABLE }, { SID_ATTR_ALIGN_VER_JUSTIFY, SFX_ITEM_POOLABLE }, @@ -705,7 +704,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep }; - OSL_ASSERT((sizeof(pDefaults)/sizeof(pDefaults[0])) == (sizeof(aItemInfos)/sizeof(aItemInfos[0]))); + OSL_ASSERT((SAL_N_ELEMENTS(pDefaults)) == (SAL_N_ELEMENTS(aItemInfos))); static sal_uInt16 pRanges[] = { @@ -742,7 +741,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep } SfxItemPool::Free(pPool); - for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i) + for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i) delete pDefaults[i]; return bSuccess; @@ -758,12 +757,6 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R Window* pParent = VCLUnoHelper::GetWindow( _rxParentWindow ); - //static sal_uInt16 pRanges[] = - //{ - // XATTR_START,XATTR_END, - // 0 - //}; - bool bSuccess = false; try { @@ -778,7 +771,7 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R // #i74099# by default, the dialog deletes the current color table if a different one is loaded // (see SwDrawShell::ExecDrawDlg) const SvxColorTableItem* pColorItem = static_cast<const SvxColorTableItem*>( pDescriptor->GetItem(SID_COLOR_TABLE) ); - if (pColorItem && pColorItem->GetColorTable() == XColorTable::GetStdColorTable()) + if (pColorItem && pColorItem->GetColorTable() == &XColorTable::GetStdColorTable()) pDialog->DontDeleteColorTable(); bSuccess = ( RET_OK == pDialog->Execute() ); if ( bSuccess ) @@ -810,14 +803,14 @@ void applyCharacterSettings( const uno::Reference< report::XReportControlFormat aAwtFont.Name = ::rtl::OUString(); // hack to _rxReportControlFormat->setFontDescriptor( aAwtFont ); _rxReportControlFormat->setCharFontName( sTemp ); - } // if ( aSettings.get( "Font" ) >>= aAwtFont ) + } if ( aSettings.get( "FontAsian" ) >>= aAwtFont ) { ::rtl::OUString sTemp = aAwtFont.Name; aAwtFont.Name = ::rtl::OUString(); // hack to _rxReportControlFormat->setFontDescriptorAsian( aAwtFont ); _rxReportControlFormat->setCharFontNameAsian( sTemp ); - } // if ( aSettings.get( "Font" ) >>= aAwtFont ) + } if ( aSettings.get( "FontComplex" ) >>= aAwtFont ) { ::rtl::OUString sTemp = aAwtFont.Name; @@ -894,7 +887,7 @@ SdrObject* isOver(const Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, boo return pOverlappedObj; } // ----------------------------------------------------------------------------- -bool checkArrayForOccurance(SdrObject* _pObjToCheck, SdrUnoObj* _pIgnore[], int _nListLength) +bool checkArrayForOccurrence(SdrObject* _pObjToCheck, SdrUnoObj* _pIgnore[], int _nListLength) { for(int i=0;i<_nListLength;i++) { @@ -915,7 +908,7 @@ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _ while( !pOverlappedObj && (pObjIter = aIter.Next()) != NULL ) { - if (checkArrayForOccurance(pObjIter, _pIgnoreList, _nIgnoreListLength)) + if (checkArrayForOccurrence(pObjIter, _pIgnoreList, _nIgnoreListLength)) { continue; } @@ -996,9 +989,6 @@ void correctOverlapping(SdrObject* _pControl,OReportSection& _aReportSection,boo { OSectionView& rSectionView = _aReportSection.getSectionView(); uno::Reference< report::XReportComponent> xComponent(_pControl->getUnoShape(),uno::UNO_QUERY); - // Rectangle aRet(VCLPoint(xComponent->getPosition()),VCLSize(xComponent->getSize())); - // aRet.setHeight(aRet.getHeight() + 1); - // aRet.setWidth(aRet.getWidth() + 1); Rectangle aRect = getRectangleFromControl(_pControl); bool bOverlapping = true; @@ -1034,7 +1024,6 @@ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula OSL_PRECOND( _xInspectorWindow.is(), "openDialogFormula_nothrow: invalid parameters!" ); if ( !_xInspectorWindow.is() ) return false; - // _out_rFormula = ::rtl::OUString(); bool bSuccess = false; ::dbtools::SQLExceptionInfo aErrorInfo; uno::Reference< awt::XWindow > xInspectorWindow; @@ -1068,7 +1057,7 @@ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula catch (sdbc::SQLException& e) { aErrorInfo = e; } catch( const uno::Exception& ) { - OSL_ENSURE( sal_False, "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" ); + OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" ); } if ( aErrorInfo.isValid() ) @@ -1079,3 +1068,5 @@ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula // ----------------------------------------------------------------------------- } // namespace rptui // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/misc/rptuiservices.cxx b/reportdesign/source/ui/misc/rptuiservices.cxx index 6fa50956bc8f..bd97ae04a6bc 100644 --- a/reportdesign/source/ui/misc/rptuiservices.cxx +++ b/reportdesign/source/ui/misc/rptuiservices.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,3 +81,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron { *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx index f166e3759378..7a5c58d24ec2 100644 --- a/reportdesign/source/ui/misc/statusbarcontroller.cxx +++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,7 @@ #include <vcl/svapp.hxx> #include <vcl/status.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <toolkit/helper/vclunohelper.hxx> namespace rptui @@ -93,7 +94,7 @@ OStatusbarController::OStatusbarController(const Reference< XMultiServiceFactory void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException) { StatusbarController::initialize(_rArguments); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); StatusBar* pStatusBar = static_cast<StatusBar*>(VCLUnoHelper::GetWindow(m_xParentWindow)); @@ -109,11 +110,11 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen break; } } - if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") ) + if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ZoomSlider")) ) { m_pController = TStatusbarHelper::createFromQuery(new SvxZoomSliderControl(m_nSlotId = SID_ATTR_ZOOMSLIDER,m_nId,*pStatusBar)); - } // if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") ) - else if ( m_aCommandURL.equalsAscii(".uno:Zoom") ) + } + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Zoom")) ) { m_pController = TStatusbarHelper::createFromQuery(new SvxZoomStatusBarControl(m_nSlotId = SID_ATTR_ZOOM,m_nId,*pStatusBar)); } @@ -131,12 +132,12 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen // XStatusListener void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEvent)throw ( RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard(m_aMutex); if ( m_pController.is() ) { - if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") ) + if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ZoomSlider")) ) { Sequence< PropertyValue > aSeq; if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 2 ) @@ -145,8 +146,8 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv 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") ) + } + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Zoom")) ) { Sequence< PropertyValue > aSeq; if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 3 ) @@ -228,3 +229,5 @@ void SAL_CALL OStatusbarController::dispose() throw (::com::sun::star::uno::Runt // ============================================================================= } // rptui // ============================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index 5d34c159c84e..ec03a4d89710 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,7 +43,7 @@ #include <svtools/miscopt.hxx> #include <unotools/moduleoptions.hxx> #include <svtools/menuoptions.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <svx/svxids.hrc> #define ITEMID_COLOR 1 #define ITEMID_BRUSH 2 @@ -142,7 +143,7 @@ void SAL_CALL OToolboxController::release() throw () void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException) { ToolboxController::initialize(_rArguments); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent())); @@ -158,42 +159,42 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments break; } } - if ( m_aCommandURL.equalsAscii(".uno:BasicShapes") ) + if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:BasicShapes")) ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:BasicShapes")),sal_True)); m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_BASIC,m_nToolBoxId,*pToolBox)); } - else if ( m_aCommandURL.equalsAscii(".uno:SymbolShapes") ) + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:SymbolShapes")) ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SymbolShapes")),sal_True)); m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_SYMBOL,m_nToolBoxId,*pToolBox)); } - else if ( m_aCommandURL.equalsAscii(".uno:ArrowShapes") ) + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ArrowShapes")) ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:ArrowShapes")),sal_True)); m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_ARROW,m_nToolBoxId,*pToolBox)); } - else if ( m_aCommandURL.equalsAscii(".uno:FlowChartShapes") ) + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:FlowChartShapes")) ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FlowChartShapes")),sal_True)); m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_FLOWCHART,m_nToolBoxId,*pToolBox)); } - else if ( m_aCommandURL.equalsAscii(".uno:CalloutShapes") ) + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CalloutShapes")) ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CalloutShapes")),sal_True)); m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_CALLOUT,m_nToolBoxId,*pToolBox)); } - else if ( m_aCommandURL.equalsAscii(".uno:StarShapes") ) + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:StarShapes")) ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:StarShapes")),sal_True)); m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_STAR,m_nToolBoxId,*pToolBox)); } - else if ( m_aCommandURL.equalsAscii(".uno:CharFontName") ) + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CharFontName")) ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CharFontName")),sal_True)); m_pToolbarController = TToolbarHelper::createFromQuery(new SvxFontNameToolBoxControl/*SvxStyleToolBoxControl*/(m_nSlotId = SID_ATTR_CHAR_FONT,m_nToolBoxId,*pToolBox)); } - else if ( m_aCommandURL.equalsAscii(".uno:FontColor") || m_aCommandURL.equalsAscii(".uno:Color") ) + else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:FontColor")) || m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Color")) ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FontColor")),sal_True)); m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Color")),sal_True)); @@ -288,7 +289,7 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw (RuntimeException) { // execute the menu - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); Reference< awt::XWindow > xRet; @@ -305,7 +306,7 @@ Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw // ----------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OToolboxController::getSubToolbarName() throw (uno::RuntimeException) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY); if ( xSub.is() ) @@ -315,7 +316,7 @@ Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw // ----------------------------------------------------------------------------- void SAL_CALL OToolboxController::functionSelected( const ::rtl::OUString& rCommand ) throw (uno::RuntimeException) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY); @@ -327,7 +328,7 @@ void SAL_CALL OToolboxController::functionSelected( const ::rtl::OUString& rComm // ----------------------------------------------------------------------------- void SAL_CALL OToolboxController::updateImage( ) throw (uno::RuntimeException) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY); @@ -358,3 +359,4 @@ throw (uno::RuntimeException) //.......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 9b0d171aa6a1..4e9f88f30a98 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -170,14 +171,11 @@ ODesignView::ODesignView( Window* pParent, // now create the task pane on the right side :-) m_pTaskPane = new OTaskWindow(this); - //m_pTaskPane->Show(); m_aSplitWin.InsertItem( COLSET_ID,100,SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE | SWIB_COLSET ); - m_aSplitWin.InsertItem( REPORT_ID, &m_aScrollWindow, 100/*m_aScrollWindow.getMaxMarkerWidth(sal_False)*/, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE /*SWIB_COLSET*/); - //m_aSplitWin.InsertItem( TASKPANE_ID, m_pTaskPane, 50, SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE ); + m_aSplitWin.InsertItem( REPORT_ID, &m_aScrollWindow, 100, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE); // Splitter einrichten - //m_aSplitter.SetSplitHdl(LINK(this, ODesignView,SplitHdl)); m_aSplitWin.SetSplitHdl(LINK(this, ODesignView,SplitHdl)); m_aSplitWin.ShowAutoHideButton(); m_aSplitWin.SetAlign(WINDOWALIGN_LEFT); @@ -295,7 +293,7 @@ void ODesignView::resizeDocumentView(Rectangle& _rPlayground) nSplitPos = static_cast<sal_Int32>(_rPlayground.Right() - nMinWidth); getController().setSplitPos(nSplitPos); } - } // if ( 0 != _rPlaygroundSize.Width() ) + } Size aReportWindowSize(aPlaygroundSize); if ( m_aSplitWin.IsItemValid(TASKPANE_ID) ) @@ -474,11 +472,7 @@ void ODesignView::GetFocus() // ----------------------------------------------------------------------------- void ODesignView::ImplInitSettings() { -//#if OSL_DEBUG_LEVEL > 0 -// SetBackground( Wallpaper( COL_RED )); -//#else SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() )); -//#endif SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() ); SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() ); } @@ -531,12 +525,10 @@ void ODesignView::togglePropertyBrowser(sal_Bool _bToogleOn) m_pTaskPane->Invalidate(); if ( bWillBeVisible ) - m_aSplitWin.InsertItem( TASKPANE_ID, m_pTaskPane,START_SIZE_TASKPANE, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE/*|SWIB_COLSET */); + m_aSplitWin.InsertItem( TASKPANE_ID, m_pTaskPane,START_SIZE_TASKPANE, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE); else m_aSplitWin.RemoveItem(TASKPANE_ID); - // TRY - // Invalidate(/*INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE*/); if ( bWillBeVisible ) m_aMarkTimer.Start(); } @@ -620,12 +612,6 @@ uno::Reference< report::XSection > ODesignView::getCurrentSection() const if ( m_pCurrentView ) xSection = m_pCurrentView->getReportSection()->getSection(); - // why do we need the code below? - //else - // { - // OReportController& rReportController = getController(); - // xSection = rReportController.getReportDefinition()->getDetail(); - // } return xSection; } // ----------------------------------------------------------------------------- @@ -679,14 +665,6 @@ void ODesignView::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlig { m_aScrollWindow.alignMarkedObjects(_nControlModification, _bAlignAtSection,bBoundRects); } -#if 0 -// ----------------------------------------------------------------------------- -sal_Bool ODesignView::isAlignPossible() const -{ - ::boost::shared_ptr<OSectionWindow> pMarkedSection = getMarkedSection(); - return pMarkedSection.get() && pMarkedSection->getReportSection().getSectionView().IsAlignPossible(); -} -#endif //------------------------------------------------------------------------------ sal_Bool ODesignView::handleKeyEvent(const KeyEvent& _rEvent) { @@ -787,3 +765,5 @@ sal_uInt16 ODesignView::getZoomFactor(SvxZoomType _eType) const //============================================================================ } // rptui //============================================================================ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index e8fb14a0eeb7..e07111c8ab1b 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,5 @@ void OEndMarker::MouseButtonDown( const MouseEvent& rMEvt ) // ======================================================================= } // ======================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx index f938fcda0a36..2233d8b9037d 100644 --- a/reportdesign/source/ui/report/FixedTextColor.cxx +++ b/reportdesign/source/ui/report/FixedTextColor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,69 +69,6 @@ namespace rptui } //-------------------------------------------------------------------- - // sal_Int32 FixedTextColor::getTextColor() - // { - // const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings(); - // sal_Bool bHighContrast = aStyleSettings.GetHighContrastMode(); - // - // Color aGetFaceColor = aStyleSettings.GetFaceColor(); - // Color aGetCheckedColor = aStyleSettings.GetCheckedColor(); - // Color aGetLightColor = aStyleSettings.GetLightColor(); - // Color aGetLightBorderColor = aStyleSettings.GetLightBorderColor(); - // Color aGetShadowColor = aStyleSettings.GetShadowColor(); - // Color aGetDarkShadowColor = aStyleSettings.GetDarkShadowColor(); - // Color aGetButtonTextColor = aStyleSettings.GetButtonTextColor(); - // Color aGetButtonRolloverTextColor = aStyleSettings.GetButtonRolloverTextColor(); - // Color aGetRadioCheckTextColor = aStyleSettings.GetRadioCheckTextColor(); - // Color aGetGroupTextColor = aStyleSettings.GetGroupTextColor(); - // Color aGetLabelTextColor = aStyleSettings.GetLabelTextColor(); - // Color aGetInfoTextColor = aStyleSettings.GetInfoTextColor(); - // Color aGetWindowColor = aStyleSettings.GetWindowColor(); - // Color aGetWindowTextColor = aStyleSettings.GetWindowTextColor(); - // Color aGetDialogColor = aStyleSettings.GetDialogColor(); - // Color aGetDialogTextColor = aStyleSettings.GetDialogTextColor(); - // Color aGetWorkspaceColor = aStyleSettings.GetWorkspaceColor(); - // Color aGetFieldColor = aStyleSettings.GetFieldColor(); - // Color aGetFieldTextColor = aStyleSettings.GetFieldTextColor(); - // Color aGetFieldRolloverTextColor = aStyleSettings.GetFieldRolloverTextColor(); - // Color aGetActiveColor = aStyleSettings.GetActiveColor(); - // Color aGetActiveColor2 = aStyleSettings.GetActiveColor2(); - // Color aGetActiveTextColor = aStyleSettings.GetActiveTextColor(); - // Color aGetActiveBorderColor = aStyleSettings.GetActiveBorderColor(); - // Color aGetDeactiveColor = aStyleSettings.GetDeactiveColor(); - // Color aGetDeactiveColor2 = aStyleSettings.GetDeactiveColor2(); - // Color aGetDeactiveTextColor = aStyleSettings.GetDeactiveTextColor(); - // Color aGetDeactiveBorderColor = aStyleSettings.GetDeactiveBorderColor(); - // Color aGetHighlightColor = aStyleSettings.GetHighlightColor(); - // Color aGetHighlightTextColor = aStyleSettings.GetHighlightTextColor(); - // Color aGetDisableColor = aStyleSettings.GetDisableColor(); - // Color aGetHelpColor = aStyleSettings.GetHelpColor(); - // Color aGetHelpTextColor = aStyleSettings.GetHelpTextColor(); - // Color aGetMenuColor = aStyleSettings.GetMenuColor(); - // Color aGetMenuBarColor = aStyleSettings.GetMenuBarColor(); - // Color aGetMenuBorderColor = aStyleSettings.GetMenuBorderColor(); - // Color aGetMenuTextColor = aStyleSettings.GetMenuTextColor(); - // Color aGetMenuHighlightColor = aStyleSettings.GetMenuHighlightColor(); - // Color aGetMenuHighlightTextColor = aStyleSettings.GetMenuHighlightTextColor(); - // Color aGetLinkColor = aStyleSettings.GetLinkColor(); - // Color aGetVisitedLinkColor = aStyleSettings.GetVisitedLinkColor(); - // Color aGetHighlightLinkColor = aStyleSettings.GetHighlightLinkColor(); - // Color aGetMonoColor = aStyleSettings.GetMonoColor(); - // Color aGetActiveTabColor = aStyleSettings.GetActiveTabColor(); - // Color aGetInactiveTabColor = aStyleSettings.GetInactiveTabColor(); - // - // Color aWindowColor = aStyleSettings.GetWindowColor(); - // Color aLabelColor = aStyleSettings.GetLabelTextColor(); - // - // // if (m_nTextColor == -1) - // // { - // // svtools::ExtendedColorConfig aConfig; - // // m_nTextColor = aConfig.GetColorValue(CFG_REPORTDESIGNER, DBTEXTBOXBOUNDCONTENT).getColor(); - // // } - // return aLabelColor.GetColor(); - // } - - //-------------------------------------------------------------------- FixedTextColor::~FixedTextColor() { DBG_DTOR(rpt_FixedTextColor,NULL); @@ -139,7 +77,6 @@ namespace rptui void FixedTextColor::notifyPropertyChange( const beans::PropertyChangeEvent& _rEvent ) { - // (void)_rEvent; uno::Reference< report::XFixedText > xFixedText( _rEvent.Source, uno::UNO_QUERY ); if ( ! xFixedText.is() ) { @@ -150,11 +87,8 @@ namespace rptui { uno::Reference< lang::XComponent > xComponent( xFixedText, uno::UNO_QUERY_THROW ); handle(xComponent); - // uno::Reference<awt::XVclWindowPeer> xVclWindowPeer = getVclWindowPeer(xComponent); - - // setPropertyTextColor(xVclWindowPeer, getTextColor()); } - catch (uno::Exception e) + catch (uno::Exception const&) { DBG_UNHANDLED_EXCEPTION(); } @@ -175,7 +109,6 @@ namespace rptui // ----------------------------------------------------------------------------- void FixedTextColor::handle( const uno::Reference< uno::XInterface >& _rxElement ) { - // (void) _rxElement; uno::Reference< report::XFixedText > xFixedText( _rxElement, uno::UNO_QUERY ); if ( ! xFixedText.is() ) { @@ -281,3 +214,5 @@ namespace rptui } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index 95b8f0e1a2bc..0fee41855ee7 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -149,7 +150,7 @@ namespace rptui // ----------------------------------------------------------------------------- void FormattedFieldBeautifier::notifyPropertyChange( const beans::PropertyChangeEvent& _rEvent ) { - if ( !_rEvent.PropertyName.equalsAscii( "DataField" ) ) + if ( !_rEvent.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DataField" ) ) ) // not interested in return; @@ -186,7 +187,6 @@ namespace rptui OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObject); if ( pUnoObj ) // this doesn't need to be done for shapes { - // Rectangle aRect = pUnoObj->GetCurrentBoundRect(); ::boost::shared_ptr<OSectionWindow> pSectionWindow = m_rReportController.getSectionWindow(xSection); if (pSectionWindow != NULL) { @@ -201,3 +201,5 @@ namespace rptui return xVclWindowPeer; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index c50a388922f3..df3881327ded 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -144,7 +145,7 @@ #include <unotools/syslocale.hxx> #include <unotools/viewoptions.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include "PropertyForward.hxx" #include "SectionWindow.hxx" @@ -197,11 +198,11 @@ namespace { bool operator() (const beans::PropertyValue& x, const ::rtl::OUString& y) const { - return x.Name.equals(y);// ? true : false; + return x.Name.equals(y); } bool operator() (const ::rtl::OUString& x,const beans::PropertyValue& y) const { - return x.equals(y.Name);// ? true : false; + return x.equals(y.Name); } }; @@ -224,16 +225,16 @@ namespace aFontDescriptor.Underline = awt::FontUnderline::SINGLE - aFontDescriptor.Underline; break; default: - OSL_ENSURE(0,"Illegal value in default!"); + OSL_FAIL("Illegal value in default!"); break; } _xReportControlFormat->setFontDescriptor(aFontDescriptor); } - catch(beans::UnknownPropertyException&) + catch(const beans::UnknownPropertyException&) { } - } // if ( xReportControlFormat.is() ) + } } } @@ -345,7 +346,7 @@ void OReportController::disposing() m_pClipbordNotifier->AddRemoveListener( getView(), sal_False ); m_pClipbordNotifier->release(); m_pClipbordNotifier = NULL; - } // if ( getView() && m_pClipbordNotifier ) + } if ( m_pGroupsFloater ) { SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_GROUPS_SORTING ) ); @@ -362,9 +363,9 @@ void OReportController::disposing() ::comphelper::disposeComponent( m_xRowSetMediator ); ::comphelper::disposeComponent( m_xFormatter ); } - catch(uno::Exception&) + catch(const uno::Exception&) { - OSL_ENSURE(0,"Exception caught while disposing row sets."); + OSL_FAIL("Exception caught while disposing row sets."); } m_xRowSet.clear(); m_xRowSetMediator.clear(); @@ -384,7 +385,7 @@ void OReportController::disposing() m_pReportControllerObserver->Clear(); m_pReportControllerObserver->release(); } - catch ( const uno::Exception& ) + catch(const uno::Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -405,7 +406,7 @@ void OReportController::disposing() m_xFrameLoader.clear(); m_xReportEngine.clear(); } - catch(uno::Exception&) + catch(const uno::Exception&) { } if ( getDesignView() ) @@ -483,7 +484,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_OBJECT_SMALLESTHEIGHT: case SID_OBJECT_GREATESTWIDTH: case SID_OBJECT_GREATESTHEIGHT: - aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();// && getDesignView()->isAlignPossible(); + aReturn.bEnabled = isEditable() && getDesignView()->HasSelection(); if ( aReturn.bEnabled ) aReturn.bEnabled = m_nSelectionCount > 1; break; @@ -545,7 +546,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_SECTION_ALIGN_UP: case SID_SECTION_ALIGN_MIDDLE: case SID_SECTION_ALIGN_DOWN: - aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();// && getDesignView()->isAlignPossible(); + aReturn.bEnabled = isEditable() && getDesignView()->HasSelection(); break; case SID_CUT: aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(_nId); @@ -826,7 +827,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const const uno::Reference< report::XReportControlModel> xControlModel(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY); aReturn.bEnabled = !xControlModel.is(); } - catch(beans::UnknownPropertyException&) + catch(const beans::UnknownPropertyException&) { } else @@ -860,7 +861,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const break; default: ; - } // switch(_nCommand) + } } break; case SID_ATTR_CHAR_COLOR: @@ -905,7 +906,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_CENTER; break; } - } // if ( aReturn.aValue >>= nParaAdjust ) + } aReturn.aValue.clear(); } break; @@ -915,7 +916,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const break; case SID_CHAR_DLG: case SID_SETCONTROLDEFAULTS: - aReturn.bEnabled = m_xReportDefinition.is() && isEditable();// && getDesignView()->getCurrentControlModel().is(); + aReturn.bEnabled = m_xReportDefinition.is() && isEditable(); if ( aReturn.bEnabled ) { ::std::vector< uno::Reference< uno::XInterface > > aSelection; @@ -952,7 +953,6 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const 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); } break; case SID_ATTR_ZOOMSLIDER: @@ -964,7 +964,6 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const aZoomSlider.AddSnappingPoint(100); aZoomSlider.AddSnappingPoint(200); aZoomSlider.QueryValue(aReturn.aValue); - //aReturn.sTitle = ::rtl::OUString::valueOf((sal_Int32)m_nZoomValue); } break; default: @@ -1000,7 +999,7 @@ namespace // ----------------------------------------------------------------------------- void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); sal_Bool bForceBroadcast = sal_False; @@ -1158,7 +1157,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > select(uno::makeAny(m_xReportDefinition)); break; case SID_EXECUTE_REPORT: - /*m_nExecuteReportEvent = */getView()->PostUserEvent(LINK(this, OReportController,OnExecuteReport)); + getView()->PostUserEvent(LINK(this, OReportController,OnExecuteReport)); break; case SID_RPT_NEW_FUNCTION: createNewFunction(aArgs[0].Value); @@ -1390,7 +1389,6 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > case SID_DRAWTBX_CS_STAR: sType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("star5")); break; - case SID_DRAWTBX_CS_BASIC: default: sType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diamond")); } @@ -1495,7 +1493,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > if ( aArgs[0].Value >>= aFont ) { impl_setPropertyAtControls_throw(RID_STR_UNDO_CHANGEFONT,PROPERTY_CHARFONTNAME,uno::makeAny(aFont.Name),aArgs); - } // if ( aArgs[0].Value >>= aFont ) + } } break; case SID_ATTR_CHAR_FONTHEIGHT: @@ -1526,7 +1524,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > case SID_ATTR_PARA_ADJUST_BLOCK: eParagraphAdjust = style::ParagraphAdjust_BLOCK; break; - } // switch(_nId) + } impl_setPropertyAtControls_throw(RID_STR_UNDO_ALIGNMENT,PROPERTY_PARAADJUST,uno::makeAny(eParagraphAdjust),aArgs); InvalidateFeature(SID_ATTR_PARA_ADJUST_LEFT); @@ -1593,7 +1591,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > } else createDateTime(aArgs); - } // if ( m_xReportDefinition.is() ) + } break; case SID_INSERT_FLD_PGNUMBER: if ( m_xReportDefinition.is() ) @@ -1605,7 +1603,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > } else createPageNumber(aArgs); - } // if ( m_xReportDefinition.is() ) + } break; case SID_EXPORTDOC: case SID_EXPORTDOCASPDF: @@ -1631,7 +1629,6 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > } } setEditable(!isEditable()); - //getJoinView()->setReadOnly(!isEditable()); InvalidateAll(); return; case SID_GROUP: @@ -1641,17 +1638,17 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { openZoomDialog(); } - else if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAscii("Zoom") ) + else if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("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; case SID_ATTR_ZOOMSLIDER: - if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAscii("ZoomSlider") ) + if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ZoomSlider")) ) { SvxZoomSliderItem aZoomSlider; aZoomSlider.PutValue(aArgs[0].Value); @@ -1686,7 +1683,6 @@ void OReportController::impl_initialize( ) { if ( m_xReportDefinition.is() ) { - //m_sName = m_xReportDefinition->getName(); getView()->initialize(); // show the windows and fill with our informations m_aReportModel = reportdesign::OReportDefinition::getSdrModel(m_xReportDefinition); @@ -1698,7 +1694,7 @@ void OReportController::impl_initialize( ) UndoSuppressor aSuppressUndo( getUndoManager() ); ::comphelper::NamedValueCollection aArgs(getModel()->getArgs()); - setMode(aArgs.getOrDefault("Mode", rtl::OUString::createFromAscii("normal"))); + setMode(aArgs.getOrDefault("Mode", ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal")))); listen(true); setEditable( !m_aReportModel->IsReadOnly() ); @@ -1720,11 +1716,11 @@ void OReportController::impl_initialize( ) m_xReportDefinition->setCommand(aNames[0]); m_xReportDefinition->setCommandType(sdb::CommandType::TABLE); } - } // if ( !sHierarchicalDocumentName.getLength() && getConnection().is() ) + } m_aVisualAreaSize = m_xReportDefinition->getVisualAreaSize(0); - } // if ( m_xReportDefinition.is() ) + } // check if chart is supported by the engine checkChartEnabled(); @@ -1762,7 +1758,7 @@ void OReportController::impl_initialize( ) getDesignView()->setCurrentPage(m_sLastActivePage); uno::Sequence< beans::PropertyValue> aArgs; executeUnChecked(SID_SELECT_REPORT,aArgs); - } // if ( m_bShowProperties && m_nPageNum == -1 ) + } setModified(sal_False); // and we are not modified yet @@ -1778,7 +1774,6 @@ void OReportController::impl_initialize( ) // ----------------------------------------------------------------------------- IMPL_LINK( OReportController, OnOpenHelpAgent, void* ,/*_pMemfun*/) { - //m_nExecuteReportEvent = 0; doOpenHelpAgent(); return 0L; } @@ -1800,10 +1795,8 @@ void OReportController::doOpenHelpAgent() { if (getFrame().is()) { - rtl::OUString suURL = rtl::OUString::createFromAscii("vnd.sun.star.help://shared/text/shared/explorer/database/rep_main.xhp?UseDB=no&DbPAR=swriter"); + rtl::OUString suURL(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.help://shared/text/shared/explorer/database/rep_main.xhp?UseDB=no&DbPAR=swriter")); openHelpAgent(suURL); - // openHelpAgent(68245 /* HID_REPORT_DESIGN... UNKNOWN */ ); - // HID_APP_REPORT_TREE } else { @@ -1826,7 +1819,6 @@ sal_Bool OReportController::Construct(Window* pParent) m_pClipbordNotifier->AddRemoveListener( getView(), sal_True ); OReportController_BASE::Construct(pParent); - //getView()->Show(); return sal_True; } // ----------------------------------------------------------------------------- @@ -1835,7 +1827,7 @@ sal_Bool SAL_CALL OReportController::suspend(sal_Bool /*_bSuspend*/) throw( Runt if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed ) return sal_True; - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) @@ -1854,7 +1846,6 @@ void OReportController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:Redo", SID_REDO, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:Undo", SID_UNDO, CommandGroup::EDIT ); - //implDescribeSupportedFeature( ".uno:PasteSpecial", SID_PASTE, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:SelectAll", SID_SELECTALL, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:SelectAllInSection", SID_SELECTALL_IN_SECTION, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:Delete", SID_DELETE, CommandGroup::EDIT ); @@ -1868,13 +1859,11 @@ void OReportController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:AddField", SID_FM_ADD_FIELD, CommandGroup::VIEW ); implDescribeSupportedFeature( ".uno:ReportNavigator", SID_RPT_SHOWREPORTEXPLORER, CommandGroup::VIEW ); implDescribeSupportedFeature( ".uno:ControlProperties", SID_SHOW_PROPERTYBROWSER, CommandGroup::VIEW ); - //implDescribeSupportedFeature( ".uno:SwitchControlDesignMode", SID_FM_DESIGN_MODE, CommandGroup::VIEW ); implDescribeSupportedFeature( ".uno:DbSortingAndGrouping", SID_SORTINGANDGROUPING, CommandGroup::VIEW ); implDescribeSupportedFeature( ".uno:PageHeaderFooter", SID_PAGEHEADERFOOTER, CommandGroup::VIEW ); implDescribeSupportedFeature( ".uno:ReportHeaderFooter", SID_REPORTHEADERFOOTER, CommandGroup::VIEW ); implDescribeSupportedFeature( ".uno:ZoomSlider", SID_ATTR_ZOOMSLIDER, CommandGroup::VIEW ); implDescribeSupportedFeature( ".uno:Zoom", SID_ATTR_ZOOM, CommandGroup::VIEW ); - //implDescribeSupportedFeature( ".uno:SwitchControlDesignMode", SID_FM_DESIGN_MODE, CommandGroup::VIEW ); implDescribeSupportedFeature( ".uno:ConditionalFormatting", SID_CONDITIONALFORMATTING, CommandGroup::FORMAT ); implDescribeSupportedFeature( ".uno:PageDialog", SID_PAGEDIALOG, CommandGroup::FORMAT ); @@ -2118,7 +2107,7 @@ void OReportController::impl_onModifyChanged() m_xReportDefinition->setModified( impl_isModified() ); DBSubComponentController::impl_onModifyChanged(); } - catch(uno::Exception) + catch(const uno::Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2138,12 +2127,12 @@ void OReportController::onLoadedMenu(const Reference< frame::XLayoutManager >& _ ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/resizebar")) ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/sectionshrinkbar")) }; - for (size_t i = 0; i< sizeof(s_sMenu)/sizeof(s_sMenu[0]); ++i) + for (size_t i = 0; i< SAL_N_ELEMENTS(s_sMenu); ++i) { _xLayoutManager->createElement( s_sMenu[i] ); _xLayoutManager->requestElement( s_sMenu[i] ); } - } // if ( _xLayoutManager.is() ) + } } // ----------------------------------------------------------------------------- void OReportController::notifyGroupSections(const ContainerEvent& _rEvent,bool _bShow) @@ -2151,7 +2140,7 @@ void OReportController::notifyGroupSections(const ContainerEvent& _rEvent,bool _ uno::Reference< report::XGroup> xGroup(_rEvent.Element,uno::UNO_QUERY); if ( xGroup.is() ) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); sal_Int32 nGroupPos = 0; _rEvent.Accessor >>= nGroupPos; @@ -2207,14 +2196,14 @@ void SAL_CALL OReportController::elementRemoved( const ContainerEvent& _rEvent ) // ----------------------------------------------------------------------------- void SAL_CALL OReportController::elementReplaced( const ContainerEvent& /*_rEvent*/ ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); - OSL_ENSURE(0,"Not yet implemented!"); + OSL_FAIL("Not yet implemented!"); } // ----------------------------------------------------------------------------- void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEvent& evt ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); try { @@ -2289,7 +2278,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven /// TODO: check what we need to notify here TitleHelper /*else if ( evt.PropertyName.equals( PROPERTY_CAPTION ) ) updateTitle();*/ - } // if ( evt.Source == m_xReportDefinition ) + } else { uno::Reference< report::XGroup> xGroup(evt.Source,uno::UNO_QUERY); @@ -2335,7 +2324,6 @@ sal_uInt16 lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>& // ----------------------------------------------------------------------------- void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGroup,const ::rtl::OUString& _sPropName,sal_Int32 _nGroupPos,bool _bShow) { - //adjustSectionName(_xGroup,_nGroupPos); ::std::mem_fun_t<sal_Bool,OGroupHelper> pMemFun = ::std::mem_fun(&OGroupHelper::getHeaderOn); ::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> pMemFunSection = ::std::mem_fun(&OGroupHelper::getHeader); ::rtl::OUString sColor(DBGROUPHEADER); @@ -2486,7 +2474,6 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ const SfxPoolItem* pItem = NULL; if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_SIZE,sal_True,&pItem)) { - const Size aPaperSize = static_cast<const SvxSizeItem*>(pItem)->GetSize(); uno::Any aValue; static_cast<const SvxSizeItem*>(pItem)->QueryValue(aValue,MID_SIZE_SIZE); xProp->setPropertyValue(PROPERTY_PAPERSIZE,aValue); @@ -2526,13 +2513,13 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ } } } - catch(Exception&) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } SfxItemPool::Free(pPool); - for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i) + for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i) delete pDefaults[i]; } @@ -2634,7 +2621,6 @@ void OReportController::shrinkSectionBottom(uno::Reference<report::XSection> _xS return; } const sal_Int32 nSectionHeight = _xSection->getHeight(); - // sal_Int32 nMinPositionY = nSectionHeight; sal_Int32 nMaxPositionY = 0; uno::Reference< report::XReportComponent> xReportComponent; @@ -2645,7 +2631,6 @@ void OReportController::shrinkSectionBottom(uno::Reference<report::XSection> _xS const sal_Int32 nReportComponentPositionY = xReportComponent->getPositionY(); const sal_Int32 nReportComponentHeight = xReportComponent->getHeight(); const sal_Int32 nReportComponentPositionYAndHeight = nReportComponentPositionY + nReportComponentHeight; - // nMinPositionY = std::min(nReportComponentPositionY, nMinPositionY); nMaxPositionY = std::max(nReportComponentPositionYAndHeight, nMaxPositionY); } // now we know the minimal Y-Position and maximal Y-Position @@ -2669,7 +2654,6 @@ void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSect const sal_Int32 nSectionHeight = _xSection->getHeight(); sal_Int32 nMinPositionY = nSectionHeight; - // sal_Int32 nMaxPositionY = 0; uno::Reference< report::XReportComponent> xReportComponent; // for every component get it's Y-position and compare it to the current Y-position @@ -2677,10 +2661,7 @@ void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSect { xReportComponent.set(_xSection->getByIndex(i), uno::UNO_QUERY); const sal_Int32 nReportComponentPositionY = xReportComponent->getPositionY(); - // const sal_Int32 nReportComponentHeight = xReportComponent->getHeight(); - // const sal_Int32 nReportComponentPositionYAndHeight = nReportComponentPositionY + nReportComponentHeight; nMinPositionY = std::min(nReportComponentPositionY, nMinPositionY); - // nMaxPositionY = std::max(nReportComponentPositionYAndHeight, nMaxPositionY); } // now we know the minimal Y-Position and maximal Y-Position if (nMinPositionY == 0) @@ -2742,7 +2723,7 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept }; ::comphelper::NamedValueCollection aCommandProperties; - for ( size_t i=0; i < sizeof( nCommandIDs ) / sizeof( nCommandIDs[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS(nCommandIDs); ++i ) { const FeatureState aFeatureState = GetState( nCommandIDs[i] ); @@ -2785,8 +2766,8 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept if ( pSectionWindow.get() ) { aViewData.put( "MarkedSection", (sal_Int32)pSectionWindow->getReportSection().getPage()->GetPageNum() ); - } // if ( pSectionWindow.get() ) - } // if ( getDesignView() ) + } + } aViewData.put( "ZoomFactor", m_nZoomValue ); return uno::makeAny( aViewData.getPropertyValues() ); @@ -2850,7 +2831,7 @@ void SAL_CALL OReportController::restoreViewData(const uno::Any& i_data) throw( } } } - catch ( const IllegalArgumentException& e ) + catch(const IllegalArgumentException&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2942,7 +2923,7 @@ uno::Reference<frame::XModel> OReportController::executeReport() Reference<XFrame> xFrame = getXFrame(); xModel = m_xReportEngine->createDocumentAlive(xFrame); } - catch( const sdbc::SQLException& /*e*/ ) + catch(const sdbc::SQLException&) { // SQLExceptions and derived exceptions must not be translated aInfo = ::cppu::getCaughtException(); } @@ -2980,7 +2961,7 @@ uno::Reference<frame::XModel> OReportController::executeReport() { const String suSQLContext = String( ModuleRes( RID_STR_COULD_NOT_CREATE_REPORT ) ); aInfo.prepend(suSQLContext); - } // if (aInfo.isValid()) + } m_bInGeneratePreview = false; } @@ -3023,7 +3004,7 @@ uno::Reference< sdbc::XRowSet > OReportController::getRowSet() m_xRowSetMediator = new OPropertyMediator( m_xReportDefinition.get(), xRowSetProp, aPropertyMediation ); m_xRowSet = xRowSet; } - catch( const uno::Exception& ) + catch(const uno::Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3058,7 +3039,7 @@ void OReportController::insertGraphic() createControl(aArgs,xSection,::rtl::OUString(),OBJ_DLG_IMAGECONTROL); } } - catch(Exception&) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3144,7 +3125,6 @@ void OReportController::createNewFunction(const uno::Any& _aValue) // ----------------------------------------------------------------------------- IMPL_LINK( OReportController, OnExecuteReport, void* ,/*_pMemfun*/) { - //m_nExecuteReportEvent = 0; executeReport(); return 0L; } @@ -3177,7 +3157,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co sCustomShapeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diamond")); pSectionWindow->getReportSection().createDefault(sCustomShapeType,pNewControl); pNewControl->SetLogicRect(Rectangle(3000,500,6000,3500)); // switch height and width - } // if ( _nObjectId == OBJ_CUSTOMSHAPE ) + } else if ( _nObjectId == OBJ_OLE2 || OBJ_DLG_SUBREPORT == _nObjectId ) { pNewControl = SdrObjFactory::MakeNewObject( ReportInventor, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() ); @@ -3217,11 +3197,11 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co ,PROPERTY_FORMATSSUPPLIER ,PROPERTY_BACKGROUNDCOLOR }; - for(size_t i = 0; i < sizeof(sProps)/sizeof(sProps[0]);++i) + for(size_t i = 0; i < SAL_N_ELEMENTS(sProps);++i) { if ( xInfo->hasPropertyByName(sProps[i]) && xShapeInfo->hasPropertyByName(sProps[i]) ) xUnoProp->setPropertyValue(sProps[i],xShapeProp->getPropertyValue(sProps[i])); - } // for(size_t i = 0; i < sizeof(sProps)/sizeof(sProps[0]);++i) + } if ( xInfo->hasPropertyByName(PROPERTY_BORDER) && xShapeInfo->hasPropertyByName(PROPERTY_CONTROLBORDER) ) xUnoProp->setPropertyValue(PROPERTY_BORDER,xShapeProp->getPropertyValue(PROPERTY_CONTROLBORDER)); @@ -3303,7 +3283,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs { uno::Sequence< beans::PropertyValue > aArgs; executeChecked(SID_PAGEHEADERFOOTER,aArgs); - } // if ( !m_xHoldAlive->getPageHeaderOn() ) + } SequenceAsHashMap aMap(_aArgs); sal_Bool bStateOfPage = aMap.getUnpackedValueOrDefault(PROPERTY_STATE,sal_False); @@ -3372,7 +3352,6 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) // LLA: new feature, add the Label in dependency of the given DND_ACTION one section up, normal or one section down sal_Int8 nDNDAction = aMap.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DNDAction")), sal_Int8(0)); pSectionWindow[1] = pSectionWindow[0]; - // ::boost::shared_ptr<OReportSection> pReportSectionPost; sal_Bool bLabelAboveTextField = nDNDAction == DND_ACTION_COPY; if ( bLabelAboveTextField || nDNDAction == DND_ACTION_LINK ) { @@ -3406,7 +3385,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) { xReportDefinition->setCommand(sCommand); xReportDefinition->setCommandType(nCommandType); - } // if ( !xReportDefinition->getCommand().getLength() ) + } xColumns = dbtools::getFieldsByCommandDescriptor(xConnection,nCommandType,sCommand,xHoldAlive); if ( xColumns.is() && xColumns->hasByName(sColumnName) ) @@ -3430,7 +3409,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) // definition is bound to - which is not supported for the parameters case, since we // can retrieve parameters from the RowSet only. } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3482,7 +3461,6 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) SdrUnoObj* pControl[2]; pControl[0] = NULL; pControl[1] = NULL; - //getDesignView()->GetModel()->GetUndoEnv().Lock(); const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN); const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE).Width - nRightMargin; OSectionView* pSectionViews[2]; @@ -3494,7 +3472,6 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) ,xField,xNumberFormats,nOBJID,::rtl::OUString(),ReportInventor,OBJ_DLG_FIXEDTEXT, pSectionWindow[1]->getReportSection().getPage(),pSectionWindow[0]->getReportSection().getPage(),m_aReportModel.get(), pControl[0],pControl[1]); - //getDesignView()->GetModel()->GetUndoEnv().UnLock(); if ( pControl[0] && pControl[1] ) { SdrPageView* pPgViews[2]; @@ -3505,7 +3482,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) ::rtl::OUString sDefaultName; size_t i = 0; OUnoObject* pObjs[2]; - for(i = 0; i < sizeof(pControl)/sizeof(pControl[0]);++i) + for(i = 0; i < SAL_N_ELEMENTS(pControl);++i) { pObjs[i] = dynamic_cast<OUnoObject*>(pControl[i]); uno::Reference<beans::XPropertySet> xUnoProp(pObjs[i]->GetUnoControlModel(),uno::UNO_QUERY_THROW); @@ -3520,7 +3497,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) ,PROPERTY_BORDER ,PROPERTY_BACKGROUNDCOLOR }; - for(size_t k = 0; k < sizeof(sProps)/sizeof(sProps[0]);++k) + for(size_t k = 0; k < SAL_N_ELEMENTS(sProps);++k) { if ( xInfo->hasPropertyByName(sProps[k]) && xShapeInfo->hasPropertyByName(sProps[k]) ) xUnoProp->setPropertyValue(sProps[k],xShapeProp->getPropertyValue(sProps[k])); @@ -3534,15 +3511,12 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) ReportFormula aFormula( ReportFormula::Field, sName ); xUnoProp->setPropertyValue( PROPERTY_DATAFIELD, uno::makeAny( aFormula.getCompleteFormula() ) ); - } // if ( xInfo->hasPropertyByName(PROPERTY_DATAFIELD) ) + } if ( xInfo->hasPropertyByName(PROPERTY_BORDER) && xShapeInfo->hasPropertyByName(PROPERTY_CONTROLBORDER) ) xUnoProp->setPropertyValue(PROPERTY_BORDER,xShapeProp->getPropertyValue(PROPERTY_CONTROLBORDER)); pObjs[i]->CreateMediator(sal_True); - // need SectionView from the above or follow Section - // (getMarkedSection) returns the current Section - //pSectionViews[i]->InsertObjectAtView(pControl[i],*pPgViews[i],SDRINSERT_ADDMARK); const sal_Int32 nShapeWidth = xShapeProp->getWidth(); const bool bChangedPos = (aPos.X + nShapeWidth) > nPaperWidth; @@ -3560,8 +3534,6 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) if (pSectionViews[0] != pSectionViews[1] && nOBJID == OBJ_DLG_FORMATTEDFIELD) // we want this nice feature only at FORMATTEDFIELD { - // we have two different Views, so set the position x new. - // pSectionViews[1].position.x = pSectionViews[0].position.x uno::Reference< report::XReportComponent> xShapePropLabel(pObjs[0]->getUnoShape(),uno::UNO_QUERY_THROW); uno::Reference< report::XReportComponent> xShapePropTextField(pObjs[1]->getUnoShape(),uno::UNO_QUERY_THROW); if ( sLabel.getLength() ) @@ -3587,7 +3559,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) uno::Reference< report::XFixedText> xShapeProp(pObj->getUnoShape(),uno::UNO_QUERY_THROW); xShapeProp->setName(xShapeProp->getName() + sDefaultName ); - for(i = 0; i < sizeof(pControl)/sizeof(pControl[0]);++i) // insert controls + for(i = 0; i < SAL_N_ELEMENTS(pControl);++i) // insert controls { correctOverlapping(pControl[i],pSectionWindow[1-i]->getReportSection()); } @@ -3631,22 +3603,17 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) xTextfield->setPositionY(aTextfield.Top()); } } - // this should never happen. - // else - // { - // DBG_ERROR("unhandled case."); - // } } } } else { - for(size_t i = 0; i < sizeof(pControl)/sizeof(pControl[0]);++i) + for(size_t i = 0; i < SAL_N_ELEMENTS(pControl);++i) delete pControl[i]; } } } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3702,7 +3669,7 @@ void OReportController::listen(const bool _bAdd) void (SAL_CALL XPropertySet::*pPropertyListenerAction)( const ::rtl::OUString&, const uno::Reference< XPropertyChangeListener >& ) = _bAdd ? &XPropertySet::addPropertyChangeListener : &XPropertySet::removePropertyChangeListener; - for (size_t i = 0; i < sizeof(aProps)/sizeof(aProps[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(aProps); ++i) (m_xReportDefinition.get()->*pPropertyListenerAction)( aProps[i], static_cast< XPropertyChangeListener* >( this ) ); OXUndoEnvironment& rUndoEnv = m_aReportModel->GetUndoEnv(); @@ -3711,7 +3678,7 @@ void OReportController::listen(const bool _bAdd) const beans::Property* pIter = aSeq.getConstArray(); const beans::Property* pEnd = pIter + aSeq.getLength(); const ::rtl::OUString* pPropsBegin = &aProps[0]; - const ::rtl::OUString* pPropsEnd = pPropsBegin + (sizeof(aProps)/sizeof(aProps[0])) - 3; + const ::rtl::OUString* pPropsEnd = pPropsBegin + (SAL_N_ELEMENTS(aProps)) - 3; for(;pIter != pEnd;++pIter) { if ( ::std::find(pPropsBegin,pPropsEnd,pIter->Name) == pPropsEnd ) @@ -3727,11 +3694,6 @@ void OReportController::listen(const bool _bAdd) // Add Listeners to ReportControllerObserver OXReportControllerObserver& rObserver = *m_pReportControllerObserver; - // void (OXReportControllerObserver::*pObserverFunction)( const uno::Reference< uno::XInterface >& ) = - // _bAdd ? &OXReportControllerObserver::AddElement : &OXReportControllerObserver::RemoveElement; - - // (rObserver.*pObserverFunction)( m_xReportDefinition->getStyleFamilies() ); - // (rObserver.*pObserverFunction)( m_xReportDefinition->getFunctions() ); if ( m_xReportDefinition->getPageHeaderOn() && _bAdd ) { @@ -3762,7 +3724,7 @@ void OReportController::listen(const bool _bAdd) getDesignView()->addSection(xGroup->getHeader(),DBGROUPHEADER); rObserver.AddSection(xGroup->getHeader()); } - } // for (sal_Int32 i=0;i<nCount ; ++i) + } if ( _bAdd ) { @@ -3880,7 +3842,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId) ,bSwitchOn ? Inserted : Removed ,0 )); - } // if ( SID_PAGEHEADERFOOTER == _nId ) + } switch( _nId ) { case SID_PAGEHEADER_WITHOUT_UNDO: @@ -3937,7 +3899,7 @@ void OReportController::modifyGroup(const bool _bAppend, const Sequence< Propert xGroups->removeByIndex( nPos ); } } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -4059,7 +4021,7 @@ void OReportController::checkChartEnabled() ::rtl::OUString SAL_CALL OReportController::getTitle() throw (uno::RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); uno::Reference< frame::XTitle> xTitle(m_xReportDefinition,uno::UNO_QUERY_THROW); @@ -4110,7 +4072,7 @@ void SAL_CALL OReportController::setMode( const ::rtl::OUString& aMode ) throw ( { static ::rtl::OUString s_sModes[] = { ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("remote")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal")) }; - return uno::Sequence< ::rtl::OUString> (&s_sModes[0],sizeof(s_sModes)/sizeof(s_sModes[0])); + return uno::Sequence< ::rtl::OUString> (&s_sModes[0],SAL_N_ELEMENTS(s_sModes)); } ::sal_Bool SAL_CALL OReportController::supportsMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::uno::RuntimeException) { @@ -4127,7 +4089,7 @@ void SAL_CALL OReportController::setMode( const ::rtl::OUString& aMode ) throw ( // ----------------------------------------------------------------------------- bool OReportController::isUiVisible() const { - return !m_sMode.equalsAscii("remote"); + return !m_sMode.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("remote")); } // ----------------------------------------------------------------------------- void OReportController::impl_fillState_nothrow(const ::rtl::OUString& _sProperty,dbaui::FeatureState& _rState) const @@ -4155,15 +4117,15 @@ void OReportController::impl_fillState_nothrow(const ::rtl::OUString& _sProperty else if ( !comphelper::compare(aTemp,aTemp2) ) break; } - catch(beans::UnknownPropertyException&) + catch(const beans::UnknownPropertyException&) { _rState.bEnabled = sal_False; } - } // for(; aIter != aSelection.end();++aIter) + } if ( aIter == aSelection.end() ) _rState.aValue = aTemp; } - } // if ( _rState.bEnabled ) + } } // ----------------------------------------------------------------------------- void OReportController::impl_zoom_nothrow() @@ -4171,8 +4133,6 @@ void OReportController::impl_zoom_nothrow() Fraction aZoom(m_nZoomValue,100); setZoomFactor( aZoom,*getDesignView() ); getDesignView()->zoom(aZoom); - // TRY - /*getDesignView()->Invalidate(INVALIDATE_NOCHILDREN);*/ InvalidateFeature(SID_ATTR_ZOOM,Reference< XStatusListener >(),sal_True); InvalidateFeature(SID_ATTR_ZOOMSLIDER,Reference< XStatusListener >(),sal_True); } @@ -4199,9 +4159,9 @@ sal_Bool OReportController::isFormatCommandEnabled(sal_uInt16 _nCommand,const un break; default: ; - } // switch(_nCommand) + } } - catch(uno::Exception&) + catch(const uno::Exception&) { } } @@ -4291,17 +4251,17 @@ void OReportController::openZoomDialog() m_nZoomValue = getDesignView()->getZoomFactor( m_eZoomType ); impl_zoom_nothrow(); - } // if ( !bCancel ) + } } - catch(uno::Exception&) + catch(const uno::Exception&) { DBG_UNHANDLED_EXCEPTION(); } SfxItemPool::Free(pPool); - for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i) + for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i) delete pDefaults[i]; - } // if(pFact) + } } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- @@ -4309,15 +4269,12 @@ void OReportController::openZoomDialog() void SAL_CALL OReportController::setVisualAreaSize( ::sal_Int64 _nAspect, const awt::Size& _aSize ) throw (lang::IllegalArgumentException, embed::WrongStateException, uno::Exception, uno::RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); - //if( nAspect == embed::Aspects::MSOLE_CONTENT ) - { bool bChanged = (m_aVisualAreaSize.Width != _aSize.Width || m_aVisualAreaSize.Height != _aSize.Height); m_aVisualAreaSize = _aSize; if( bChanged ) setModified( sal_True ); - } m_nAspect = _nAspect; } // ----------------------------------------------------------------------------- @@ -4329,7 +4286,7 @@ awt::Size SAL_CALL OReportController::getVisualAreaSize( ::sal_Int64 /*nAspect*/ // ----------------------------------------------------------------------------- embed::VisualRepresentation SAL_CALL OReportController::getPreferredVisualRepresentation( ::sal_Int64 _nAspect ) throw (lang::IllegalArgumentException, embed::WrongStateException, uno::Exception, uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); embed::VisualRepresentation aResult; if ( !m_bInGeneratePreview ) @@ -4350,17 +4307,15 @@ embed::VisualRepresentation SAL_CALL OReportController::getPreferredVisualRepres { xTransfer->setVisualAreaSize(m_nAspect,m_aVisualAreaSize); aResult = xTransfer->getPreferredVisualRepresentation( _nAspect ); - } // if ( xTransfer.is() ) + } } - catch( uno::Exception & ex ) + catch(const uno::Exception&) { - (void)ex; } m_xReportEngine->setMaxRows(nOldMaxRows); } - catch( uno::Exception & ex ) + catch(const uno::Exception&) { - (void)ex; } m_bInGeneratePreview = false; } @@ -4423,3 +4378,4 @@ void OReportController::addUndoAction( SfxUndoAction* i_pAction ) InvalidateFeature( SID_UNDO ); InvalidateFeature( SID_REDO ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index c853cf2e607f..8faca401dad0 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,7 @@ #include <ReportControllerObserver.hxx> #include <ReportController.hxx> #include <svl/smplhint.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/report/XFormattedField.hpp> #include <com/sun/star/awt/FontSlant.hpp> @@ -49,8 +50,6 @@ namespace rptui using namespace ::com::sun::star; - // const OReportController *& m_pReportController; - DECLARE_STL_USTRINGACCESS_MAP(bool, AllProperties); DECLARE_STL_STDKEY_MAP(uno::Reference< beans::XPropertySet >, AllProperties, PropertySetInfoCache); @@ -110,31 +109,6 @@ public: if ( _pEvt ) { sal_Int32 nEvent = _pEvt->GetId(); - /* - // just for debug - if (nEvent == VCLEVENT_WINDOW_CHILDCREATED || - nEvent == VCLEVENT_WINDOW_PAINT || - nEvent == VCLEVENT_WINDOW_MOVE || - nEvent == VCLEVENT_WINDOW_RESIZE || - nEvent == VCLEVENT_WINDOW_SHOW || - nEvent == VCLEVENT_WINDOW_MOUSEMOVE || - nEvent == VCLEVENT_WINDOW_FRAMETITLECHANGED || - nEvent == VCLEVENT_WINDOW_HIDE || - nEvent == VCLEVENT_EDIT_MODIFY || - nEvent == VCLEVENT_SCROLLBAR_ENDSCROLL || - nEvent == VCLEVENT_EDIT_SELECTIONCHANGED || - nEvent == VCLEVENT_TABPAGE_INSERTED || - nEvent == VCLEVENT_TABPAGE_REMOVED || - nEvent == VCLEVENT_TOOLBOX_FORMATCHANGED || - nEvent == VCLEVENT_TOOLBOX_ITEMADDED || - nEvent == VCLEVENT_TOOLBOX_ALLITEMCHANGED || - nEvent == VCLEVENT_MENUBARADDED || - nEvent == 1 - ) - { - return 0L; - } - */ if (nEvent == VCLEVENT_APPLICATION_DATACHANGED ) { @@ -145,13 +119,11 @@ public: { OEnvLock aLock(*this); - // sal_uInt32 nCount = m_pImpl->m_aSections.size(); - // send all Section Objects a 'tingle' // maybe they need a change in format, color, etc ::std::vector< uno::Reference< container::XChild > >::const_iterator aIter = m_pImpl->m_aSections.begin(); ::std::vector< uno::Reference< container::XChild > >::const_iterator aEnd = m_pImpl->m_aSections.end(); - for (;aIter != aEnd; aIter++) + for (;aIter != aEnd; ++aIter) { const uno::Reference<container::XChild> xChild (*aIter); if (xChild.is()) @@ -199,7 +171,6 @@ public: void OXReportControllerObserver::Clear() { OEnvLock aLock(*this); - // sal_uInt32 nDebugValue = m_pImpl->m_aSections.size(); m_pImpl->m_aSections.clear(); } @@ -315,7 +286,6 @@ void OXReportControllerObserver::switchListening( const uno::Reference< containe // be notified of any changes in the container elements uno::Reference< container::XContainer > xSimpleContainer( _rxContainer, uno::UNO_QUERY ); - // OSL_ENSURE( xSimpleContainer.is(), "OXReportControllerObserver::switchListening: how are we expected to be notified of changes in the container?" ); if ( xSimpleContainer.is() ) { if ( _bStartListening ) @@ -367,17 +337,13 @@ void OXReportControllerObserver::switchListening( const uno::Reference< uno::XIn //------------------------------------------------------------------------------ void SAL_CALL OXReportControllerObserver::modified( const lang::EventObject& /*aEvent*/ ) throw (uno::RuntimeException) { - // implSetModified(); } //------------------------------------------------------------------------------ void OXReportControllerObserver::AddElement(const uno::Reference< uno::XInterface >& _rxElement ) { - // if ( !IsLocked() ) - // { m_aFormattedFieldBeautifier.notifyElementInserted(_rxElement); m_aFixedTextColor.notifyElementInserted(_rxElement); - // } // if it's a container, start listening at all elements uno::Reference< container::XIndexAccess > xContainer( _rxElement, uno::UNO_QUERY ); @@ -417,7 +383,7 @@ void OXReportControllerObserver::RemoveElement(const uno::Reference< uno::XInter //------------------------------------------------------------------------------ void SAL_CALL OXReportControllerObserver::elementInserted(const container::ContainerEvent& evt) throw(uno::RuntimeException) { - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_pImpl->m_aMutex ); // neues Object zum lauschen @@ -431,7 +397,7 @@ void SAL_CALL OXReportControllerObserver::elementInserted(const container::Conta //------------------------------------------------------------------------------ void SAL_CALL OXReportControllerObserver::elementReplaced(const container::ContainerEvent& evt) throw(uno::RuntimeException) { - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_pImpl->m_aMutex ); uno::Reference< uno::XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY); @@ -445,7 +411,7 @@ void SAL_CALL OXReportControllerObserver::elementReplaced(const container::Conta //------------------------------------------------------------------------------ void SAL_CALL OXReportControllerObserver::elementRemoved(const container::ContainerEvent& evt) throw(uno::RuntimeException) { - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_pImpl->m_aMutex ); uno::Reference< uno::XInterface > xIface( evt.Element, uno::UNO_QUERY ); @@ -460,3 +426,4 @@ void SAL_CALL OXReportControllerObserver::elementRemoved(const container::Contai +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ReportRuler.cxx b/reportdesign/source/ui/report/ReportRuler.cxx index 68db02519afd..2c5e0cb50696 100644 --- a/reportdesign/source/ui/report/ReportRuler.cxx +++ b/reportdesign/source/ui/report/ReportRuler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ void OReportRuler::SetGridVisible(sal_Bool _bVisible) //============================================================================== } // rptui //============================================================================== + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index e011dfc515de..7e03857406f8 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -114,18 +115,17 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception catched!"); + OSL_FAIL("Exception catched!"); } m_pFunc.reset(new DlgEdFuncSelect( this )); - m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( /* m_pParent->getViewsWindow()->getView()->getReportView()->getController().getORB() */ ) ); + m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor() ); } //------------------------------------------------------------------------------ OReportSection::~OReportSection() { DBG_DTOR( rpt_OReportSection,NULL); m_pPage = NULL; - //m_pModel->GetUndoEnv().RemoveSection(m_xSection.get()); if ( m_pMulti.is() ) m_pMulti->dispose(); @@ -139,7 +139,6 @@ OReportSection::~OReportSection() m_pView->EndListening( *m_pModel ); m_pView = NULL; } - /*m_pModel->DeletePage(m_pPage->GetPageNum());*/ } //------------------------------------------------------------------------------ void OReportSection::Paint( const Rectangle& rRect ) @@ -241,12 +240,9 @@ void OReportSection::fill() m_pView->SetDesignMode( sal_True ); m_pView->StartListening( *m_pModel ); - /*Resize();*/ m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) ); const Size aPageSize = m_pPage->GetSize(); m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); - - //SetBackground( Wallpaper( COL_BLUE )); } // ----------------------------------------------------------------------------- void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyCopiedObjects,bool _bForce) @@ -297,7 +293,6 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC { aRet.Move(0,aRet.getHeight()+1); pNeuObj->SetLogicRect(aRet); - //(*pCopiesIter)->setPositionY(aRet.Top()); } } m_pView->AddUndo( m_pView->GetModel()->GetSdrUndoFactory().CreateUndoNewObject( *pNeuObj ) ); @@ -309,7 +304,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception caught while pasting a new object!"); + OSL_FAIL("Exception caught while pasting a new object!"); } if ( !_bForce ) break; @@ -356,9 +351,6 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb if( !m_pView->AreObjectsMarked() || !m_xSection.is() ) return; - // stop all drawing actions - //m_pView->BrkAction(); - // insert control models of marked objects into clipboard dialog model const SdrMarkList& rMarkedList = m_pView->GetMarkedObjectList(); const sal_uLong nMark = rMarkedList.GetMarkCount(); @@ -388,10 +380,10 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb } catch(uno::Exception&) { - OSL_ENSURE(0,"Can't copy report elements!"); + OSL_FAIL("Can't copy report elements!"); } } - } // for( sal_uLong i = 0; i < nMark; i++ ) + } if ( !aCopies.empty() ) { @@ -449,7 +441,11 @@ void OReportSection::SelectAll(const sal_uInt16 _nObjectType) } } } -void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rController,const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame,sal_Bool _bHiContrast) +void lcl_insertMenuItemImages( + PopupMenu& rContextMenu, + OReportController& rController, + const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame +) { const sal_uInt16 nCount = rContextMenu.GetItemCount(); for (sal_uInt16 i = 0; i < nCount; ++i) @@ -460,12 +456,12 @@ void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rContro PopupMenu* pPopupMenu = rContextMenu.GetPopupMenu( nId ); if ( pPopupMenu ) { - lcl_insertMenuItemImages(*pPopupMenu,rController,_xReportDefinition,_rFrame,_bHiContrast); + lcl_insertMenuItemImages(*pPopupMenu,rController,_xReportDefinition,_rFrame); } else { const ::rtl::OUString sCommand = rContextMenu.GetItemCommand(nId); - rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,sal_False,_bHiContrast)); + rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,sal_False)); if ( nId == SID_PAGEHEADERFOOTER ) { String sText = String(ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT)); @@ -480,7 +476,7 @@ void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rContro rContextMenu.CheckItem(nId,rController.isCommandChecked(nId)); rContextMenu.EnableItem(nId,rController.isCommandEnabled(nId)); } - } // for (sal_uInt16 i = 0; i < nCount; ++i) + } } //---------------------------------------------------------------------------- void OReportSection::Command( const CommandEvent& _rCEvt ) @@ -490,14 +486,12 @@ void OReportSection::Command( const CommandEvent& _rCEvt ) { case COMMAND_CONTEXTMENU: { - const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - sal_Bool bHiContrast = rSettings.GetHighContrastMode(); OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController(); uno::Reference<frame::XFrame> xFrame = rController.getFrame(); PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) ); uno::Reference< report::XReportDefinition> xReportDefinition = getSection()->getReportDefinition(); - lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame,bHiContrast); + lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame); Point aPos = _rCEvt.GetMousePosPixel(); m_pView->EndAction(); @@ -611,11 +605,11 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I } pBase->StartListening(); } - } // for (sal_Int32 i = 0; i < nCount; ++i) + } } catch(uno::Exception) { - OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged("); + OSL_FAIL("Exception caught: OReportSection::_propertyChanged("); } } //------------------------------------------------------------------------------ @@ -632,7 +626,7 @@ void OReportSection::deactivateOle() // ----------------------------------------------------------------------------- void OReportSection::createDefault(const ::rtl::OUString& _sType) { - SdrObject* pObj = m_pView->GetCreateObj();//rMarkList.GetMark(0)->GetObj(); + SdrObject* pObj = m_pView->GetCreateObj(); if ( !pObj ) return; createDefault(_sType,pObj); @@ -807,8 +801,7 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt ) nDropOption = DND_ACTION_COPYMOVE; m_pParent->getViewsWindow()->BrkAction(); m_pParent->getViewsWindow()->unmarkAllObjects(m_pView); - //m_pParent->getViewsWindow()->getView()->setMarked(m_pView,sal_True); - } // if ( OReportExchange::canExtract(rFlavors) ) + } else if ( bMultipleFormat || ::svx::OColumnTransferable::canExtractColumnDescriptor(rFlavors, CTF_FIELD_DESCRIPTOR | CTF_CONTROL_EXCHANGE | CTF_COLUMN_DESCRIPTOR) ) { @@ -830,7 +823,7 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt ) aValues.realloc(1); aValues[0].Value <<= aDescriptor.createPropertyValueSequence(); - } // if ( !bMultipleFormat ) + } else aValues = ::svx::OMultiColumnTransferable::extractDescriptor(aDropped); @@ -877,3 +870,5 @@ bool OReportSection::isUiActive() const // ============================================================================= } // ============================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 65ead602daab..e0e74598d5df 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -126,7 +127,6 @@ void OReportWindow::removeSection(sal_uInt16 _nPosition) m_aViewsWindow.removeSection(_nPosition); m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight()); m_aViewsWindow.Invalidate(INVALIDATE_TRANSPARENT); - //Resize(); } //---------------------------------------------------------------------------- void OReportWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,sal_uInt16 _nPosition) @@ -167,7 +167,7 @@ sal_Int32 OReportWindow::GetTotalWidth() const { Fraction aStartWidth(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH )); const Fraction aZoom(m_pView->getController().getZoomValue(),100); - aStartWidth *= aZoom; // m_aViewsWindow.GetMapMode().GetScaleX();; + aStartWidth *= aZoom; const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_pView->getController().getReportDefinition(),PROPERTY_PAPERSIZE).Width; Fraction aPaperWidth(nPaperWidth,1); aPaperWidth *= aZoom; @@ -252,7 +252,6 @@ void OReportWindow::ScrollChildren(const Point& _aThumbPos) m_aHRuler.Scroll(-(aOrg.X() + _aThumbPos.X()),0); } - /*const Point aPos(PixelToLogic(_aThumbPos));*/ m_aViewsWindow.scrollChildren(_aThumbPos); } //---------------------------------------------------------------------------- @@ -390,7 +389,6 @@ void OReportWindow::zoom(const Fraction& _aZoom) m_aHRuler.SetZoom(_aZoom); m_aHRuler.Invalidate(); - //setZoomFactor(_aZoom,*this); // if this will be include the H - ruler has the wrong size m_aViewsWindow.zoom(_aZoom); notifySizeChanged(); @@ -456,3 +454,4 @@ void OReportWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) } //rptui //================================================================== +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 8c8f6b01a6dc..8903e7d25263 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,7 +93,6 @@ 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 ); @@ -358,7 +358,6 @@ void OScrollWindowHelper::alignMarkedObjects(sal_Int32 _nControlModification,boo void OScrollWindowHelper::ImplInitSettings() { SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() )); - // SetBackground( Wallpaper( COL_LIGHTRED )); SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() ); SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() ); } @@ -414,3 +413,5 @@ sal_uInt16 OScrollWindowHelper::getZoomFactor(SvxZoomType _eType) const //============================================================================== } // rptui //============================================================================== + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index 6cf1f2fe6d2d..90f56517e0dd 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,7 +77,6 @@ void OSectionView::MarkListHasChanged() if ( m_pReportWindow && m_pSectionWindow && !m_pSectionWindow->getPage()->getSpecialMode() ) { - //m_pReportWindow->unmarkAllObjects(this); // WHY DlgEdHint aHint( RPTUI_HINT_SELECTIONCHANGED ); m_pReportWindow->getReportView()->Broadcast( aHint ); m_pReportWindow->getReportView()->UpdatePropertyBrowserDelayed(*this); @@ -210,7 +210,7 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo ) EndUndo(); - // #84073# check mark list now instead of later in a timer + // check mark list now instead of later in a timer CheckMarked(); MarkListHasChanged(); } @@ -230,7 +230,7 @@ bool OSectionView::OnlyShapesMarked() const { break; } - } // for (sal_uLong i=0; i<nCount; i++) + } return i == nCount; } @@ -273,3 +273,5 @@ short OSectionView::GetLayerIdOfMarkedObjects() const //============================================================================ } // rptui //============================================================================ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 8020d8b32793..abe1b2a03eea 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -161,7 +162,7 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) m_aStartMarker.Invalidate(INVALIDATE_CHILDREN); } } - } // if ( xSection.is() ) + } else if ( _rEvent.PropertyName.equals(PROPERTY_EXPRESSION) ) { uno::Reference< report::XGroup > xGroup(_rEvent.Source,uno::UNO_QUERY); @@ -181,7 +182,7 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport String sTitle = String(ModuleRes(_nResId)); m_aStartMarker.setTitle(sTitle); m_aStartMarker.Invalidate(INVALIDATE_CHILDREN); - } // if ( bRet ) + } return bRet; } // ----------------------------------------------------------------------------- @@ -202,7 +203,7 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& sTitle.SearchAndReplace('#',sExpression); m_aStartMarker.setTitle(sTitle); m_aStartMarker.Invalidate(INVALIDATE_CHILDREN); - } // if ( _pIsSectionOn(&aGroupHelper) ) + } return bRet; } //------------------------------------------------------------------------------ @@ -322,8 +323,7 @@ void OSectionWindow::zoom(const Fraction& _aZoom) setZoomFactor(_aZoom,m_aReportSection); setZoomFactor(_aZoom,m_aSplitter); setZoomFactor(_aZoom,m_aEndMarker); - //Resize(); - Invalidate(/*INVALIDATE_UPDATE |*/ /* | INVALIDATE_TRANSPARENT *//*INVALIDATE_NOCHILDREN*/); + Invalidate(); } //----------------------------------------------------------------------------- IMPL_LINK( OSectionWindow, StartSplitHdl, Splitter*, ) @@ -347,22 +347,19 @@ IMPL_LINK( OSectionWindow, SplitHdl, Splitter*, _pSplitter ) } sal_Int32 nSplitPos = _pSplitter->GetSplitPosPixel(); - const Point aPos = _pSplitter->GetPosPixel(); - const uno::Reference< report::XSection> xSection = m_aReportSection.getSection(); nSplitPos = m_aSplitter.PixelToLogic(Size(0,nSplitPos)).Height(); - // nSplitPos = xSection->getHeight() + m_aSplitter.PixelToLogic(Size(0,nSplitPos - aPos.Y() )).Height(); const sal_Int32 nCount = xSection->getCount(); for (sal_Int32 i = 0; i < nCount; ++i) { uno::Reference<report::XReportComponent> xReportComponent(xSection->getByIndex(i),uno::UNO_QUERY); - if ( xReportComponent.is() /*&& nSplitPos < (xReportComponent->getPositionY() + xReportComponent->getHeight())*/ ) + if ( xReportComponent.is() ) { nSplitPos = ::std::max(nSplitPos,xReportComponent->getPositionY() + xReportComponent->getHeight()); } - } // for (sal_Int32 i = 0; i < nCount; ++i) + } if ( nSplitPos < 0 ) nSplitPos = 0; @@ -375,7 +372,7 @@ IMPL_LINK( OSectionWindow, SplitHdl, Splitter*, _pSplitter ) // ----------------------------------------------------------------------------- void lcl_scroll(Window& _rWindow,const Point& _aDelta) { - _rWindow.Scroll(-_aDelta.X(),-_aDelta.Y()/*,SCROLL_CHILDREN*//*|SCROLL_CLIP*/); + _rWindow.Scroll(-_aDelta.X(),-_aDelta.Y()); _rWindow.Invalidate(INVALIDATE_TRANSPARENT); } // ----------------------------------------------------------------------------- @@ -398,11 +395,9 @@ void OSectionWindow::scrollChildren(long _nX) const Point aNew = aMapMode.GetOrigin(); const Point aDiff = aOld - aNew; { - //OWindowPositionCorrector aCorrector(&m_aReportSection,-aDelta.Width(),0); lcl_scroll(m_aReportSection,aDiff); } - //lcl_setOrigin(m_aEndMarker,_nDeltaX, 0); lcl_scroll(m_aEndMarker,m_aEndMarker.PixelToLogic(Point(_nX,0))); lcl_setOrigin(m_aSplitter,_nX, 0); @@ -412,3 +407,4 @@ void OSectionWindow::scrollChildren(long _nX) } // rptui //============================================================================== +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index d40bc4632f0f..c8a332de13d5 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,8 +51,6 @@ namespace rptui Image* OStartMarker::s_pDefCollapsed = NULL; Image* OStartMarker::s_pDefExpanded = NULL; -Image* OStartMarker::s_pDefCollapsedHC = NULL; -Image* OStartMarker::s_pDefExpandedHC = NULL; oslInterlockedCount OStartMarker::s_nImageRefCount = 0; DBG_NAME( rpt_OStartMarker ) @@ -96,9 +95,7 @@ OStartMarker::~OStartMarker() { DELETEZ(s_pDefCollapsed); DELETEZ(s_pDefExpanded); - DELETEZ(s_pDefCollapsedHC); - DELETEZ(s_pDefExpandedHC); - } // if ( osl_decrementInterlockedCount(&s_nImageRefCount) == 0 ) + } } // ----------------------------------------------------------------------------- sal_Int32 OStartMarker::getMinHeight() const @@ -111,7 +108,6 @@ sal_Int32 OStartMarker::getMinHeight() const void OStartMarker::Paint( const Rectangle& rRect ) { (void)rRect; - //SetUpdateMode(sal_False); Size aSize = GetOutputSizePixel(); long nSize = aSize.Width(); const long nCornerWidth = long(CORNER_SPACE * (double)GetMapMode().GetScaleX()); @@ -123,7 +119,7 @@ void OStartMarker::Paint( const Rectangle& rRect ) else { const long nVRulerWidth = m_aVRuler.GetSizePixel().Width(); - nSize = aSize.Width() - nVRulerWidth/* - m_nCornerSize*/; + nSize = aSize.Width() - nVRulerWidth; aSize.Width() += nCornerWidth; SetClipRegion(Region(PixelToLogic(Rectangle(Point(),Size(nSize,aSize.Height()))))); } @@ -195,11 +191,7 @@ void OStartMarker::MouseButtonUp( const MouseEvent& rMEvt ) // ----------------------------------------------------------------------------- void OStartMarker::changeImage() { - Image* pImage = NULL; - if ( GetSettings().GetStyleSettings().GetHighContrastMode() ) - pImage = m_bCollapsed ? s_pDefCollapsedHC : s_pDefExpandedHC; - else - pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; + Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; m_aImage.SetImage(*pImage); } // ----------------------------------------------------------------------- @@ -208,20 +200,10 @@ void OStartMarker::initDefaultNodeImages() if ( !s_pDefCollapsed ) { s_pDefCollapsed = new Image( ModuleRes( RID_IMG_TREENODE_COLLAPSED ) ); - s_pDefCollapsedHC = new Image( ModuleRes( RID_IMG_TREENODE_COLLAPSED_HC ) ); s_pDefExpanded = new Image( ModuleRes( RID_IMG_TREENODE_EXPANDED ) ); - s_pDefExpandedHC = new Image( ModuleRes( RID_IMG_TREENODE_EXPANDED_HC ) ); } - Image* pImage = NULL; - if ( GetSettings().GetStyleSettings().GetHighContrastMode() ) - { - pImage = m_bCollapsed ? s_pDefCollapsedHC : s_pDefExpandedHC; - } - else - { - pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; - } + Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; m_aImage.SetImage(*pImage); m_aImage.SetMouseTransparent(sal_True); m_aImage.SetBackground(); @@ -231,7 +213,6 @@ void OStartMarker::initDefaultNodeImages() // ----------------------------------------------------------------------- void OStartMarker::ImplInitSettings() { - // SetBackground( Wallpaper( COL_YELLOW )); SetBackground( ); SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); setColor(); @@ -293,7 +274,6 @@ void OStartMarker::RequestHelp( const HelpEvent& rHEvt ) { // Hilfe anzeigen Rectangle aItemRect(rHEvt.GetMousePosPixel(),Size(GetSizePixel().Width(),getMinHeight())); - //aItemRect = LogicToPixel( aItemRect ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -326,3 +306,5 @@ void OStartMarker::zoom(const Fraction& _aZoom) // ======================================================================= } // ======================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 0a7db5af9590..c6d2c6c2425a 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,6 +57,7 @@ #include <toolkit/helper/convert.hxx> #include <algorithm> #include <numeric> +#include <o3tl/compat_functional.hxx> namespace rptui { @@ -239,7 +241,7 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow) { aStartPoint = pSectionWindow->GetPosPixel(); bSet = true; - } // if ( pSectionWindow.get() == &_rSectionWindow ) + } if ( bSet ) { @@ -248,7 +250,7 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow) pSectionWindow->getStartMarker().Invalidate( nIn ); // INVALIDATE_NOERASE |INVALIDATE_NOCHILDREN| INVALIDATE_TRANSPARENT pSectionWindow->getEndMarker().Invalidate( nIn ); } - } // for (;aIter != aEnd ; ++aIter,++nPos) + } Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= GetMapMode().GetScaleX(); Size aOut = GetOutputSizePixel(); @@ -268,11 +270,11 @@ void OViewsWindow::Resize() Point aStartPoint(0,-aOffset.Y()); TSectionsMap::iterator aIter = m_aSections.begin(); TSectionsMap::iterator aEnd = m_aSections.end(); - for (sal_uInt16 nPos=0;aIter != aEnd ; ++aIter,++nPos) + for (;aIter != aEnd ; ++aIter) { const ::boost::shared_ptr<OSectionWindow> pSectionWindow = (*aIter); impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,true); - } // for (;aIter != aEnd ; ++aIter) + } } } // ----------------------------------------------------------------------------- @@ -331,15 +333,15 @@ void OViewsWindow::removeSection(sal_uInt16 _nPosition) m_aSections.erase(aPos); Resize(); - } // if ( _nPosition < m_aSections.size() ) + } } //------------------------------------------------------------------------------ void OViewsWindow::toggleGrid(sal_Bool _bVisible) { ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::bind(&OReportSection::SetGridVisible,_1,_bVisible),TReportPairHelper())); + ::o3tl::compose1(::boost::bind(&OReportSection::SetGridVisible,_1,_bVisible),TReportPairHelper())); ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::bind(&OReportSection::Window::Invalidate,_1,INVALIDATE_NOERASE),TReportPairHelper())); + ::o3tl::compose1(::boost::bind(&OReportSection::Window::Invalidate,_1,INVALIDATE_NOERASE),TReportPairHelper())); } //------------------------------------------------------------------------------ sal_Int32 OViewsWindow::getTotalHeight() const @@ -378,7 +380,7 @@ rtl::OUString OViewsWindow::GetInsertObjString() const void OViewsWindow::SetMode( DlgEdMode eNewMode ) { ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::bind(&OReportSection::SetMode,_1,eNewMode),TReportPairHelper())); + ::o3tl::compose1(::boost::bind(&OReportSection::SetMode,_1,eNewMode),TReportPairHelper())); } //---------------------------------------------------------------------------- sal_Bool OViewsWindow::HasSelection() const @@ -394,7 +396,7 @@ void OViewsWindow::Delete() { m_bInUnmark = sal_True; ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::mem_fn(&OReportSection::Delete),TReportPairHelper())); + ::o3tl::compose1(::boost::mem_fn(&OReportSection::Delete),TReportPairHelper())); m_bInUnmark = sal_False; } //---------------------------------------------------------------------------- @@ -402,12 +404,8 @@ void OViewsWindow::Copy() { uno::Sequence< beans::NamedValue > aAllreadyCopiedObjects; ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::bind(&OReportSection::Copy,_1,::boost::ref(aAllreadyCopiedObjects)),TReportPairHelper())); + ::o3tl::compose1(::boost::bind(&OReportSection::Copy,_1,::boost::ref(aAllreadyCopiedObjects)),TReportPairHelper())); - //TSectionsMap::iterator aIter = m_aSections.begin(); - //TSectionsMap::iterator aEnd = m_aSections.end(); - //for (; aIter != aEnd; ++aIter) - // (*aIter)->getReportSection().Copy(aAllreadyCopiedObjects); OReportExchange* pCopy = new OReportExchange(aAllreadyCopiedObjects); uno::Reference< datatransfer::XTransferable> aEnsureDelete = pCopy; pCopy->CopyToClipboard(this); @@ -419,7 +417,7 @@ void OViewsWindow::Paste() OReportExchange::TSectionElements aCopies = OReportExchange::extractCopies(aTransferData); if ( aCopies.getLength() > 1 ) ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::bind(&OReportSection::Paste,_1,aCopies,false),TReportPairHelper())); + ::o3tl::compose1(::boost::bind(&OReportSection::Paste,_1,aCopies,false),TReportPairHelper())); else { ::boost::shared_ptr<OSectionWindow> pMarkedSection = getMarkedSection(); @@ -498,9 +496,9 @@ void OViewsWindow::Paste() } break; } - } // ( (*aIter).second->isMarked() ) + } ++nCurrentPosition; - } // for (; aIter != aEnd ; ++aIter) + } return pRet; } @@ -521,7 +519,7 @@ void OViewsWindow::SelectAll(const sal_uInt16 _nObjectType) { m_bInUnmark = sal_True; ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::bind(::boost::mem_fn(&OReportSection::SelectAll),_1,_nObjectType),TReportPairHelper())); + ::o3tl::compose1(::boost::bind(::boost::mem_fn(&OReportSection::SelectAll),_1,_nObjectType),TReportPairHelper())); m_bInUnmark = sal_False; } //----------------------------------------------------------------------------- @@ -539,29 +537,10 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView) (*aIter)->getReportSection().deactivateOle(); (*aIter)->getReportSection().getSectionView().UnmarkAllObj(); } - } // for (; aIter != aEnd ; ++aIter) + } m_bInUnmark = sal_False; } } -//----------------------------------------------------------------------------- -/* -::boost::shared_ptr<OSectionWindow> OViewsWindow::getReportSection(const uno::Reference< report::XSection >& _xSection) -{ - OSL_ENSURE(_xSection.is(),"Section is NULL!"); - ::boost::shared_ptr<OSectionWindow> pRet; - TSectionsMap::iterator aIter = m_aSections.begin(); - TSectionsMap::iterator aEnd = m_aSections.end(); - for (; aIter != aEnd ; ++aIter) - { - if ( (*aIter)->getReportSection().getSection() == _xSection ) - { - pRet = (*aIter); - break; - } // if ( (*aIter)->getSection() == _xSection ) - } // for (; aIter != aEnd ; ++aIter) - return pRet; -} -*/ // ----------------------------------------------------------------------- void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32) { @@ -583,9 +562,9 @@ void OViewsWindow::MouseButtonDown( const MouseEvent& rMEvt ) void OViewsWindow::showRuler(sal_Bool _bShow) { ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::bind(&OStartMarker::showRuler,_1,_bShow),TStartMarkerHelper())); + ::o3tl::compose1(::boost::bind(&OStartMarker::showRuler,_1,_bShow),TStartMarkerHelper())); ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::bind(&OStartMarker::Window::Invalidate,_1,sal_uInt16(INVALIDATE_NOERASE)),TStartMarkerHelper())); + ::o3tl::compose1(::boost::bind(&OStartMarker::Window::Invalidate, _1, sal_uInt16(INVALIDATE_NOERASE)), TStartMarkerHelper())); } //---------------------------------------------------------------------------- void OViewsWindow::MouseButtonUp( const MouseEvent& rMEvt ) @@ -618,7 +597,6 @@ sal_Bool OViewsWindow::handleKeyEvent(const KeyEvent& _rEvent) TSectionsMap::iterator aEnd = m_aSections.end(); for (;aIter != aEnd ; ++aIter) { - //if ( (*aIter).getReportSection().getSectionView().->AreObjectsMarked() ) if ( (*aIter)->getStartMarker().isMarked() ) { bRet = (*aIter)->getReportSection().handleKeyEvent(_rEvent); @@ -915,10 +893,8 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli { if ( _nControlModification == ControlModification::WIDTH_SMALLEST || _nControlModification == ControlModification::WIDTH_GREATEST ) pObjBase->getReportComponent()->setSize(awt::Size(nXMov,aObjRect.getHeight())); - //pObj->Resize(aObjRect.TopLeft(),Fraction(nXMov,aObjRect.getWidth()),Fraction(1,1)); else if ( _nControlModification == ControlModification::HEIGHT_GREATEST || _nControlModification == ControlModification::HEIGHT_SMALLEST ) pObjBase->getReportComponent()->setSize(awt::Size(aObjRect.getWidth(),nYMov)); - //pObj->Resize(aObjRect.TopLeft(),Fraction(1,1),Fraction(nYMov,aObjRect.getHeight())); } } break; @@ -1059,29 +1035,22 @@ void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _ if ( &rView != &_rSection ) { -// SdrRectObj *pNewObj = new SdrRectObj(OBJ_RECT, _aRect); -// SdrObject *pNewObj = new SdrUnoObj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Temp Label"))); SdrObject *pNewObj = new SdrUnoObj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FixedText"))); if (pNewObj) { pNewObj->SetLogicRect(_aRect); - // pNewObj->SetSize(_aRect.GetSize()); - // pNewObj->Move(Size(_aRect.Left(), _aRect.Top())); pNewObj->Move(Size(0, aNewPos.Y())); sal_Bool bChanged = rView.GetModel()->IsChanged(); rReportSection.getPage()->InsertObject(pNewObj); rView.GetModel()->SetChanged(bChanged); m_aBegDragTempList.push_back(pNewObj); - Rectangle aRect = pNewObj->GetLogicRect(); - // pNewObj->SetText(String::CreateFromAscii("Drag helper")); rView.MarkObj( pNewObj, rView.GetSdrPageView() ); } } const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aNewPos.Y() -= nSectionHeight; -// aNewPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height(); } } // ----------------------------------------------------------------------------- @@ -1116,7 +1085,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi // Create drag lines over all viewable Views // Therefore we need to identify the marked objects // and create temporary objects on all other views at the same position - // relative to its occurance. + // relative to its occurrence. OSL_TRACE("BegDragObj createInvisible Objects\n" ); int nViewCount = 0; @@ -1146,14 +1115,6 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi OSL_TRACE("BegDragObj createInvisible X:%d Y:%d on View #%d\n", aRect.Left(), aRect.Top(), nViewCount ); BegDragObj_createInvisibleObjectAtPosition(aRect, rView); - - // calculate the clickpoint -// const sal_Int32 nDeltaX = abs(aRect.Left() - aAbsolutePnt.X()); -// const sal_Int32 nDeltaY = abs(aRect.Top() - aAbsolutePnt.Y()); -// if (m_aDragDelta.X() > nDeltaX) -// m_aDragDelta.X() = nDeltaX; -// if (m_aDragDelta.Y() > nDeltaY) -// m_aDragDelta.Y() = nDeltaY; } } } @@ -1164,9 +1125,6 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aNewObjPos.Y() += nSectionHeight; - - // don't subtract the height of the lines between the views - // aNewObjPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height(); } const sal_Int32 nDeltaX = abs(aLeftTop.X() - aAbsolutePnt.X()); @@ -1175,38 +1133,13 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi m_aDragDelta.Y() = nDeltaY; Point aNewPos = aAbsolutePnt; - // for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter) - // { - // OReportSection& rReportSection = (*aIter)->getReportSection(); - // if ( &rReportSection.getSectionView() == _pSection ) - // break; - // aNewPos.Y() += rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); - // } const short nDrgLog = static_cast<short>(PixelToLogic(Size(3,0)).Width()); - // long nLastSectionHeight = 0; - // bool bAdd = true; nViewCount = 0; for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter) { OReportSection& rReportSection = (*aIter)->getReportSection(); - // if ( &rReportSection.getSectionView() == _pSection ) - // { - // bAdd = false; - // aNewPos = _aPnt; - // } - // else if ( bAdd ) - // { - // const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); - // aNewPos.Y() += nSectionHeight; - // } - // else - // { - // aNewPos.Y() -= nLastSectionHeight; - // } - - //? SdrHdl* pHdl = _pHdl; if ( pHdl ) { @@ -1221,8 +1154,6 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aNewPos.Y() -= nSectionHeight; - // subtract the height between the views, because they are visible but not from interest here. - // aNewPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height(); } } @@ -1259,10 +1190,7 @@ void OViewsWindow::BegMarkObj(const Point& _aPnt,const OSectionView* _pSection) } rReportSection.getSectionView().BegMarkObj ( aNewPos ); nLastSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); - - // aNewPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height(); } - //::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction( _aPnt , eMarkAction) ); } // ----------------------------------------------------------------------------- OSectionView* OViewsWindow::getSectionRelativeToPosition(const OSectionView* _pSection,Point& _rPnt) @@ -1340,9 +1268,6 @@ void OViewsWindow::EndDragObj(sal_Bool _bControlKeyPressed, const OSectionView* EndDragObj_removeInvisibleObjects(); // we need to manipulate the current clickpoint, we substract the old delta from BeginDrag - // OSectionView* pInSection = getSectionRelativeToPosition(_pSection, aPnt); - // aNewPos.X() -= m_aDragDelta.X(); - // aNewPos.Y() -= m_aDragDelta.Y(); aNewPos -= m_aDragDelta; uno::Sequence< beans::NamedValue > aAllreadyCopiedObjects; @@ -1358,7 +1283,7 @@ void OViewsWindow::EndDragObj(sal_Bool _bControlKeyPressed, const OSectionView* } else pInSection->EndDragObj(sal_False); - } // for (; aIter != aEnd; ++aIter) + } if ( aAllreadyCopiedObjects.getLength() ) { @@ -1454,11 +1379,9 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo aHdlPos = pHdl->GetPos(); } - TSectionsMap::iterator aIter/* = m_aSections.begin() */; + TSectionsMap::iterator aIter; TSectionsMap::iterator aEnd = m_aSections.end(); - //if ( _bMove ) - //{ for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter) { OReportSection& rReportSection = (*aIter)->getReportSection(); @@ -1466,8 +1389,7 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo break; const long nSectionHeight = (*aIter)->PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aCurrentSectionPos.Y() += nSectionHeight; - } // for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter) - //} + } aRealMousePos += aCurrentSectionPos; // If control key is pressed the work area is limited to the section with the current selection. @@ -1482,7 +1404,6 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo { Rectangle aClipRect = rView.GetWorkArea(); aClipRect.Top() = aCurrentSectionPos.Y() - aPosForWorkArea.Y(); - // if (aClipRect.Top() < 0) aClipRect.Top() = 0; aClipRect.Bottom() = aClipRect.Top() + nSectionHeight; rView.SetWorkArea( aClipRect ); } @@ -1493,7 +1414,6 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo rView.SetWorkArea( aClipRect ); } aPosForWorkArea.Y() += nSectionHeight; - // aNewPos.Y() += PixelToLogic(aIter->second.second->GetSizePixel()).Height(); } @@ -1510,62 +1430,6 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo const long nSectionHeight = (*aIter)->PixelToLogic((*aIter)->GetOutputSizePixel()).Height(); aRealMousePos.Y() -= nSectionHeight; } -#if 0 -#if OSL_DEBUG_LEVEL > 0 - // TEST TEST TEST TEST - // Ich versuche gerade rauszubekommen, ob ich ein Object bewege oder nur resize. - // TEST TEST TEST TEST - - for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter) - { - OReportSection& rReportSection = (*aIter)->getReportSection(); - OSectionView& rView = rReportSection.getSectionView(); - if ( rView.AreObjectsMarked() ) - { - rView.SortMarkedObjects(); - const sal_uInt32 nCount = rView.GetMarkedObjectCount(); - for (sal_uInt32 i=0; i < nCount; ++i) - { - const SdrMark* pM = rView.GetSdrMarkByIndex(i); - SdrObject* pObj = pM->GetMarkedSdrObj(); - (void)pObj; - - int dummy = 0; - (void)dummy; - } - } - - /* - OReportSection& rReportSection = (*aIter)->getReportSection(); - OSectionView& rView = rReportSection.getSectionView(); - const SdrHdlList& rHdlList = rView.GetHdlList(); - SdrHdl* pHdl2 = rHdlList.GetFocusHdl(); - - if ( pHdl2 != 0 ) - { - SdrHdlKind eKind = pHdl->GetKind(); - int dummy = 0; - switch(eKind) - { - case HDL_UPLFT: // Oben links - case HDL_UPPER: // Oben - case HDL_UPRGT: // Oben rechts - case HDL_LEFT: // Links - case HDL_RIGHT: // Rechts - case HDL_LWLFT: // Unten links - case HDL_LOWER: // Unten - case HDL_LWRGT: // Unten rechts - dummy = 1; - break; - default: - dummy = 0; - } - } - */ - } - // TEST TEST TEST TEST -#endif -#endif } // ----------------------------------------------------------------------------- sal_Bool OViewsWindow::IsAction() const @@ -1755,7 +1619,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode) if ( rView.IsDragObj() ) { - const FASTBOOL bWasNoSnap = rDragStat.IsNoSnap(); + const bool bWasNoSnap = rDragStat.IsNoSnap(); const sal_Bool bWasSnapEnabled = rView.IsSnapEnabled(); // switch snapping off @@ -1818,7 +1682,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode) void OViewsWindow::stopScrollTimer() { ::std::for_each(m_aSections.begin(),m_aSections.end(), - ::std::compose1(::boost::mem_fn(&OReportSection::stopScrollTimer),TReportPairHelper())); + ::o3tl::compose1(::boost::mem_fn(&OReportSection::stopScrollTimer),TReportPairHelper())); } // ----------------------------------------------------------------------------- void OViewsWindow::fillCollapsedSections(::std::vector<sal_uInt16>& _rCollapsedPositions) const @@ -1863,7 +1727,7 @@ void OViewsWindow::zoom(const Fraction& _aZoom) for (;aIter != aEnd ; ++aIter) { (*aIter)->zoom(_aZoom); - } // for (;aIter != aEnd ; ++aIter) + } Resize(); @@ -1888,7 +1752,6 @@ void OViewsWindow::scrollChildren(const Point& _aThumbPos) 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); } @@ -1897,7 +1760,7 @@ void OViewsWindow::scrollChildren(const Point& _aThumbPos) for (;aIter != aEnd ; ++aIter) { (*aIter)->scrollChildren(aPos.X()); - } // for (;aIter != aEnd ; ++aIter) + } } // ----------------------------------------------------------------------------- void OViewsWindow::fillControlModelSelection(::std::vector< uno::Reference< uno::XInterface > >& _rSelection) const @@ -1912,3 +1775,5 @@ void OViewsWindow::fillControlModelSelection(::std::vector< uno::Reference< uno: //============================================================================== } // rptui //============================================================================== + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/dlgedclip.cxx b/reportdesign/source/ui/report/dlgedclip.cxx index 9e068bb41a6d..614b9237afc5 100644 --- a/reportdesign/source/ui/report/dlgedclip.cxx +++ b/reportdesign/source/ui/report/dlgedclip.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,5 @@ OReportExchange::TSectionElements OReportExchange::extractCopies(const Transfera //============================================================================ } // rptui //============================================================================ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/dlgedfac.cxx b/reportdesign/source/ui/report/dlgedfac.cxx index bb5fde88a91c..5873611648b1 100644 --- a/reportdesign/source/ui/report/dlgedfac.cxx +++ b/reportdesign/source/ui/report/dlgedfac.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,9 +27,7 @@ ************************************************************************/ #include "precompiled_rptui.hxx" #include "dlgedfac.hxx" -#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" -#endif #include "RptObject.hxx" #include <RptDef.hxx> #include <com/sun/star/container/XNameContainer.hpp> @@ -102,7 +101,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) pObjFactory->pNewObj = new OOle2Obj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")),OBJ_OLE2); break; default: - OSL_ENSURE(0,"Unknown object id"); + OSL_FAIL("Unknown object id"); break; } } @@ -111,3 +110,5 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) } //---------------------------------------------------------------------------- } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index e85c8f921e7e..74998c162f60 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,7 +100,6 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) aPos.Y() *= 0.5; Rectangle aOutRect( aPos, aOut ); aOutRect = m_pParent->PixelToLogic( aOutRect ); - //Rectangle aWorkArea = m_pParent->getView()->GetWorkArea(); Point aGcc3WorkaroundTemporary; Rectangle aWorkArea(aGcc3WorkaroundTemporary,pScrollWindow->getTotalSize()); aWorkArea.Right() -= (long)aStartWidth; @@ -137,7 +137,6 @@ DlgEdFunc::DlgEdFunc( OReportSection* _pParent ) m_bUiActive(false), m_bShowPropertyBrowser(false) { - // m_pParent = _pParent; aScrollTimer.SetTimeoutHdl( LINK( this, DlgEdFunc, ScrollTimeout ) ); m_rView.SetActualWin( m_pParent); aScrollTimer.SetTimeout( SELENG_AUTOREPEAT_INTERVAL ); @@ -155,14 +154,7 @@ sal_Int32 lcl_setColorOfObject(uno::Reference< uno::XInterface > _xObj, long _nC try { uno::Reference<report::XReportComponent> xComponent(_xObj, uno::UNO_QUERY_THROW); - // NOT NEED if UNO_QUERY_THROW: - // if (xComponent.is()) - // { uno::Reference< beans::XPropertySet > xProp(xComponent, uno::UNO_QUERY_THROW); - // if (xProp.is()) - // { - // ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlBackground")) - // is PROPERTY_CONTROLBACKGROUND uno::Any aAny = xProp->getPropertyValue(PROPERTY_CONTROLBACKGROUND); if (aAny.hasValue()) { @@ -171,12 +163,9 @@ sal_Int32 lcl_setColorOfObject(uno::Reference< uno::XInterface > _xObj, long _nC uno::Any aBlackColorAny = uno::makeAny(_nColorTRGB); xProp->setPropertyValue(PROPERTY_CONTROLBACKGROUND, aBlackColorAny); } - // aCopies.push_back(xComponent->createClone()); } catch(uno::Exception&) { - // bit my shiny metal as! - // OSL_ENSURE(0,"Can't copy report elements!"); } return nBackColor; } @@ -217,7 +206,6 @@ sal_Bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) else { SdrHdl* pHdl = m_rView.PickHandle(m_aMDPos); - //m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(m_pView); // if selected object was hit, drag object if ( pHdl!=NULL || m_rView.IsMarkedHit(m_aMDPos) ) @@ -272,8 +260,8 @@ void DlgEdFunc::checkTwoCklicks(const MouseEvent& rMEvt) const SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); activateOle(pObj); - } // if (rMarkList.GetMarkCount() == 1) - } // if ( pView->AreObjectsMarked() ) + } + } } } // ----------------------------------------------------------------------------- @@ -322,7 +310,6 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) ((SdrHdlList&)rHdlList).ResetFocusHdl(); else m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); - //m_rView.UnmarkAll(); deactivateOle(true); bReturn = sal_False; @@ -394,7 +381,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) { bReturn = sal_True; break; - } // if ( !rCode.IsMod1() && !rCode.IsMod2() ) + } // run through default: { @@ -448,8 +435,8 @@ void DlgEdFunc::activateOle(SdrObject* _pObj) } } } - } // if (nSdrObjKind == OBJ_OLE2) - } // if ( _pObj ) + } + } } // ----------------------------------------------------------------------------- void DlgEdFunc::deactivateOle(bool _bSelect) @@ -477,9 +464,9 @@ void DlgEdFunc::deactivateOle(bool _bSelect) SdrPageView* pPV = m_rView.GetSdrPageView(); m_rView.MarkObj(pObj, pPV); } - } // if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::UI_ACTIVE ) + } } - } // for(sal_uLong i = 0 ; i< nCount;++i) + } } // ----------------------------------------------------------------------------- void DlgEdFunc::colorizeOverlappedObject(SdrObject* _pOverlappedObj) @@ -587,7 +574,6 @@ bool DlgEdFunc::isOnlyCustomShapeMarked() for (sal_uInt32 i = 0; i < rMarkList.GetMarkCount();++i ) { SdrMark* pMark = rMarkList.GetMark(i); - // bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL; SdrObject* pObj = pMark->GetMarkedSdrObj(); if (pObj->GetObjIdentifier() != OBJ_CUSTOMSHAPE) { @@ -612,7 +598,6 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt) if ( !bIsSetPoint ) { // no drag rect, we have to check every single select rect - //const Rectangle& rRect = m_rView.GetDragStat().GetActionRect(); const SdrDragStat& rDragStat = m_rView.GetDragStat(); if (rDragStat.GetDragMethod() != NULL) { @@ -701,15 +686,10 @@ sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); -// eHit == SDRHIT_UNMARKEDOBJECT under the mouse cursor is a unmarked object - if (eHit == SDRHIT_UNMARKEDOBJECT && nId != OBJ_CUSTOMSHAPE) { // there is an object under the mouse cursor, but not a customshape - // rtl::OUString suWasN = m_rView.getInsertObjString(); - // rtl::OUString suWasN2 = m_pParent->getSectionWindow()->getViewsWindow()->GetInsertObjString(); - m_pParent->getSectionWindow()->getViewsWindow()->BrkAction(); return sal_False; } @@ -775,7 +755,6 @@ sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) for (sal_uInt32 i = 0; i < rMarkList.GetMarkCount();++i ) { SdrMark* pMark = rMarkList.GetMark(i); - // bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL; OOle2Obj* pObj = dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj()); if ( pObj && !pObj->IsEmpty() ) { @@ -796,7 +775,7 @@ sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) SdrViewEvent aVEvt; m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); m_rView.MarkObj(aVEvt.pRootObj, pPV); - } // ift() && !rMEvt.IsMod2() ) + } checkTwoCklicks(rMEvt); m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView); return bReturn; @@ -832,9 +811,6 @@ sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) m_pParent->getSectionWindow()->getViewsWindow()->MovAction(aPos,&m_rView, m_rView.GetDragMethod() == NULL, false); } - //if ( isOver(m_rView.GetCreateObj(),*m_pParent->getPage(),*m_pView) ) - // m_pParent->SetPointer( Pointer(POINTER_NOTALLOWED)); - //else if ( !bIsSetPoint ) m_pParent->SetPointer( m_rView.GetPreferedPointer( aPos, m_pParent) ); @@ -885,7 +861,6 @@ sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) { if( !rMEvt.IsShift() ) m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); - //m_rView.UnmarkAll(); if ( rMEvt.GetClicks() == 1 ) { @@ -953,15 +928,6 @@ sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) { aPnt.Y() = 0; } - // grow section if it is under the current section -// else -// { -// const Size& aSectionSize = m_rView->GetSizePixel(); -// if ( aPnt.Y() > aSectionSize.Height() ) -// { -// aPnt.Y() = aSectionSize.Height(); -// } -// } } // drag or resize an object bool bControlKey = rMEvt.IsMod1(); @@ -979,147 +945,8 @@ sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) return sal_True; } -// ----------------------------------------------------------------------------- -//void DlgEdFuncSelect::SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, sal_Bool bQuickDrag) -//{ -// -// SdrPageView* pPV = m_rView.GetSdrPageView(); -// if( _pTextObj && _pTextObj->GetPage() == pPV->GetPage() ) -// { -// m_rView.SetCurrentObj(OBJ_TEXT); -// m_rView.SetEditMode(SDREDITMODE_EDIT); -// -// sal_Bool bEmptyOutliner = sal_False; -// -// if (!_pTextObj->GetOutlinerParaObject() && m_rView.GetTextEditOutliner()) -// { -// ::SdrOutliner* pOutl = m_rView.GetTextEditOutliner(); -// sal_uLong nParaAnz = pOutl->GetParagraphCount(); -// Paragraph* p1stPara = pOutl->GetParagraph( 0 ); -// -// if (nParaAnz==1 && p1stPara) -// { -// // Bei nur einem Pararaph -// if (pOutl->GetText(p1stPara).Len() == 0) -// { -// bEmptyOutliner = sal_True; -// } -// } -// } -// -// if (_pTextObj != m_rView.GetTextEditObject() || bEmptyOutliner) -// { -// sal_uInt32 nInv = _pTextObj->GetObjInventor(); -// sal_uInt16 nSdrObjKind = _pTextObj->GetObjIdentifier(); -// -// if (nInv == SdrInventor && _pTextObj->HasTextEdit() && -// (nSdrObjKind == OBJ_TEXT || -// nSdrObjKind == OBJ_TITLETEXT || -// nSdrObjKind == OBJ_OUTLINETEXT || -// (_pTextObj->ISA(SdrTextObj) && !_pTextObj->IsEmptyPresObj()))) -// { -// // Neuen Outliner machen (gehoert der SdrObjEditView) -// SdrModel* pModel = _pTextObj->GetModel(); -// SdrOutliner* pOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, pModel ); -// pOutl->SetMinDepth(0); -// pOutl->SetStyleSheetPool((SfxStyleSheetPool*) pModel->GetStyleSheetPool()); -// //pOutl->SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl)); -// sal_uLong nCntrl = pOutl->GetControlWord(); -// nCntrl |= EE_CNTRL_ALLOWBIGOBJS; -// nCntrl |= EE_CNTRL_URLSFXEXECUTE; -// nCntrl |= EE_CNTRL_MARKFIELDS; -// nCntrl |= EE_CNTRL_AUTOCORRECT; -// -// nCntrl &= ~EE_CNTRL_ULSPACESUMMATION; -// //if ( pModel->IsSummationOfParagraphs() ) -// // nCntrl |= EE_CNTRL_ULSPACESUMMATION; -// -// //SetSpellOptions( nCntrl ); -// -// pOutl->SetControlWord(nCntrl); -// -// uno::Reference< linguistic2::XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() ); -// if ( xSpellChecker.is() ) -// pOutl->SetSpeller( xSpellChecker ); -// -// uno::Reference< linguistic2::XHyphenator > xHyphenator( LinguMgr::GetHyphenator() ); -// if( xHyphenator.is() ) -// pOutl->SetHyphenator( xHyphenator ); -// -// pOutl->SetDefaultLanguage( Application::GetSettings().GetLanguage() ); -// -// // in einem Gliederungstext darf nicht auf die 0-te -// // Ebene ausgerueckt werden -// if (_pTextObj->GetObjInventor() == SdrInventor && -// _pTextObj->GetObjIdentifier() == OBJ_OUTLINETEXT) -// { -// pOutl->SetMinDepth(1); -// } -// -// if (bEmptyOutliner) -// { -// m_rView.SdrEndTextEdit(sal_True); -// } -// -// if( _pTextObj ) -// { -// OutlinerParaObject* pOPO = _pTextObj->GetOutlinerParaObject(); -// if( ( pOPO && pOPO->IsVertical() ) /*|| -// nSlotId == SID_ATTR_CHAR_VERTICAL || -// nSlotId == SID_TEXT_FITTOSIZE_VERTICAL */) -// pOutl->SetVertical( sal_True ); -// -// -// if (m_rView.SdrBeginTextEdit(_pTextObj, pPV, pParent, sal_True, pOutl) && _pTextObj->GetObjInventor() == SdrInventor) -// { -// //bFirstObjCreated = sal_True; -// //DeleteDefaultText(); -// -// OutlinerView* pOLV = m_rView.GetTextEditOutlinerView(); -// -// nSdrObjKind = _pTextObj->GetObjIdentifier(); -// -// SdrViewEvent aVEvt; -// SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); -// -// if (eHit == SDRHIT_TEXTEDIT) -// { -// // Text getroffen -// if (nSdrObjKind == OBJ_TEXT || -// nSdrObjKind == OBJ_TITLETEXT || -// nSdrObjKind == OBJ_OUTLINETEXT || -// //nSlotId == SID_TEXTEDIT || -// !bQuickDrag) -// { -// pOLV->MouseButtonDown(rMEvt); -// pOLV->MouseMove(rMEvt); -// pOLV->MouseButtonUp(rMEvt); -// } -// -// if ( bQuickDrag && _pTextObj->GetOutlinerParaObject()) -// { -// pOLV->MouseButtonDown(rMEvt); -// } -// } -// else -// { -// // #98198# Move cursor to end of text -// ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND); -// pOLV->SetSelection(aNewSelection); -// } -// } -// else -// { -// //RestoreDefaultText(); -// } -// } -// } -// } -// } -// else -// _pTextObj = NULL; -//} - //---------------------------------------------------------------------------- } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index 9e11d65fa427..4a54fa612094 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,28 +30,20 @@ #include "RptObject.hxx" #include "ReportController.hxx" #include <cppuhelper/component_context.hxx> -#ifndef _REPORT_DLGRESID_HRC #include <RptResId.hrc> -#endif -#ifndef _RPTUI_SLOTID_HRC_ #include "rptui_slotid.hrc" -#endif #include <tools/debug.hxx> #include <com/sun/star/awt/XLayoutConstrains.hpp> #include <com/sun/star/inspection/ObjectInspector.hpp> #include <com/sun/star/inspection/DefaultHelpProvider.hpp> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <vcl/stdtext.hxx> #include <svx/svdview.hxx> #include <svx/svdogrp.hxx> #include <svx/svdpage.hxx> #include <svx/svditer.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif #include <comphelper/property.hxx> #include <comphelper/namecontainer.hxx> #include <comphelper/composedprops.hxx> @@ -64,9 +57,7 @@ #include <comphelper/processfactory.hxx> #include "SectionView.hxx" #include "ReportSection.hxx" -#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" -#endif #include "DesignView.hxx" #include "ViewsWindow.hxx" #include "UITools.hxx" @@ -130,12 +121,12 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen if (m_xMeAsFrame.is()) { m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) ); - m_xMeAsFrame->setName(::rtl::OUString::createFromAscii("report property browser")); // change name! + m_xMeAsFrame->setName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("report property browser"))); // change name! } } catch (Exception&) { - DBG_ERROR("PropBrw::PropBrw: could not create/initialize my frame!"); + OSL_FAIL("PropBrw::PropBrw: could not create/initialize my frame!"); m_xMeAsFrame.clear(); } @@ -150,9 +141,6 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen xFactoryProperties->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ), UNO_QUERY_THROW ); - /*uno::Reference< XComponent> xModel = new OContextHelper(m_xORB,uno::Reference< XComponent>(m_pDesignView->getController().getModel(),uno::UNO_QUERY) ); - uno::Reference< XComponent> xDialogParentWindow = new OContextHelper(m_xORB,uno::Reference< XComponent>(VCLUnoHelper::GetInterface ( this ),uno::UNO_QUERY) ); - uno::Reference< XComponent> xConnection = new OContextHelper(m_xORB,uno::Reference< XComponent>(m_pDesignView->getController().getConnection(),uno::UNO_QUERY) );*/ // a ComponentContext for the ::cppu::ContextEntry_Init aHandlerContextInfo[] = { @@ -161,7 +149,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen ::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" ) ), makeAny( m_pDesignView->getController().getConnection() ) ), }; m_xInspectorContext.set( - ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ), + ::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ), xOwnContext ) ); // create a property browser controller bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB ); @@ -191,7 +179,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen } catch (Exception&) { - DBG_ERROR("PropBrw::PropBrw: could not create/initialize the browser controller!"); + OSL_FAIL("PropBrw::PropBrw: could not create/initialize the browser controller!"); try { ::comphelper::disposeComponent(m_xBrowserController); @@ -232,7 +220,7 @@ PropBrw::~PropBrw() const ::rtl::OUString pProps[] = { ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContextDocument" ) ) , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogParentWindow" ) ) , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" ) )}; - for (size_t i = 0; i < sizeof(pProps)/sizeof(pProps[0]); ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(pProps); ++i) xName->removeByName(pProps[i]); } } @@ -281,7 +269,7 @@ void PropBrw::implDetachController() } catch( const Exception& ) { - OSL_ENSURE( sal_False, "PropBrw::getCurrentPage: caught an exception while retrieving the current page!" ); + OSL_FAIL( "PropBrw::getCurrentPage: caught an exception while retrieving the current page!" ); } return sCurrentPage; } @@ -301,7 +289,7 @@ sal_Bool PropBrw::Close() } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FmPropBrw::Close: caught an exception while asking the controller!" ); + OSL_FAIL( "FmPropBrw::Close: caught an exception while asking the controller!" ); } } implDetachController(); @@ -358,10 +346,8 @@ void PropBrw::implSetNewObject( const uno::Sequence< Reference<uno::XInterface> } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FmPropBrw::StateChanged: caught an exception while setting the initial page!" ); + OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" ); } - - //Resize(); } SetText( GetHeadlineName(_aObjects) ); } @@ -377,13 +363,13 @@ void PropBrw::implSetNewObject( const uno::Sequence< Reference<uno::XInterface> } else if ( _aObjects.getLength() == 1 ) // single selection { - sal_uInt16 nResId = 0; aName = String(ModuleRes(RID_STR_BRWTITLE_PROPERTIES)); uno::Reference< container::XNameContainer > xNameCont(_aObjects[0],uno::UNO_QUERY); Reference< lang::XServiceInfo > xServiceInfo( xNameCont->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReportComponent"))), UNO_QUERY ); if ( xServiceInfo.is() ) { + sal_uInt16 nResId = 0; if ( xServiceInfo->supportsService( SERVICE_FIXEDTEXT ) ) { nResId = RID_STR_PROPTITLE_FIXEDTEXT; @@ -422,7 +408,7 @@ void PropBrw::implSetNewObject( const uno::Sequence< Reference<uno::XInterface> } else { - OSL_ENSURE(0,"Unknown service name!"); + OSL_FAIL("Unknown service name!"); nResId = RID_STR_CLASS_FORMATTEDFIELD; } @@ -533,7 +519,7 @@ void PropBrw::Update( OSectionView* pNewView ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FmPropBrw::StateChanged: caught an exception while setting the initial page!" ); + OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" ); } } } @@ -576,7 +562,7 @@ void PropBrw::Update( OSectionView* pNewView ) } catch ( Exception& ) { - DBG_ERROR( "PropBrw::Update: Exception occured!" ); + OSL_FAIL( "PropBrw::Update: Exception occurred!" ); } } //---------------------------------------------------------------------------- @@ -591,14 +577,14 @@ void PropBrw::Update( const uno::Reference< uno::XInterface>& _xReportComponent) { EndListening( *(m_pView->GetModel()) ); m_pView = NULL; - } // if ( m_pView ) + } uno::Reference< uno::XInterface> xTemp(CreateComponentPair(_xReportComponent,_xReportComponent)); implSetNewObject( uno::Sequence< uno::Reference< uno::XInterface> >(&xTemp,1) ); } catch ( Exception& ) { - DBG_ERROR( "PropBrw::Update: Exception occured!" ); + OSL_FAIL( "PropBrw::Update: Exception occurred!" ); } } } @@ -617,3 +603,5 @@ void PropBrw::LoseFocus() } //---------------------------------------------------------------------------- } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src index 95d1629d13ac..c4c64b83d1c6 100644 --- a/reportdesign/source/ui/report/report.src +++ b/reportdesign/source/ui/report/report.src @@ -112,25 +112,13 @@ String RID_STR_PROPTITLE_GROUP Image RID_IMG_TREENODE_COLLAPSED { - ImageBitmap = Bitmap { File = "plus.bmp"; } ; + ImageBitmap = Bitmap { File = "plus.png"; } ; MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }; }; Image RID_IMG_TREENODE_EXPANDED { - ImageBitmap = Bitmap { File = "minus.bmp"; } ; - MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }; -}; - -Image RID_IMG_TREENODE_COLLAPSED_HC -{ - ImageBitmap = Bitmap { File = "plus_sch.bmp"; } ; - MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }; -}; - -Image RID_IMG_TREENODE_EXPANDED_HC -{ - ImageBitmap = Bitmap { File = "minus_sch.bmp"; } ; + ImageBitmap = Bitmap { File = "minus.png"; } ; MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }; }; |