diff options
Diffstat (limited to 'chart2/source/controller')
34 files changed, 43 insertions, 346 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index bb63345bfd2f..ab3ebe750ff7 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -61,6 +61,7 @@ #include <vcl/window.hxx> #include <algorithm> +#include <o3tl/compat_functional.hxx> #include "ChartElementFactory.hxx" @@ -272,7 +273,7 @@ bool AccessibleBase::ImplUpdateChildren() aAccChildren.reserve( aModelChildren.size()); ::std::transform( m_aChildOIDMap.begin(), m_aChildOIDMap.end(), ::std::back_inserter( aAccChildren ), - ::std::select1st< ChildOIDMap::value_type >()); + ::o3tl::select1st< ChildOIDMap::value_type >()); ::std::sort( aModelChildren.begin(), aModelChildren.end()); diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 46dfb064896d..e61821a117f5 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -78,6 +78,7 @@ #include <vector> #include <algorithm> #include <functional> +#include <o3tl/compat_functional.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::chart; @@ -1482,7 +1483,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ChartDocumentWrapper::getAvailableServ ::std::transform( rMap.begin(), rMap.end(), aResult.getArray(), - ::std::select1st< tServiceNameMap::value_type >() ); + ::o3tl::select1st< tServiceNameMap::value_type >() ); return aResult; diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index ad5300a7d0bd..4819f51d1713 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -757,7 +757,7 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition ) aRelativePosition.Secondary = double(aPosition.Y)/double(aPageSize.Height); if( aRelativePosition.Primary < 0 || aRelativePosition.Secondary < 0 || aRelativePosition.Primary > 1 || aRelativePosition.Secondary > 1 ) { - DBG_ERROR("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" ); + OSL_FAIL("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" ); uno::Any aEmpty; xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty ); return; @@ -790,7 +790,7 @@ void SAL_CALL DiagramWrapper::setSize( const awt::Size& aSize ) if( aRelativeSize.Primary > 1 || aRelativeSize.Secondary > 1 ) { - DBG_ERROR("DiagramWrapper::setSize called with sizes bigger than page -> automatic values are taken instead" ); + OSL_FAIL("DiagramWrapper::setSize called with sizes bigger than page -> automatic values are taken instead" ); uno::Any aEmpty; xProp->setPropertyValue( C2U( "RelativeSize" ), aEmpty ); return; @@ -2043,7 +2043,7 @@ void SAL_CALL DiagramWrapper::setDiagram( throw (uno::RuntimeException) { //@todo: remove this method from interface - DBG_ERROR("DiagramWrapper::setDiagram is not implemented, should be removed and not be called" ); + OSL_FAIL("DiagramWrapper::setDiagram is not implemented, should be removed and not be called" ); } // ================================================================================ diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx index 5b41f0160b47..b0c62d859694 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx @@ -122,12 +122,12 @@ beans::PropertyState WrappedCharacterHeightProperty_Base::getPropertyState( cons Any WrappedCharacterHeightProperty_Base::convertInnerToOuterValue( const Any& rInnerValue ) const { - OSL_ASSERT("should not be used: WrappedCharacterHeightProperty_Base::convertInnerToOuterValue - check if you miss data"); + OSL_FAIL("should not be used: WrappedCharacterHeightProperty_Base::convertInnerToOuterValue - check if you miss data"); return rInnerValue; } Any WrappedCharacterHeightProperty_Base::convertOuterToInnerValue( const Any& rOuterValue ) const { - OSL_ASSERT("should not be used: WrappedCharacterHeightProperty_Base::convertOuterToInnerValue - check if you miss data"); + OSL_FAIL("should not be used: WrappedCharacterHeightProperty_Base::convertOuterToInnerValue - check if you miss data"); return rOuterValue; } diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx index 2a4808b6c585..04de30379a4f 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx @@ -90,7 +90,7 @@ Any WrappedNumberFormatProperty::getPropertyValue( const Reference< beans::XProp { if( !xInnerPropertySet.is() ) { - DBG_ERROR("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue"); + OSL_FAIL("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue"); return Any(); } Any aRet( xInnerPropertySet->getPropertyValue( m_aInnerName )); @@ -142,7 +142,7 @@ void WrappedLinkNumberFormatProperty::setPropertyValue( const Any& rOuterValue, { if( !xInnerPropertySet.is() ) { - DBG_ERROR("missing xInnerPropertySet in WrappedNumberFormatProperty::setPropertyValue"); + OSL_FAIL("missing xInnerPropertySet in WrappedNumberFormatProperty::setPropertyValue"); return; } @@ -178,7 +178,7 @@ Any WrappedLinkNumberFormatProperty::getPropertyValue( const Reference< beans::X { if( !xInnerPropertySet.is() ) { - DBG_ERROR("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue"); + OSL_FAIL("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue"); return getPropertyDefault(0); } bool bLink = ! xInnerPropertySet->getPropertyValue( C2U("NumberFormat" )).hasValue(); diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx index 3033e8ddbb00..4894d86a0a49 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx @@ -179,9 +179,10 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons if( rSubIncrements.getLength() == 0 ) rSubIncrements.realloc( 1 ); - double fStepMain = 0, fStepHelp = 0; + double fStepHelp = 0; if( (rOuterValue >>= fStepHelp) ) { + double fStepMain = 0; if( AxisHelper::isLogarithmic(aScaleData.Scaling) ) { sal_Int32 nIntervalCount = static_cast< sal_Int32 >(fStepHelp); diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 31f2d8a3bac2..85bbc8c82fda 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -1096,7 +1096,7 @@ void DataBrowser::InitController( } else { - DBG_ERROR( "Invalid Controller" ); + OSL_FAIL( "Invalid Controller" ); } } diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 9e382d4427c4..8a86162061ae 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -59,6 +59,7 @@ #include <iterator> #include <functional> #include <numeric> +#include <o3tl/compat_functional.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; @@ -122,10 +123,10 @@ OUString lcl_ConvertRole( const OUString & rRoleString, bool bFromInternalToUI ) { tTranslationMap::const_iterator aIt( ::std::find_if( aTranslationMap.begin(), aTranslationMap.end(), - ::std::compose1( ::std::bind2nd( + ::o3tl::compose1( ::std::bind2nd( ::std::equal_to< tTranslationMap::mapped_type >(), rRoleString ), - ::std::select2nd< tTranslationMap::value_type >()))); + ::o3tl::select2nd< tTranslationMap::value_type >()))); if( aIt != aTranslationMap.end()) aResult = (*aIt).first; diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index ac08d8748a7e..86b85c427828 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -401,7 +401,7 @@ OUString ObjectNameProvider::getTitleNameByType( TitleHelper::eTitleType eType ) aRet=String(SchResId(STR_OBJECT_TITLE_SECONDARY_Y_AXIS)); break; default: - DBG_ERROR("unknown title type"); + OSL_FAIL("unknown title type"); break; } diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index 52d3eb00c108..31e9d542ec05 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -39,8 +39,6 @@ #include "tp_ChartType.hxx" #include "tp_RangeChooser.hxx" #include "tp_Wizard_TitlesAndObjects.hxx" -#include "tp_Location.hxx" - #include "tp_DataSource.hxx" #include "ChartTypeTemplateProvider.hxx" #include "DialogModel.hxx" @@ -51,8 +49,6 @@ namespace chart //............................................................................. using namespace ::com::sun::star; -//#define LOCATION_PAGE 1 - #define PATH_FULL 1 #define STATE_FIRST 0 #define STATE_CHARTTYPE STATE_FIRST @@ -60,20 +56,11 @@ using namespace ::com::sun::star; #define STATE_DATA_SERIES 2 #define STATE_OBJECTS 3 #define STATE_LOCATION 4 - -#ifdef LOCATION_PAGE -#define STATE_LAST STATE_LOCATION -#else #define STATE_LAST STATE_OBJECTS -#endif namespace { -#ifdef LOCATION_PAGE - const sal_Int32 nPageCount = 5; -#else const sal_Int32 nPageCount = 4; -#endif } CreationWizard::CreationWizard( Window* pParent, const uno::Reference< frame::XModel >& xChartModel @@ -113,9 +100,6 @@ CreationWizard::CreationWizard( Window* pParent, const uno::Reference< frame::XM , STATE_SIMPLE_RANGE , STATE_DATA_SERIES , STATE_OBJECTS -#ifdef LOCATION_PAGE - , STATE_LOCATION -#endif , WZS_INVALID_STATE ); this->SetRoadmapSmartHelpId( SmartId( HID_SCH_WIZARD_ROADMAP ) ); @@ -178,14 +162,6 @@ svt::OWizardPage* CreationWizard::createPage(WizardState nState) m_aTimerTriggeredControllerLock.startTimer(); } break; -#ifdef LOCATION_PAGE - case STATE_LOCATION: - { - m_aTimerTriggeredControllerLock.startTimer(); - pRet = new LocationTabPage(this,m_xChartModel,m_xCC); - } - break; -#endif default: break; } @@ -252,11 +228,6 @@ String CreationWizard::getStateDisplayName( WizardState nState ) const case STATE_OBJECTS: nResId = STR_PAGE_CHART_ELEMENTS; break; -#ifdef LOCATION_PAGE - case STATE_LOCATION: - nResId = STR_PAGE_CHART_LOCATION; - break; -#endif default: break; } diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx index f2073c4e52e8..8f3502204107 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx +++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx @@ -94,7 +94,7 @@ DataEditor::DataEditor( bReadOnly = xStor->isReadonly(); SetReadOnly( bReadOnly ); - // #101228# change buttons to flat-look if set so by user + // change buttons to flat-look if set so by user SvtMiscOptions aMiscOptions; const sal_Int16 nStyle( aMiscOptions.GetToolboxStyle() ); // react on changes diff --git a/chart2/source/controller/dialogs/makefile.mk b/chart2/source/controller/dialogs/makefile.mk index cc6927476e64..06671a3bd64f 100644 --- a/chart2/source/controller/dialogs/makefile.mk +++ b/chart2/source/controller/dialogs/makefile.mk @@ -66,7 +66,6 @@ SLOFILES= \ $(SLO)$/tp_ChartType.obj \ $(SLO)$/tp_RangeChooser.obj \ $(SLO)$/tp_Wizard_TitlesAndObjects.obj \ - $(SLO)$/tp_Location.obj \ $(SLO)$/tp_AxisLabel.obj \ $(SLO)$/tp_AxisPositions.obj \ $(SLO)$/tp_DataLabel.obj \ @@ -114,7 +113,6 @@ SRC1FILES= \ tp_ChartType.src \ tp_RangeChooser.src \ tp_Wizard_TitlesAndObjects.src \ - tp_Location.src \ tp_AxisLabel.src \ tp_AxisPositions.src \ tp_DataLabel.src \ @@ -187,7 +185,6 @@ $(SRS)$/chcdialogs.srs: \ tp_PolarOptions.hrc \ tp_ChartType.hrc \ tp_DataSource.hrc \ - tp_Location.hrc \ tp_RangeChooser.hrc \ tp_Wizard_TitlesAndObjects.hrc diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 623294542829..27f54002c1d4 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -236,7 +236,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) { if( !m_pPool || !m_pNumberFormatter ) { - DBG_ERROR("Missing item pool or number formatter"); + OSL_FAIL("Missing item pool or number formatter"); return 1; } diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 6f3531818ef4..1cd110439e7f 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -569,10 +569,9 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, TRUE, &pPoolItem ); m_bMinusUnique = ( aState != SFX_ITEM_DONTCARE ); - double fMinusValue = 0.0; if( aState == SFX_ITEM_SET ) { - fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue(); + double fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue(); sal_Int32 nMinusValue = static_cast< sal_Int32 >( fMinusValue * pow(10.0,m_aMfNegative.GetDecimalDigits()) ); m_aMfNegative.SetValue( nMinusValue ); diff --git a/chart2/source/controller/dialogs/tp_Location.cxx b/chart2/source/controller/dialogs/tp_Location.cxx deleted file mode 100644 index e13c1c2f9779..000000000000 --- a/chart2/source/controller/dialogs/tp_Location.cxx +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_chart2.hxx" - -#include "tp_Location.hxx" -#include "tp_Location.hrc" -#include "ResId.hxx" -#include "Strings.hrc" -#include "NoWarningThisInCTOR.hxx" - -//............................................................................. -namespace chart -{ -//............................................................................. -using namespace ::com::sun::star; -using namespace ::com::sun::star::chart2; - -#ifdef LOCATION_PAGE - -LocationTabPage::LocationTabPage( svt::OWizardMachine* pParent - , const uno::Reference< XChartDocument >& xChartModel - , const uno::Reference< uno::XComponentContext >& xContext ) - : OWizardPage( pParent, SchResId(TP_LOCATION) ) - , m_aFL_Table( this, SchResId( FL_TABLE ) ) - , m_aFT_Table( this, SchResId( FT_TABLE ) ) - , m_aLB_Table( this, SchResId( LB_TABLE ) ) - , m_xChartModel( xChartModel ) - , m_xCC( xContext ) -{ - FreeResource(); - this->SetText( String( SchResId( STR_PAGE_CHART_LOCATION ) ) ); -} - -LocationTabPage::~LocationTabPage() -{ -} - -bool LocationTabPage::canAdvance() const -{ - return false; -} -#endif -//............................................................................. -} //namespace chart -//............................................................................. - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/tp_Location.hrc b/chart2/source/controller/dialogs/tp_Location.hrc deleted file mode 100644 index 419daa68721f..000000000000 --- a/chart2/source/controller/dialogs/tp_Location.hrc +++ /dev/null @@ -1,32 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "ResourceIds.hrc" - -#define FL_TABLE 1 -#define FT_TABLE 1 -#define LB_TABLE 1 diff --git a/chart2/source/controller/dialogs/tp_Location.hxx b/chart2/source/controller/dialogs/tp_Location.hxx deleted file mode 100644 index 9b4120ce60b2..000000000000 --- a/chart2/source/controller/dialogs/tp_Location.hxx +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _CHART2_TP_LOCATION_HXX -#define _CHART2_TP_LOCATION_HXX - -#include <com/sun/star/chart2/XChartDocument.hpp> -#include <svtools/wizardmachine.hxx> - -// header for class FixedText, FixedLine -#include <vcl/fixed.hxx> -// header for class ListBox -#include <vcl/lstbox.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> - -//............................................................................. -namespace chart -{ -//............................................................................. - -//----------------------------------------------------------------------------- -/** -*/ -#ifdef LOCATION_PAGE -class LocationTabPage : public svt::OWizardPage -{ -public: - LocationTabPage( svt::OWizardMachine* pParent - , const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument >& xChartModel - , const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XComponentContext >& xContext ); - virtual ~LocationTabPage(); - - virtual bool canAdvance() const; - -protected: - FixedLine m_aFL_Table; - FixedText m_aFT_Table; - ListBox m_aLB_Table; - - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument > m_xChartModel; - ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XComponentContext> m_xCC; -}; -#endif - -//............................................................................. -} //namespace chart -//............................................................................. -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/tp_Location.src b/chart2/source/controller/dialogs/tp_Location.src deleted file mode 100644 index 6b8c75a25b29..000000000000 --- a/chart2/source/controller/dialogs/tp_Location.src +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "HelpIds.hrc" -#include "tp_Location.hrc" -#include "dlg_CreationWizard.hrc" - -#ifndef _SVT_CONTROLDIMS_HRC_ -#include <svtools/controldims.hrc> -#endif - -#define MASKCOLOR MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; } -#define WIZ_POSX1 6 -#define WIZ_POSY1 6 -#define WIZ_POSX2 (6+4) -#define WIZ_POSY2 (WIZ_POSY1+RSC_CD_FIXEDTEXT_HEIGHT+4) -#define TEXT_WIDTH 50 -#define WIZ_POSX3 (WIZ_POSX2+TEXT_WIDTH+6) -#define WIZ_FIXEDLINE_WIDTH (CHART_WIZARD_PAGEWIDTH-WIZ_POSX1-6) -#define WIZ_LISTBOX_WIDTH (CHART_WIZARD_PAGEWIDTH-WIZ_POSX2-TEXT_WIDTH-6-6) - - -TabPage TP_LOCATION -{ - Hide = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( CHART_WIZARD_PAGEWIDTH , CHART_WIZARD_PAGEHEIGHT ) ; - - FixedLine FL_TABLE - { - Pos = MAP_APPFONT ( WIZ_POSX1 , WIZ_POSY1 ) ; - Size = MAP_APPFONT ( WIZ_FIXEDLINE_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ; - Text [ en-US ] = "Place chart" ; - }; - - FixedText FT_TABLE - { - Pos = MAP_APPFONT ( WIZ_POSX2 , WIZ_POSY2 ) ; - Size = MAP_APPFONT ( TEXT_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ; - Text [ en-US ] = "~Insert in sheet" ; - }; - - ListBox LB_TABLE - { - Border = TRUE ; - DropDown = TRUE ; - Pos = MAP_APPFONT ( WIZ_POSX3 , WIZ_POSY2 ) ; - Size = MAP_APPFONT ( WIZ_LISTBOX_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ; - }; -}; diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index 267ccf81a60e..e71f29c54d9f 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -87,10 +87,9 @@ void PolarOptionsTabPage::Reset(const SfxItemSet& rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - long nTmp; if (rInAttrs.GetItemState(SCHATTR_STARTING_ANGLE, TRUE, &pPoolItem) == SFX_ITEM_SET) { - nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); + long nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); m_aAngleDial.SetRotation( nTmp*100 ); } diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 039fcc9e599a..195be46fedf6 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -342,7 +342,7 @@ int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet) { if( !pNumFormatter ) { - DBG_ERROR( "No NumberFormatter available" ); + OSL_FAIL( "No NumberFormatter available" ); return LEAVE_PAGE; } @@ -440,7 +440,7 @@ void ScaleTabPage::SetNumFormatter( SvNumberFormatter* pFormatter ) aFmtFldStepMain.SetFormatter( pNumFormatter ); aFmtFldOrigin.SetFormatter( pNumFormatter ); - // #101318#, #i6278# allow more decimal places than the output format. As + // #i6278# allow more decimal places than the output format. As // the numbers shown in the edit fields are used for input, it makes more // sense to display the values in the input format rather than the output // format. diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index 3394568fb373..9a4d9ecdf76b 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -124,7 +124,6 @@ DrawViewWrapper::DrawViewWrapper( SdrModel* pSdrModel, OutputDevice* pOut, bool , m_apOutliner( SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, pSdrModel ) ) , m_bRestoreMapMode( false ) { - // #114898# SetBufferedOutputAllowed(true); SetBufferedOverlayAllowed(true); diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx index 927d9ccdb0e4..8aefcfe40b24 100644 --- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx +++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx @@ -222,7 +222,7 @@ FontList* ViewElementListProvider::getFontList() const if(!m_pFontList) { OutputDevice* pRefDev = m_pDrawModelWrapper ? m_pDrawModelWrapper->getReferenceDevice() : NULL; - OutputDevice* pDefaultOut = Application::GetDefaultDevice(); // #67730# + OutputDevice* pDefaultOut = Application::GetDefaultDevice(); m_pFontList = new FontList( pRefDev ? pRefDev : pDefaultOut , pRefDev ? pDefaultOut : NULL , FALSE ); diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index 70490a025fad..dd41bb4af525 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -300,7 +300,7 @@ void GraphicPropertyItemConverter::FillSpecialItem( } } } - catch( beans::UnknownPropertyException ex ) + catch( beans::UnknownPropertyException &ex ) { ASSERT_EXCEPTION( ex ); } @@ -314,11 +314,10 @@ void GraphicPropertyItemConverter::FillSpecialItem( ? C2U( "GradientStepCount" ) : C2U( "FillGradientStepCount" ); - sal_Int16 nStepCount = 0; uno::Any aValue( GetPropertySet()->getPropertyValue( aPropName ) ); if( hasLongOrShortValue(aValue) ) { - nStepCount = getShortForLongAlso(aValue); + sal_Int16 nStepCount = getShortForLongAlso(aValue); rOutItemSet.Put( XGradientStepCountItem( nStepCount )); } } @@ -545,7 +544,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( } } } - catch( beans::UnknownPropertyException ex ) + catch( beans::UnknownPropertyException &ex ) { ASSERT_EXCEPTION( ex ); } diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index 4f4cd36a7d66..322061b61b06 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -140,7 +140,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const delete pItem; } } - catch( beans::UnknownPropertyException ex ) + catch( beans::UnknownPropertyException &ex ) { delete pItem; OSL_ENSURE( false, @@ -150,7 +150,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const " - unknown Property: " )) + aProperty.first, RTL_TEXTENCODING_ASCII_US ).getStr()); } - catch( uno::Exception ex ) + catch( uno::Exception &ex ) { ASSERT_EXCEPTION( ex ); } @@ -162,7 +162,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const { FillSpecialItem( nWhich, rOutItemSet ); } - catch( uno::Exception ex ) + catch( uno::Exception &ex ) { ASSERT_EXCEPTION( ex ); } @@ -212,7 +212,7 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) bItemsChanged = true; } } - catch( beans::UnknownPropertyException ex ) + catch( beans::UnknownPropertyException &ex ) { OSL_ENSURE( false, ::rtl::OUStringToOString( @@ -221,7 +221,7 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) " - unknown Property: " )) + aProperty.first, RTL_TEXTENCODING_ASCII_US).getStr()); } - catch( uno::Exception ex ) + catch( uno::Exception &ex ) { OSL_ENSURE( false, ::rtl::OUStringToOString( ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx index eefa60a3f85b..ce2bf41a7479 100644 --- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx @@ -177,7 +177,7 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter( } } } - catch( uno::Exception ex ) + catch( uno::Exception &ex ) { ASSERT_EXCEPTION( ex ); } diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index da635df1175e..8c6e46057d9a 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -237,7 +237,7 @@ void ChartController::TheModel::tryTermination() //since we have indicated to give up the ownership with paramter true in close call //the one who has thrown the CloseVetoException is the new owner -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 OSL_ENSURE( !m_bOwnership, "INFO: a well known owner has catched a CloseVetoException after calling close(true)" ); #endif @@ -1069,7 +1069,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand ) , const uno::Sequence< beans::PropertyValue >& rArgs ) throw (uno::RuntimeException) { - //@todo avoid OString (see Mathias mail on bug #104387#) + //@todo avoid OString rtl::OString aCommand( rtl::OUStringToOString( rURL.Path, RTL_TEXTENCODING_ASCII_US ) ); if(aCommand.equals("Paste")) diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx index 107c8db62550..8ddc44ddb592 100644 --- a/chart2/source/controller/main/ChartController.hxx +++ b/chart2/source/controller/main/ChartController.hxx @@ -519,7 +519,7 @@ private: void removeListener( ChartController* pController ); void tryTermination(); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > - getModel() { return m_xModel;} + getModel() const { return m_xModel;} private: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel; diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 6a55514ac522..50d5d6b7fda6 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -790,15 +790,6 @@ void ChartController::executeDispatch_InsertAxisTitle() xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), getModel(), m_xCC, apRefSizeProvider.get() ); aUndoGuard.commitAction(); } - - /* - if( xTitle.is() ) - { - OUString aTitleCID = ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, getModel() ); - select( uno::makeAny(aTitleCID) ); - executeDispatch_EditText(); - } - */ } catch( uno::RuntimeException& e) { diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 168f42869245..62a3d8bdc929 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -103,7 +103,7 @@ namespace ObjectType eObjectType = ObjectIdentifier::getObjectType( aObjectCID ); if( OBJECTTYPE_UNKNOWN==eObjectType ) { - DBG_ERROR("unknown ObjectType"); + OSL_FAIL("unknown ObjectType"); return NULL; } diff --git a/chart2/source/controller/main/ChartRenderer.cxx b/chart2/source/controller/main/ChartRenderer.cxx index c0d802b9a003..5eed1da516a5 100644 --- a/chart2/source/controller/main/ChartRenderer.cxx +++ b/chart2/source/controller/main/ChartRenderer.cxx @@ -82,7 +82,7 @@ bool ChartRenderer::DoPaint(OutputDevice* pOutDev, const Rectangle& rLogicObject if( aContainerChartSize.Width != aChartSize.Width || aContainerChartSize.Height != aChartSize.Height ) { - DBG_ERROR("chart size does not equal size assumed by the container"); + OSL_FAIL("chart size does not equal size assumed by the container"); //correct the state here on the fly -> let the container size win ChartModelHelper::setPageSize( aContainerChartSize, xModel ); } diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx index aaf23fcc68a4..bb142a212985 100644 --- a/chart2/source/controller/main/ChartTransferable.cxx +++ b/chart2/source/controller/main/ChartTransferable.cxx @@ -128,7 +128,6 @@ sal_Bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUse { rxOStm->SetBufferSize( 0xff00 ); - // #108584# // for the changed pool defaults from drawing layer pool set those // attributes as hard attributes to preserve them for saving const SfxItemPool& rItemPool = pMarkedObjModel->GetItemPool(); @@ -163,7 +162,7 @@ sal_Bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUse break; default: { - DBG_ERROR( "ChartTransferable::WriteObject: unknown object id" ); + OSL_FAIL( "ChartTransferable::WriteObject: unknown object id" ); } break; } diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 903acfab38bc..967c059a7fba 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -151,7 +151,7 @@ void Selection::remindSelectionBeforeMouseDown() m_aSelectedOID_beforeMouseDown = m_aSelectedOID; } -bool Selection::isSelectionDifferentFromBeforeMouseDown() +bool Selection::isSelectionDifferentFromBeforeMouseDown() const { return ( m_aSelectedOID != m_aSelectedOID_beforeMouseDown ); } diff --git a/chart2/source/controller/main/SelectionHelper.hxx b/chart2/source/controller/main/SelectionHelper.hxx index 6317fb4b4109..0eaba382d9f7 100644 --- a/chart2/source/controller/main/SelectionHelper.hxx +++ b/chart2/source/controller/main/SelectionHelper.hxx @@ -74,7 +74,7 @@ public: //methods void resetPossibleSelectionAfterSingleClickWasEnsured(); void remindSelectionBeforeMouseDown(); - bool isSelectionDifferentFromBeforeMouseDown(); + bool isSelectionDifferentFromBeforeMouseDown() const; void adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* pDrawViewWrapper , bool bIsRightMouse, bool bWaitingForDoubleClick ); diff --git a/chart2/source/controller/makefile.mk b/chart2/source/controller/makefile.mk index b8a256181045..daaae0af0323 100644 --- a/chart2/source/controller/makefile.mk +++ b/chart2/source/controller/makefile.mk @@ -120,9 +120,6 @@ RESLIB1IMAGES=$(PRJ)$/res RESLIB1SRSFILES=$(RESLIB1LIST) RESLIB1DEPN=$(RESLIB1LIST) -#RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs -#RESLIB1DEPN= SRCFILES - # --- Targets ----------------------------------------------------------------- .INCLUDE: target.mk |