diff options
Diffstat (limited to 'chart2/source')
72 files changed, 117 insertions, 525 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 diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx index 7160af550495..a58bde00d381 100644 --- a/chart2/source/inc/CommonFunctors.hxx +++ b/chart2/source/inc/CommonFunctors.hxx @@ -30,6 +30,7 @@ #include <algorithm> #include <functional> +#include <o3tl/compat_functional.hxx> #include <rtl/math.hxx> #include <com/sun/star/uno/Any.hxx> #include <rtl/ustring.hxx> @@ -206,10 +207,10 @@ template< class MapType > findValueInMap( const MapType & rMap, const typename MapType::mapped_type & rData ) { return ::std::find_if( rMap.begin(), rMap.end(), - ::std::compose1( ::std::bind2nd( + ::o3tl::compose1( ::std::bind2nd( ::std::equal_to< typename MapType::mapped_type >(), rData ), - ::std::select2nd< typename MapType::value_type >())); + ::o3tl::select2nd< typename MapType::value_type >())); } /** Functor that deletes the object behind the given pointer by calling the diff --git a/chart2/source/inc/ContainerHelper.hxx b/chart2/source/inc/ContainerHelper.hxx index e7524b797d12..8358cf09562e 100644 --- a/chart2/source/inc/ContainerHelper.hxx +++ b/chart2/source/inc/ContainerHelper.hxx @@ -34,6 +34,7 @@ #include <algorithm> #include <functional> +#include <o3tl/compat_functional.hxx> namespace chart { @@ -154,7 +155,7 @@ template< class Map > { ::com::sun::star::uno::Sequence< typename Map::key_type > aResult( rCont.size()); ::std::transform( rCont.begin(), rCont.end(), aResult.getArray(), - ::std::select1st< typename Map::value_type >()); + ::o3tl::select1st< typename Map::value_type >()); return aResult; } @@ -171,7 +172,7 @@ template< class Map > { ::com::sun::star::uno::Sequence< typename Map::mapped_type > aResult( rCont.size()); ::std::transform( rCont.begin(), rCont.end(), aResult.getArray(), - ::std::select2nd< typename Map::value_type >()); + ::o3tl::select2nd< typename Map::value_type >()); return aResult; } diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx index 8a8900e4d171..a7ad7820c3a6 100644 --- a/chart2/source/inc/DataSeriesHelper.hxx +++ b/chart2/source/inc/DataSeriesHelper.hxx @@ -40,7 +40,7 @@ #include <vector> #include <functional> -#include <hash_set> +#include <boost/unordered_map.hpp> namespace chart { diff --git a/chart2/source/inc/InternalData.hxx b/chart2/source/inc/InternalData.hxx index f3eb3ac2645d..3a618dcd99a9 100644 --- a/chart2/source/inc/InternalData.hxx +++ b/chart2/source/inc/InternalData.hxx @@ -86,7 +86,7 @@ public: void setComplexColumnLabels( const tVecVecString& rNewColumnLabels ); tVecVecString getComplexColumnLabels() const; -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 void traceData() const; #endif diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx index b2ef06f6353d..d6d826db85ac 100644 --- a/chart2/source/model/filter/XMLFilter.cxx +++ b/chart2/source/model/filter/XMLFilter.cxx @@ -381,7 +381,7 @@ sal_Int32 XMLFilter::impl_Import( /** property map for import info set */ comphelper::PropertyMapEntry aImportInfoMap[] = { - // #80365# necessary properties for XML progress bar at load time + // necessary properties for XML progress bar at load time { MAP_LEN( "ProgressRange" ), 0, &::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, { MAP_LEN( "ProgressMax" ), 0, &::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, { MAP_LEN( "ProgressCurrent" ), 0, &::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index 4a866b2f0fa6..00ebab147245 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -54,6 +54,7 @@ #include <algorithm> #include <iterator> #include <functional> +#include <o3tl/compat_functional.hxx> using namespace ::com::sun::star; @@ -575,7 +576,7 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames() // get own default templates ::std::transform( rMap.begin(), rMap.end(), ::std::back_inserter( aServices ), - ::std::select1st< tTemplateMapType::value_type >()); + ::o3tl::select1st< tTemplateMapType::value_type >()); // add components that were registered in the context's factory uno::Reference< container::XContentEnumerationAccess > xEnumAcc( diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx index 5f23e2bbc670..301e23a5350f 100644 --- a/chart2/source/model/template/DataInterpreter.cxx +++ b/chart2/source/model/template/DataInterpreter.cxx @@ -85,7 +85,7 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource( if( ! xSource.is()) return InterpretedData(); -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 lcl_ShowDataSource( xSource ); #endif diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index d322c8277350..cc92baa54821 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -574,11 +574,11 @@ std::vector< Reference< XAxis > > AxisHelper::getAllAxesOfCoordinateSystem( if(xCooSys.is()) { - sal_Int32 nDimensionIndex = 0; sal_Int32 nMaxDimensionIndex = xCooSys->getDimension() -1; if( nMaxDimensionIndex>=0 ) { - for(nDimensionIndex=0; nDimensionIndex<=nMaxDimensionIndex; ++nDimensionIndex) + sal_Int32 nDimensionIndex = 0; + for(; nDimensionIndex<=nMaxDimensionIndex; ++nDimensionIndex) { const sal_Int32 nMaximumAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex); for(sal_Int32 nAxisIndex=0; nAxisIndex<=nMaximumAxisIndex; ++nAxisIndex) diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx index d56f4ca154eb..989b86eedff4 100644 --- a/chart2/source/tools/CommonConverters.cxx +++ b/chart2/source/tools/CommonConverters.cxx @@ -211,12 +211,12 @@ drawing::Position3D getPointFromPoly( const drawing::PolyPolygonShape3D& rPolygo } else { - ;DBG_ERROR("polygon was accessed with a wrong index"); + OSL_FAIL("polygon was accessed with a wrong index"); } } else { - ;DBG_ERROR("polygon was accessed with a wrong index"); + OSL_FAIL("polygon was accessed with a wrong index"); } return aRet; } diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx index 10729906f4d1..51d2d4cb0812 100644 --- a/chart2/source/tools/InternalData.cxx +++ b/chart2/source/tools/InternalData.cxx @@ -35,6 +35,7 @@ #include "macros.hxx" #include <rtl/math.hxx> +#include <algorithm> using ::com::sun::star::uno::Sequence; using ::rtl::OUString; @@ -365,7 +366,7 @@ void InternalData::insertColumn( sal_Int32 nAfterIndex ) if( nAfterIndex < static_cast< sal_Int32 >( m_aColumnLabels.size())) m_aColumnLabels.insert( m_aColumnLabels.begin() + (nAfterIndex + 1), vector< OUString >(1) ); -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 traceData(); #endif } @@ -417,7 +418,7 @@ void InternalData::insertRow( sal_Int32 nAfterIndex ) if( nAfterIndex < static_cast< sal_Int32 >( m_aRowLabels.size())) m_aRowLabels.insert( m_aRowLabels.begin() + nIndex, vector< OUString> (1)); -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 traceData(); #endif } @@ -453,7 +454,7 @@ void InternalData::deleteColumn( sal_Int32 nAtIndex ) if( nAtIndex < static_cast< sal_Int32 >( m_aColumnLabels.size())) m_aColumnLabels.erase( m_aColumnLabels.begin() + nAtIndex ); -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 traceData(); #endif } @@ -493,7 +494,7 @@ void InternalData::deleteRow( sal_Int32 nAtIndex ) if( nAtIndex < static_cast< sal_Int32 >( m_aRowLabels.size())) m_aRowLabels.erase( m_aRowLabels.begin() + nAtIndex ); -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 traceData(); #endif } @@ -538,7 +539,7 @@ vector< vector< OUString > > InternalData::getComplexColumnLabels() const return m_aColumnLabels; } -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 void InternalData::traceData() const { OSL_TRACE( "InternalData: Data in rows\n" ); diff --git a/chart2/source/tools/LegendHelper.cxx b/chart2/source/tools/LegendHelper.cxx index 9bbdc1749b9c..8ced934fa4d8 100644 --- a/chart2/source/tools/LegendHelper.cxx +++ b/chart2/source/tools/LegendHelper.cxx @@ -113,7 +113,7 @@ uno::Reference< chart2::XLegend > LegendHelper::getLegend( } else if(bCreate) { - DBG_ERROR("need diagram for creation of legend"); + OSL_FAIL("need diagram for creation of legend"); } } catch( uno::Exception & ex ) diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index 5084e93f605c..51f49e71b7b1 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -490,58 +490,6 @@ LifeTimeGuard::~LifeTimeGuard() } } -/* -the XCloseable::close method has to be implemented in the following way: -::close -{ - //hold no mutex - - if( !m_aLifeTimeManager.g_close_startTryClose( bDeliverOwnership ) ) - return; - //no mutex is acquired - - // At the end of this method may we must dispose ourself ... - // and may nobody from outside hold a reference to us ... - // then it's a good idea to do that by ourself. - uno::Reference< uno::XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) ); - - //the listeners have had no veto - //check wether we self can close - { - util::CloseVetoException aVetoException = util::CloseVetoException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "the model itself could not be closed" ) ) - , static_cast< ::cppu::OWeakObject* >(this)); - - if( m_aLifeTimeManager.g_close_isNeedToCancelLongLastingCalls( bDeliverOwnership, aVetoException ) ) - { - ////you can empty this block, if you never start longlasting calls or - ////if your longlasting calls are per default not cancelable (check how you have constructed your LifeTimeManager) - - sal_Bool bLongLastingCallsAreCanceled = sal_False; - try - { - //try to cancel running longlasting calls - //// @todo - } - catch( uno::Exception& ex ) - { - //// @todo - //do not throw anything here!! (without endTryClose) - } - //if not successful canceled - if(!bLongLastingCallsAreCanceled) - { - m_aLifeTimeManager.g_close_endTryClose( bDeliverOwnership, sal_True ); - throw aVetoException; - } - } - - } - m_aLifeTimeManager.g_close_endTryClose_doClose(); -} -*/ - }//end namespace apphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/tools/OPropertySet.cxx b/chart2/source/tools/OPropertySet.cxx index e44816954340..94fe66a5388f 100644 --- a/chart2/source/tools/OPropertySet.cxx +++ b/chart2/source/tools/OPropertySet.cxx @@ -304,7 +304,7 @@ void SAL_CALL OPropertySet::setFastPropertyValue_NoBroadcast { aDefault = GetDefaultValue( nHandle ); } - catch( beans::UnknownPropertyException ex ) + catch( beans::UnknownPropertyException& ) { aDefault.clear(); } @@ -385,7 +385,7 @@ void SAL_CALL OPropertySet::getFastPropertyValue { rValue = GetDefaultValue( nHandle ); } - catch( beans::UnknownPropertyException ex ) + catch( beans::UnknownPropertyException& ) { rValue.clear(); } diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx index 8f3a504bfb0a..4e0a2e7404e2 100644 --- a/chart2/source/tools/RangeHighlighter.cxx +++ b/chart2/source/tools/RangeHighlighter.cxx @@ -216,12 +216,14 @@ void RangeHighlighter::fillRangesForDiagram( const Reference< chart2::XDiagram > void RangeHighlighter::fillRangesForDataSeries( const uno::Reference< chart2::XDataSeries > & xSeries ) { - sal_Int32 nPreferredColor = PREFERED_DEFAULT_COLOR; Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY ); if( xSource.is()) + { + sal_Int32 nPreferredColor = PREFERED_DEFAULT_COLOR; lcl_fillRanges( m_aSelectedRanges, ::chart::DataSourceHelper::getRangesFromDataSource( xSource ), nPreferredColor ); + } } void RangeHighlighter::fillRangesForErrorBars( @@ -245,12 +247,14 @@ void RangeHighlighter::fillRangesForErrorBars( if( bUsesRangesAsErrorBars ) { - sal_Int32 nPreferredColor = PREFERED_DEFAULT_COLOR; Reference< chart2::data::XDataSource > xSource( xErrorBar, uno::UNO_QUERY ); if( xSource.is()) + { + sal_Int32 nPreferredColor = PREFERED_DEFAULT_COLOR; lcl_fillRanges( m_aSelectedRanges, ::chart::DataSourceHelper::getRangesFromDataSource( xSource ), nPreferredColor ); + } } else { @@ -269,12 +273,12 @@ void RangeHighlighter::fillRangesForCategories( const Reference< chart2::XAxis > void RangeHighlighter::fillRangesForDataPoint( const Reference< uno::XInterface > & xDataSeries, sal_Int32 nIndex ) { - sal_Int32 nPreferredColor = PREFERED_DEFAULT_COLOR; if( xDataSeries.is()) { Reference< chart2::data::XDataSource > xSource( xDataSeries, uno::UNO_QUERY ); if( xSource.is() ) { + sal_Int32 nPreferredColor = PREFERED_DEFAULT_COLOR; ::std::vector< chart2::data::HighlightedRange > aHilightedRanges; Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeqSeq( xSource->getDataSequences()); for( sal_Int32 i=0; i<aLSeqSeq.getLength(); ++i ) diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx index e344be87b493..43d6e364fd23 100644 --- a/chart2/source/tools/ThreeDHelper.cxx +++ b/chart2/source/tools/ThreeDHelper.cxx @@ -555,7 +555,7 @@ void ThreeDHelper::convertElevationRotationDegToXYZAngleRad( z = atan(tan(R) * sin(E)); if(cos(z)==0.0) { - DBG_ERROR("calculation error in ThreeDHelper::convertElevationRotationDegToXYZAngleRad"); + OSL_FAIL("calculation error in ThreeDHelper::convertElevationRotationDegToXYZAngleRad"); return; } double cy = cos(R)/cos(z); @@ -566,7 +566,7 @@ void ThreeDHelper::convertElevationRotationDegToXYZAngleRad( double fDenominator = cos(z)*(1.0-pow(sin(y),2)); if(fDenominator==0.0) { - DBG_ERROR("calculation error in ThreeDHelper::convertElevationRotationDegToXYZAngleRad"); + OSL_FAIL("calculation error in ThreeDHelper::convertElevationRotationDegToXYZAngleRad"); return; } double sx = cos(R)*sin(E)/fDenominator; diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx index 8b414ac35562..6cd9585d76af 100644 --- a/chart2/source/tools/TitleHelper.cxx +++ b/chart2/source/tools/TitleHelper.cxx @@ -229,12 +229,14 @@ uno::Reference< XTitle > TitleHelper::createTitle( Reference< beans::XPropertySet > xTitleProps( xTitle, uno::UNO_QUERY ); if( xTitleProps.is() ) { - double fNewAngleDegree = 90.0; if( (!bIsVertical && eTitleType == TitleHelper::Y_AXIS_TITLE) || (bIsVertical && eTitleType == TitleHelper::X_AXIS_TITLE) || (!bIsVertical && eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE) || (bIsVertical && eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE) ) + { + double fNewAngleDegree = 90.0; xTitleProps->setPropertyValue( C2U( "TextRotation" ), uno::makeAny( fNewAngleDegree )); + } } } catch( uno::Exception & ex ) diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx index 7082699b5d91..ca3dd7227b5b 100644 --- a/chart2/source/tools/WrappedPropertySet.cxx +++ b/chart2/source/tools/WrappedPropertySet.cxx @@ -116,7 +116,7 @@ void SAL_CALL WrappedPropertySet::setPropertyValue( const OUString& rPropertyNam else { #if OSL_DEBUG_LEVEL > 1 - DBG_ERROR("found no inner property set to map to"); + OSL_FAIL("found no inner property set to map to"); #endif } } @@ -165,7 +165,7 @@ Any SAL_CALL WrappedPropertySet::getPropertyValue( const OUString& rPropertyName else { #if OSL_DEBUG_LEVEL > 1 - DBG_ERROR("found no inner property set to map to"); + OSL_FAIL("found no inner property set to map to"); #endif } } @@ -265,6 +265,8 @@ void SAL_CALL WrappedPropertySet::setPropertyValues( const Sequence< OUString >& } } //todo: store unknown properties elsewhere + OSL_ENSURE(!bUnknownProperty,"unknown property"); + (void)bUnknownProperty; // if( bUnknownProperty ) // throw beans::UnknownPropertyException(); } diff --git a/chart2/source/tools/makefile.mk b/chart2/source/tools/makefile.mk index 2f990af7adb0..8eb81ba82d46 100644 --- a/chart2/source/tools/makefile.mk +++ b/chart2/source/tools/makefile.mk @@ -43,10 +43,6 @@ CDEFS += -DOOO_DLLIMPLEMENTATION_CHARTTOOLS # --- export library ------------------------------------------------- -#You can use several library macros of this form to build libraries that -#do not consist of all object files in a directory or to merge different libraries. -#LIB1TARGET= $(SLB)$/_$(TARGET).lib - #Specifies object files to bind into linked libraries. SLOFILES= \ $(SLO)$/ErrorBar.obj \ @@ -149,12 +145,6 @@ SHL1STDLIBS= \ $(BASEGFXLIB) \ $(UNOTOOLSLIB) -# $(SVLIB) \ -# $(SVTOOLLIB) \ -# $(SVXLIB) \ -# $(TKLIB) \ -# $(SFXLIB) - #--------exports #specifies the exported symbols for Windows only: @@ -163,9 +153,6 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def #Specifies the library name to parse for symbols. For Win32 only. DEFLIB1NAME= $(TARGET) -#A file of symbols to export. -#DEF1EXPORTFILE= $(PRJ)$/source$/inc$/exports.dxp - #--------definition file #name of the definition file: diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx index 0749c5b9c413..e45b2c6ec7f2 100644 --- a/chart2/source/view/axes/TickmarkHelper.cxx +++ b/chart2/source/view/axes/TickmarkHelper.cxx @@ -33,6 +33,7 @@ #include <rtl/math.hxx> #include <tools/debug.hxx> #include <memory> +#include <limits> //............................................................................. namespace chart @@ -481,7 +482,12 @@ sal_Int32 TickmarkHelper::getMaxTickCount( sal_Int32 nDepth ) const if (!isFinite(fSub)) return 0; - sal_Int32 nIntervalCount = static_cast<sal_Int32>( fSub / m_rIncrement.Distance ); + double fIntervalCount = fSub / m_rIncrement.Distance; + if (fIntervalCount > std::numeric_limits<sal_Int32>::max()) + // Interval count too high! Bail out. + return 0; + + sal_Int32 nIntervalCount = static_cast<sal_Int32>(fIntervalCount); nIntervalCount+=3; for(sal_Int32 nN=0; nN<nDepth-1; nN++) @@ -596,6 +602,9 @@ void TickmarkHelper::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& rA sal_Int32 nDepthCount = this->getTickDepth(); sal_Int32 nMaxMajorTickCount = this->getMaxTickCount( 0 ); + if (nDepthCount <= 0 || nMaxMajorTickCount <= 0) + return; + aAllTicks.realloc(nDepthCount); aAllTicks[0].realloc(nMaxMajorTickCount); diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 7d6a7094c203..d22a9ff4b7b8 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -832,7 +832,7 @@ B2DVector VCartesianAxis::getScreenPosition( double fLogicX, double fLogicY, dou } else { - DBG_ERROR("cannot calculate scrren position in VCartesianAxis::getScreenPosition"); + OSL_FAIL("cannot calculate scrren position in VCartesianAxis::getScreenPosition"); } } else diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx index 968c52b68bcd..a45cf6977f11 100644 --- a/chart2/source/view/axes/VPolarAngleAxis.cxx +++ b/chart2/source/view/axes/VPolarAngleAxis.cxx @@ -179,7 +179,6 @@ void SAL_CALL VPolarAngleAxis::createLabels() return; double fLogicRadius = m_pPosHelper->getOuterLogicRadius(); - double fLogicZ = -0.5;//as defined if( m_aAxisProperties.m_bDisplayLabels ) { @@ -197,6 +196,7 @@ void SAL_CALL VPolarAngleAxis::createLabels() AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties ); aAxisLabelProperties.bOverlapAllowed = true; + double fLogicZ = -0.5;//as defined while( !createTextShapes_ForAngleAxis( m_xTextTarget, aTickIter , aAxisLabelProperties , fLogicRadius, fLogicZ diff --git a/chart2/source/view/axes/makefile.mk b/chart2/source/view/axes/makefile.mk index 96191a3a3a25..9e1d6ca38f7d 100644 --- a/chart2/source/view/axes/makefile.mk +++ b/chart2/source/view/axes/makefile.mk @@ -37,10 +37,6 @@ ENABLE_EXCEPTIONS= TRUE .INCLUDE: settings.mk .INCLUDE: $(PRJ)$/chartview.pmk -#.IF "$(GUI)" == "WNT" -#CFLAGS+=-GR -#.ENDIF - # --- export library ------------------------------------------------- #object files to build and link together to lib $(SLB)$/$(TARGET).lib diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index 4d2f5ad8716b..7a35c3926e37 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -912,7 +912,7 @@ void AreaChart::createShapes() //todo implement this different for area charts break; default: - DBG_ERROR("this label alignment is not implemented yet"); + OSL_FAIL("this label alignment is not implemented yet"); aScenePosition3D.PositionY -= (aSymbolSize.DirectionY/2+1); eAlignment = LABEL_ALIGN_TOP; break; diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index d3310221242f..036136384237 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -191,7 +191,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment( { fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0; rAlignment = LABEL_ALIGN_CENTER; - DBG_ERROR( "top label placement is not really supported by horizontal bar charts" ); + OSL_FAIL( "top label placement is not really supported by horizontal bar charts" ); } } break; @@ -208,7 +208,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment( { fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0; rAlignment = LABEL_ALIGN_CENTER; - DBG_ERROR( "bottom label placement is not supported by horizontal bar charts" ); + OSL_FAIL( "bottom label placement is not supported by horizontal bar charts" ); } } break; @@ -225,7 +225,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment( { fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0; rAlignment = LABEL_ALIGN_CENTER; - DBG_ERROR( "left label placement is not supported by column charts" ); + OSL_FAIL( "left label placement is not supported by column charts" ); } } break; @@ -242,7 +242,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment( { fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0; rAlignment = LABEL_ALIGN_CENTER; - DBG_ERROR( "right label placement is not supported by column charts" ); + OSL_FAIL( "right label placement is not supported by column charts" ); } } break; @@ -286,7 +286,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment( fDepth = fabs(fScaledUpperBarDepth-fScaledLowerBarDepth)/2.0; break; default: - DBG_ERROR("this label alignment is not implemented yet"); + OSL_FAIL("this label alignment is not implemented yet"); break; } diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index 27b952938b82..4c35fc1dd870 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -382,7 +382,7 @@ void BubbleChart::createShapes() eAlignment = LABEL_ALIGN_CENTER; break; default: - DBG_ERROR("this label alignment is not implemented yet"); + OSL_FAIL("this label alignment is not implemented yet"); aScenePosition3D.PositionY -= (aSymbolSize.DirectionY/2+1); eAlignment = LABEL_ALIGN_TOP; break; diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index edb9e08b8018..8a618cdfeeb7 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -395,9 +395,7 @@ void PieChart::createShapes() if( !bIsVisible ) continue; - double fLogicZ = -0.5;//as defined double fDepth = this->getTransformedDepth(); -//============================================================================= uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget); //collect data point information (logic coordinates, style ): @@ -448,6 +446,7 @@ void PieChart::createShapes() } //create data point + double fLogicZ = -0.5;//as defined uno::Reference<drawing::XShape> xPointShape( createDataPoint( xSeriesGroupShape_Shapes, xPointProperties , fUnitCircleStartAngleDegree, fUnitCircleWidthAngleDegree diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx index 91c03e62f0fa..c0e99e756048 100644 --- a/chart2/source/view/charttypes/Splines.cxx +++ b/chart2/source/view/charttypes/Splines.cxx @@ -128,7 +128,7 @@ lcl_SplineCalculation::lcl_SplineCalculation( { ::rtl::math::setInf( &m_fLastInterpolatedValue, sal_False ); - // #108301# remove points that have equal x-values + // remove points that have equal x-values m_aPoints.erase( ::std::unique( m_aPoints.begin(), m_aPoints.end(), lcl_EqualsFirstDoubleOfPair< double >() ), m_aPoints.end() ); diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx index 2a6c5963a6aa..389668757bc6 100644 --- a/chart2/source/view/inc/VDataSeries.hxx +++ b/chart2/source/view/inc/VDataSeries.hxx @@ -45,14 +45,9 @@ #include <com/sun/star/drawing/XShapes.hpp> #include <cppuhelper/weakref.hxx> -//............................................................................. namespace chart { -//............................................................................. -//----------------------------------------------------------------------------- -/** -*/ class VDataSequence { public: @@ -149,10 +144,9 @@ public: sal_Int32 m_nPolygonIndex; double m_fLogicMinX; double m_fLogicMaxX; - // + //this is here for deep stacking: double m_fLogicZPos;//from 0 to series count -1 - // rtl::OUString getCID() const; rtl::OUString getSeriesParticle() const; @@ -253,15 +247,12 @@ private: //member m_apSymbolProperties_InvisibleSymbolForSelection; mutable sal_Int32 m_nCurrentAttributedPoint; ::com::sun::star::awt::Size m_aReferenceSize; - // sal_Int32 m_nMissingValueTreatment; bool m_bAllowPercentValueInDataLabel; }; -//............................................................................. } //namespace chart -//............................................................................. #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index d4654624fef8..826210b9875a 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -191,7 +191,7 @@ void SAL_CALL ChartView::initialize( const uno::Sequence< uno::Any >& aArguments uno::Reference< frame::XModel > xNewChartModel; if( !(aArguments[0] >>= xNewChartModel) ) { - DBG_ERROR( "need a Reference to frame::XModel as first parameter for view initialization" ); + OSL_FAIL( "need a Reference to frame::XModel as first parameter for view initialization" ); } impl_setChartModel( xNewChartModel ); @@ -2499,27 +2499,7 @@ void lcl_removeEmptyGroupShapes( const Reference< drawing::XShapes>& xParent ) bool ChartView::impl_AddInDrawsAllByItself() { - bool bRet = false; - /* - uno::Reference< beans::XPropertySet > xProp( m_xChartModel, uno::UNO_QUERY ); - if( xProp.is()) try - { - uno::Reference< util::XRefreshable > xAddIn; - xProp->getPropertyValue( C2U( "AddIn" ) ) >>= xAddIn; - if( xAddIn.is() ) - { - rtl::OUString aBaseDiagram; - xProp->getPropertyValue( C2U( "BaseDiagram" ) ) >>= aBaseDiagram; - if(aBaseDiagram.getLength()) - bRet = true; - } - } - catch( uno::Exception& e ) - { - ASSERT_EXCEPTION( e ); - } - */ - return bRet; + return false; } void ChartView::impl_refreshAddIn() @@ -2580,7 +2560,7 @@ void ChartView::createShapes() pPage->SetSize(Size(aPageSize.Width,aPageSize.Height)); else { - DBG_ERROR("could not set page size correctly"); + OSL_FAIL("could not set page size correctly"); } { diff --git a/chart2/source/view/main/Clipping.cxx b/chart2/source/view/main/Clipping.cxx index 20e59e4a8442..d13a6fd13faf 100644 --- a/chart2/source/view/main/Clipping.cxx +++ b/chart2/source/view/main/Clipping.cxx @@ -191,7 +191,7 @@ void lcl_addPointToPoly( drawing::PolyPolygonShape3D& rPoly if( nNewResultPointCount > nReallocLength ) { nReallocLength = nNewResultPointCount; - DBG_ERROR("this should not be the case to avoid performance problems"); + OSL_FAIL("this should not be the case to avoid performance problems"); } pOuterSequenceX->realloc(nReallocLength); pOuterSequenceY->realloc(nReallocLength); diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index ff5eeb161b81..745996dc85e5 100644 --- a/chart2/source/view/main/DrawModelWrapper.cxx +++ b/chart2/source/view/main/DrawModelWrapper.cxx @@ -175,7 +175,7 @@ DrawModelWrapper::DrawModelWrapper( } catch(...) { - DBG_ERROR("Can't get Hyphenator or SpellChecker for chart"); + OSL_FAIL("Can't get Hyphenator or SpellChecker for chart"); } //ref device for font rendering diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx index cd4030f421e8..5bb2a5f08d07 100644 --- a/chart2/source/view/main/LabelPositionHelper.cxx +++ b/chart2/source/view/main/LabelPositionHelper.cxx @@ -99,10 +99,10 @@ void lcl_doDynamicFontResize( uno::Any* pAOldAndNewFontHeightAny , const awt::Size& rOldReferenceSize , const awt::Size& rNewReferenceSize ) { - double fOldFontHeight = 0, fNewFontHeight; + double fOldFontHeight = 0; if( pAOldAndNewFontHeightAny && ( *pAOldAndNewFontHeightAny >>= fOldFontHeight ) ) { - fNewFontHeight = RelativeSizeHelper::calculate( fOldFontHeight, rOldReferenceSize, rNewReferenceSize ); + double fNewFontHeight = RelativeSizeHelper::calculate( fOldFontHeight, rOldReferenceSize, rNewReferenceSize ); *pAOldAndNewFontHeightAny = uno::makeAny(fNewFontHeight); } } diff --git a/chart2/source/view/main/NumberFormatterWrapper.cxx b/chart2/source/view/main/NumberFormatterWrapper.cxx index 57801472c099..ba109582aac9 100644 --- a/chart2/source/view/main/NumberFormatterWrapper.cxx +++ b/chart2/source/view/main/NumberFormatterWrapper.cxx @@ -99,7 +99,7 @@ rtl::OUString NumberFormatterWrapper::getFormattedString( Color* pTextColor = NULL; if( !m_pNumberFormatter ) { - DBG_ERROR("Need a NumberFormatter"); + OSL_FAIL("Need a NumberFormatter"); return aText; } // i99104 handle null date correctly diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx index 4b3948fc6b4d..99b1ec8a2f21 100644 --- a/chart2/source/view/main/PropertyMapper.cxx +++ b/chart2/source/view/main/PropertyMapper.cxx @@ -178,15 +178,9 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProper //shape property -- chart model object property static tMakePropertyNameMap m_aShapePropertyMapForCharacterProperties = tMakePropertyNameMap -// ( C2U( "CharBackColor" ), C2U("TextBackgroundColor") ) -// ( C2U( "CharCaseMap" ), C2U("CaseMapping") ) ( C2U( "CharColor" ), C2U("CharColor") ) ( C2U( "CharContoured" ), C2U("CharContoured") ) -/////// ( C2U( "CharCrossedOut" ), C2U("CharCrossedOut") ) //setting this explicitly somehow conflicts with CharStrikeout ( C2U( "CharEmphasis" ), C2U("CharEmphasis") )//the service style::CharacterProperties describes a property called 'CharEmphasize' wich is nowhere implemented -// ( C2U( "CharEscapement" ), C2U("CharEscapement") ) //#i98344# @future: add these to properties again, if the user interface offers the possibility to change them; then make sure that older wrong files are corrected on import -// ( C2U( "CharEscapementHeight" ), C2U("CharEscapementHeight") ) //#i98344# @future: add these to properties again, if the user interface offers the possibility to change them; then make sure that older wrong files are corrected on import -// ( C2U( "CharFlash" ), C2U("Flashing") ) ( C2U( "CharFontFamily" ), C2U("CharFontFamily") ) ( C2U( "CharFontFamilyAsian" ), C2U("CharFontFamilyAsian") ) @@ -211,13 +205,10 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProper ( C2U( "CharLocale" ), C2U("CharLocale") ) ( C2U( "CharLocaleAsian" ), C2U("CharLocaleAsian") ) ( C2U( "CharLocaleComplex" ), C2U("CharLocaleComplex") ) -// ( C2U( "CharNoHyphenation" ), C2U("InhibitHyphenation") ) ( C2U( "CharPosture" ), C2U("CharPosture") ) ( C2U( "CharPostureAsian" ), C2U("CharPostureAsian") ) ( C2U( "CharPostureComplex" ), C2U("CharPostureComplex") ) ( C2U( "CharRelief" ), C2U("CharRelief") ) -// ( C2U( "CharRotation" ), C2U("Rotation") ) --> additional feature ... -// ( C2U( "CharScaleWidth" ), C2U("CharScaleWidth") ) ( C2U( "CharShadowed" ), C2U("CharShadowed") ) ( C2U( "CharStrikeout" ), C2U("CharStrikeout") ) ( C2U( "CharUnderline" ), C2U("CharUnderline") ) @@ -230,10 +221,6 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProper ( C2U( "WritingMode" ), C2U("WritingMode") ) -// ( C2U( "RubyText" ), C2U("RubyText") ) -// ( C2U( "RubyAdjust" ), C2U("RubyAdjust") ) -// ( C2U( "RubyCharStyleName" ), C2U("RubyStyleName") ) -// ( C2U( "RubyIsAbove" ), C2U("RubyIsAbove") ) ( C2U( "ParaIsCharacterDistance" ), C2U("ParaIsCharacterDistance") ) ; return m_aShapePropertyMapForCharacterProperties; @@ -362,7 +349,6 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForFilledSeriesPro //line properties ( C2U( "LineColor" ), C2U("BorderColor") ) ( C2U( "LineDashName" ), C2U("BorderDashName") ) -// ( C2U( "LineJoint" ), C2U("LineJoint") ) ( C2U( "LineStyle" ), C2U("BorderStyle") ) ( C2U( "LineTransparence" ), C2U("BorderTransparency") ) ( C2U( "LineWidth" ), C2U("BorderWidth") ) @@ -435,7 +421,6 @@ void PropertyMapper::getTextLabelMultiPropertyLists( aValueMap.insert( tPropertyNameValueMap::value_type( C2U("LineStyle"), uno::makeAny(drawing::LineStyle_NONE) ) ); // drawing::LineStyle aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextHorizontalAdjust"), uno::makeAny(drawing::TextHorizontalAdjust_CENTER) ) ); // drawing::TextHorizontalAdjust - needs to be overwritten aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextVerticalAdjust"), uno::makeAny(drawing::TextVerticalAdjust_CENTER) ) ); //drawing::TextVerticalAdjust - needs to be overwritten - //aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextWritingMode"), uno::makeAny(eWritingMode) ) ); //text::WritingMode aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowHeight"), uno::makeAny(sal_True) ) ); // sal_Bool aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowWidth"), uno::makeAny(sal_True) ) ); // sal_Bool if( bName ) @@ -450,15 +435,6 @@ void PropertyMapper::getTextLabelMultiPropertyLists( aValueMap.insert( tPropertyNameValueMap::value_type( C2U("ParaIsHyphenation"), uno::makeAny(sal_True) ) ); } - /* - //@todo ?: add paragraph properties: - //(uno::makeAny(eParaAdjust)) //ParaAdjust - style::ParagraphAdjust - //(uno::makeAny( (sal_Bool)rAxisLabelProperties.bLineBreakAllowed )) //ParaIsHyphenation - sal_Bool - style::ParagraphAdjust eParaAdjust( style::ParagraphAdjust_LEFT ); - if( eHorizontalAdjust == drawing::TextHorizontalAdjust_RIGHT ) - eParaAdjust = style::ParagraphAdjust_RIGHT; - */ - PropertyMapper::getMultiPropertyListsFromValueMap( rPropNames, rPropValues, aValueMap ); } diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 184ac36f8252..12097d85710b 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -1609,7 +1609,7 @@ uno::Reference< drawing::XShapes > xTarget->add(xShape); - //it is necessary to set the transform matrix to initialize the scene properly (bug #106316#) + //it is necessary to set the transform matrix to initialize the scene properly //otherwise all objects which are placed into this Group will not be visible //the following should be unnecessary after a the bug is fixed { diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx index 16c52a18ae0d..eea8c813b360 100644 --- a/chart2/source/view/main/VDataSeries.cxx +++ b/chart2/source/view/main/VDataSeries.cxx @@ -606,7 +606,7 @@ sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Refe return nLabelPlacement; } - DBG_ERROR("no label placement supported"); + OSL_FAIL("no label placement supported"); } catch( uno::Exception& e ) { diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 7f46d16b6a76..ffe47937eb56 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -349,7 +349,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( } else if( aSymbol.Style == chart2::SymbolStyle_AUTO ) { - DBG_ERROR("the given parameter is not allowed to contain an automatic symbol style"); + OSL_FAIL("the given parameter is not allowed to contain an automatic symbol style"); } } } diff --git a/chart2/source/view/makefile.mk b/chart2/source/view/makefile.mk index aa3c149a768f..721ae1aac74f 100644 --- a/chart2/source/view/makefile.mk +++ b/chart2/source/view/makefile.mk @@ -95,9 +95,6 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def #Specifies the library name to parse for symbols. For Win32 only. DEFLIB1NAME= $(TARGET) -#A file of symbols to export. -#DEF1EXPORTFILE= $(PRJ)$/source$/inc$/exports.dxp - #--------definition file #name of the definition file: |