[Libreoffice-commits] .: 31 commits - chart2/source sc/inc sc/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Mar 23 09:24:33 PDT 2011
chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx | 67 +++
chart2/source/controller/main/ChartController_Position.cxx | 11
chart2/source/controller/main/ChartController_Window.cxx | 9
chart2/source/inc/CharacterProperties.hxx | 3
chart2/source/inc/ExponentialRegressionCurveCalculator.hxx | 7
chart2/source/model/main/Diagram.cxx | 1
chart2/source/tools/CharacterProperties.cxx | 25 +
chart2/source/tools/ExponentialRegressionCurveCalculator.cxx | 77 ++--
chart2/source/view/axes/ScaleAutomatism.cxx | 28 +
chart2/source/view/charttypes/VSeriesPlotter.cxx | 16
chart2/source/view/main/ChartView.cxx | 7
chart2/source/view/main/PropertyMapper.cxx | 3
chart2/source/view/main/VLegend.cxx | 4
sc/inc/chart2uno.hxx | 64 ---
sc/source/core/data/documen9.cxx | 4
sc/source/core/tool/autoform.cxx | 2
sc/source/core/tool/charthelper.cxx | 5
sc/source/filter/starcalc/scflt.cxx | 13
sc/source/ui/drawfunc/fusel.cxx | 1
sc/source/ui/unoobj/chart2uno.cxx | 188 ++--------
20 files changed, 274 insertions(+), 261 deletions(-)
New commits:
commit f6c64d91f3c62de4d653305a1f696e913970a1bf
Merge: e2dcaa3... 62efb7d...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Mar 23 17:13:24 2011 +0100
Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/calc
diff --cc sc/source/core/data/documen9.cxx
index 808022b,de0f1be..3d58b87
mode 100755,100644..100755
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
commit e2dcaa374ba0f0e9947ce9a3b90b8aaa7625d4da
Merge: 05ea11a... 2e1e466...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Mar 23 16:58:51 2011 +0100
Merge commit 'ooo/DEV300_m103'
Conflicts:
sc/source/filter/starcalc/scflt.cxx
sc/source/ui/unoobj/chart2uno.cxx
diff --cc chart2/source/controller/main/ChartController_Window.cxx
index bee0060,0a62cd4..3e6c889
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@@ -1658,7 -1686,16 +1658,16 @@@ bool ChartController::requestQuickHelp
if ( bSuccess )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
++ SolarMutexGuard aGuard;
+ if ( m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() )
+ {
+ this->EndTextEdit();
+ }
this->impl_selectObjectAndNotiy();
+ if ( m_pChartWindow )
+ {
+ m_pChartWindow->Invalidate();
+ }
return sal_True;
}
diff --cc chart2/source/model/main/Diagram.cxx
index f80b025,0e55924..7100538
mode 100755,100644..100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
diff --cc chart2/source/tools/CharacterProperties.cxx
index eba89b6,7b3243b..c42c136
mode 100755,100644..100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
diff --cc chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
index 55da03a,9642d1a..c645189
--- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
@@@ -151,16 -148,21 +149,21 @@@ OUString ExponentialRegressionCurveCalc
const uno::Reference< util::XNumberFormatter >& xNumFormatter,
::sal_Int32 nNumberFormatKey ) const
{
+ double fIntercept = exp(m_fLogIntercept);
+ double fSlope = exp(m_fLogSlope);
+ bool bHasSlope = !rtl::math::approxEqual( fSlope, 1.0 );
+ bool bHasIntercept = !rtl::math::approxEqual( fIntercept, 1.0 );
-
++
OUStringBuffer aBuf( C2U( "f(x) = " ));
- if( m_fIntercept == 0.0 ||
- m_fSlope == 0.0 )
- {
- aBuf.append( sal_Unicode( '0' ));
- }
- else if( rtl::math::approxEqual( m_fSlope, 1.0 ) )
+ if ( fIntercept == 0.0)
{
- aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fIntercept ));
+ // underflow, a true zero is impossible
+ aBuf.append( C2U( "exp( " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogIntercept) );
+ aBuf.append( (m_fLogSlope < 0.0) ? C2U( " - " ) : C2U( " + " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope)) );
+ aBuf.append( C2U( " x )" ));
}
else
{
diff --cc chart2/source/view/main/VLegend.cxx
index 028a643,0a3cfd4..1ad43df
mode 100644,100755..100755
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
diff --cc sc/source/core/data/documen9.cxx
index 86dadb0,b803281..808022b
mode 100644,100755..100755
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
diff --cc sc/source/core/tool/autoform.cxx
index ceffabc,ba02108..6831a6f
mode 100644,100755..100755
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
diff --cc sc/source/filter/starcalc/scflt.cxx
index 4f76ae8,735ca49..d1f18e2
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@@ -1634,7 -1693,8 +1643,7 @@@ void Sc10Import::LoadCol(SCCOL Col, SCT
{
/*double Value =*/ ScfTools::ReadLongDouble(rStream);
sal_uInt8 Len;
- sal_Char s[256];
+ sal_Char s[256+1];
- //rStream.Read(&Value, sizeof(Value));
rStream >> Len;
rStream.Read(&s[1], Len);
s[0] = '=';
diff --cc sc/source/ui/unoobj/chart2uno.cxx
index 969b9dc,2f4c193..32fc54a
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@@ -1051,10 -1050,11 +1050,11 @@@ void ScChart2DataProvider::Notify( SfxB
namespace
{
- ScChart2LabeledDataSequence* lcl_createScChart2DataSequenceFromTokens( auto_ptr< vector<ScTokenRef> > pValueTokens, auto_ptr< vector<ScTokenRef> > pLabelTokens,
- ScDocument* pDoc, const uno::Reference < chart2::data::XDataProvider >& xDP, bool bIncludeHiddenCells )
+ Reference< chart2::data::XLabeledDataSequence > lcl_createLabeledDataSequenceFromTokens(
- auto_ptr< vector< ScSharedTokenRef > > pValueTokens, auto_ptr< vector< ScSharedTokenRef > > pLabelTokens,
++ auto_ptr< vector< ScTokenRef > > pValueTokens, auto_ptr< vector< ScTokenRef > > pLabelTokens,
+ ScDocument* pDoc, const Reference< chart2::data::XDataProvider >& xDP, bool bIncludeHiddenCells )
{
- ScChart2LabeledDataSequence* pRet = 0;
+ Reference< chart2::data::XLabeledDataSequence > xResult;
bool bHasValues = pValueTokens.get() && !pValueTokens->empty();
bool bHasLabel = pLabelTokens.get() && !pLabelTokens->empty();
if( bHasValues || bHasLabel )
@@@ -1438,12 -1497,15 +1450,15 @@@ ScChart2DataProvider::createDataSource
else
pValueTokens.reset(pChartMap->getAllColHeaderRanges());
- auto_ptr< vector<ScSharedTokenRef> > pLabelTokens(NULL);
+ auto_ptr< vector<ScTokenRef> > pLabelTokens(NULL);
pLabelTokens.reset(pChartMap->getLeftUpperCornerRanges());
- ScChart2LabeledDataSequence* pCategories = lcl_createScChart2DataSequenceFromTokens( pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells );//ownership of pointers is transfered!
- if( pCategories )
- aSeqs.push_back(pCategories);
+ Reference< chart2::data::XLabeledDataSequence > xCategories = lcl_createLabeledDataSequenceFromTokens(
+ pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
+ if ( xCategories.is() )
+ {
+ aSeqs.push_back( xCategories );
+ }
}
// Fill Serieses (values and label)
commit 2e1e4666b895718793821417d54e903611e5fb56
Merge: 195be5f... 68d5735...
Author: obo <obo at openoffice.org>
Date: Wed Mar 16 09:56:18 2011 +0100
CWS-TOOLING: integrate CWS chart55
commit 195be5f6983a898b4cb2488caf4574aa428c4906
Merge: c2a9ef1... 8883d09...
Author: obo <obo at openoffice.org>
Date: Wed Mar 16 09:28:51 2011 +0100
CWS-TOOLING: integrate CWS chart51
diff --cc chart2/source/model/main/Diagram.cxx
index f4946cb,0e55924..0e55924
mode 100755,100755..100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
diff --cc chart2/source/tools/CharacterProperties.cxx
index 6895b9a,7b3243b..7b3243b
mode 100755,100755..100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
commit c2a9ef1c1ad34e14bc3ed60864276f82aa0956ab
Merge: 3b87181... f486676...
Author: obo <obo at openoffice.org>
Date: Wed Mar 16 09:10:50 2011 +0100
CWS-TOOLING: integrate CWS obo55
commit 3b8718198bc75a7c0db5998cfc70047b4c340d7d
Merge: 2851cc7... ecee0eb...
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Mon Mar 7 16:51:11 2011 +0100
CWS-TOOLING: integrate CWS os150
commit 68d57351e34095c8c76bd3335e7143879b4b313e
Author: Ingrid Halama <iha at openoffice.org>
Date: Fri Mar 4 20:28:00 2011 +0100
chart55: #i117183# bad autoscaling for date axis
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index 9db33ce..c009cfb 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -109,7 +109,7 @@ ScaleAutomatism::ScaleAutomatism( const ScaleData& rSourceScale, const Date& rNu
: m_aSourceScale( rSourceScale )
, m_fValueMinimum( 0.0 )
, m_fValueMaximum( 0.0 )
- , m_nMaximumAutoMainIncrementCount( lcl_getMaximumAutoIncrementCount( m_aSourceScale.AxisType ) )
+ , m_nMaximumAutoMainIncrementCount( lcl_getMaximumAutoIncrementCount( rSourceScale.AxisType ) )
, m_bExpandBorderToIncrementRhythm( false )
, m_bExpandIfValuesCloseToBorder( false )
, m_bExpandWideValuesToZero( false )
commit acd06c48a0f3570a709d339656fd6d6fd632ce50
Author: Ingrid Halama <iha at openoffice.org>
Date: Fri Mar 4 20:16:58 2011 +0100
chart55: #i117185# correct object size
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 03783ad..b2b13af 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star::chart2;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, Rectangle& rPosAndSize, const awt::Size aOriginalSize )
+void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectangle& rPosAndSize, const awt::Size aOriginalSize )
{
long nPosX(0);
long nPosY(0);
@@ -121,7 +121,7 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, Rectangle& r
break;
}
- rPosAndSize = Rectangle(Point(nPosX,nPosY),Size(nSizX,nSizY));
+ rPosAndSize = awt::Rectangle(nPosX,nPosY,nSizX,nSizY);
}
void SAL_CALL ChartController::executeDispatch_PositionAndSize()
@@ -166,19 +166,18 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize()
const SfxItemSet* pOutItemSet = pDlg->GetOutputItemSet();
if(pOutItemSet)
{
- Rectangle aObjectRect;
+ awt::Rectangle aObjectRect;
aItemSet.Put(*pOutItemSet);//overwrite old values with new values (-> all items are set)
lcl_getPositionAndSizeFromItemSet( aItemSet, aObjectRect, aSelectedSize );
awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) );
- Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
+ awt::Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
bool bChanged = false;
if ( eObjectType == OBJECTTYPE_LEGEND )
bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( getModel(), false , true );
bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID(), getModel()
- , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight())
- , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) );
+ , aObjectRect, aPageRect );
if( bMoved || bChanged )
aUndoGuard.commit();
}
commit fca84d1610316fd21160b36d1ba597f7dd068d8a
Author: Ingrid Halama <iha at openoffice.org>
Date: Fri Mar 4 11:59:28 2011 +0100
chart55: #i117207# wrong layout with empty titles
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 79d489e..cd7b1fa 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2198,12 +2198,9 @@ std::auto_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
}
uno::Reference< XTitle > xTitle( TitleHelper::getTitle( eType, xChartModel ) );
- if(xTitle.is())
+ rtl::OUString aCompleteString( TitleHelper::getCompleteString( xTitle ) );
+ if( aCompleteString.getLength() != 0 )
{
- rtl::OUString aCompleteString( TitleHelper::getCompleteString( xTitle ) );
- if ( aCompleteString.getLength() == 0 )
- return apVTitle;//don't create empty titles as the resulting diagram position is wrong then
-
//create title
apVTitle = std::auto_ptr<VTitle>(new VTitle(xTitle));
rtl::OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, xChartModel ) );
commit 203e961dd4d845b5a0009b2c541dd1caf92a057b
Author: Ingrid Halama <iha at openoffice.org>
Date: Thu Mar 3 12:06:51 2011 +0100
chart55: #117185# legend entries get lost after moving the legend
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
old mode 100644
new mode 100755
index 65011e6..0a3cfd4
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -918,8 +918,8 @@ void VLegend::createShapes(
RelativeSize aRelativeSize;
if ((xLegendProp->getPropertyValue( C2U( "RelativeSize" )) >>= aRelativeSize))
{
- aLegendSize.Width = aRelativeSize.Primary * rPageSize.Width;
- aLegendSize.Height = aRelativeSize.Secondary * rPageSize.Height;
+ aLegendSize.Width = ::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width );
+ aLegendSize.Height = ::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height );
}
else
eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH;
commit 516890c9ae37e28cf4b6df41a9c95c6c252a245b
Author: iha <iha at openoffice.org>
Date: Thu Mar 3 11:37:57 2011 +0100
chart55: #117183# bad autoscaling for date axis
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index d4fa3c1..9db33ce 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -49,9 +49,16 @@ using ::com::sun::star::chart::TimeUnit::MONTH;
using ::com::sun::star::chart::TimeUnit::YEAR;
const sal_Int32 MAXIMUM_MANUAL_INCREMENT_COUNT = 500;
-const sal_Int32 MAXIMUM_AUTO_INCREMENT_COUNT = 10;
const sal_Int32 MAXIMUM_SUB_INCREMENT_COUNT = 100;
+sal_Int32 lcl_getMaximumAutoIncrementCount( sal_Int32 nAxisType )
+{
+ sal_Int32 nMaximumAutoIncrementCount = 10;
+ if( nAxisType==AxisType::DATE )
+ nMaximumAutoIncrementCount = MAXIMUM_MANUAL_INCREMENT_COUNT;
+ return nMaximumAutoIncrementCount;
+}
+
namespace
{
@@ -102,7 +109,7 @@ ScaleAutomatism::ScaleAutomatism( const ScaleData& rSourceScale, const Date& rNu
: m_aSourceScale( rSourceScale )
, m_fValueMinimum( 0.0 )
, m_fValueMaximum( 0.0 )
- , m_nMaximumAutoMainIncrementCount( MAXIMUM_AUTO_INCREMENT_COUNT )
+ , m_nMaximumAutoMainIncrementCount( lcl_getMaximumAutoIncrementCount( m_aSourceScale.AxisType ) )
, m_bExpandBorderToIncrementRhythm( false )
, m_bExpandIfValuesCloseToBorder( false )
, m_bExpandWideValuesToZero( false )
@@ -149,8 +156,8 @@ void ScaleAutomatism::setMaximumAutoMainIncrementCount( sal_Int32 nMaximumAutoMa
{
if( nMaximumAutoMainIncrementCount < 2 )
m_nMaximumAutoMainIncrementCount = 2; //#i82006
- else if( nMaximumAutoMainIncrementCount > MAXIMUM_AUTO_INCREMENT_COUNT )
- m_nMaximumAutoMainIncrementCount = MAXIMUM_AUTO_INCREMENT_COUNT;
+ else if( nMaximumAutoMainIncrementCount > lcl_getMaximumAutoIncrementCount( m_aSourceScale.AxisType ) )
+ m_nMaximumAutoMainIncrementCount = lcl_getMaximumAutoIncrementCount( m_aSourceScale.AxisType );
else
m_nMaximumAutoMainIncrementCount = nMaximumAutoMainIncrementCount;
}
@@ -692,6 +699,19 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis(
nNumer = static_cast<sal_Int32>( rtl::math::approxCeil( nIntervalDays/nDaysPerInterval ) );
if(nNumer<=0)
nNumer=1;
+ if( rExplicitIncrement.MajorTimeInterval.TimeUnit == DAY )
+ {
+ if( nNumer>2 && nNumer<7 )
+ nNumer=7;
+ else if( nNumer>7 )
+ {
+ rExplicitIncrement.MajorTimeInterval.TimeUnit = MONTH;
+ nDaysPerInterval = 31.0;
+ nNumer = static_cast<sal_Int32>( rtl::math::approxCeil( nIntervalDays/nDaysPerInterval ) );
+ if(nNumer<=0)
+ nNumer=1;
+ }
+ }
rExplicitIncrement.MajorTimeInterval.Number = nNumer;
nMainIncrementCount = nDayCount/(nNumer*nDaysPerInterval);
}
commit ae94862cfcb00ad0dd0afb6b12d6e4b459ca6f12
Author: iha <iha at openoffice.org>
Date: Wed Mar 2 22:04:54 2011 +0100
chart55: #i112752# warning error
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 3105eeb..2f4c193 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1079,7 +1079,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_createLabeledDataSequenceFro
xResult->setLabel( xLabelSeq );
}
}
- catch( uno::Exception& ex )
+ catch( const uno::Exception& )
{
}
}
commit 84e84966d6d448a6909194d04faa4947f8df0748
Author: Thomas Benisch [tbe] <thomas.benisch at oracle.com>
Date: Wed Mar 2 10:55:17 2011 +0100
chart55: #i112752# missing data change updates from calc to chart
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index fe4e634..4dfa7e6 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -241,70 +241,6 @@ private:
};
-// LabeledDataSequence =======================================================
-
-class ScChart2LabeledDataSequence : public
- ::cppu::WeakImplHelper4<
- ::com::sun::star::chart2::data::XLabeledDataSequence,
- ::com::sun::star::util::XCloneable,
- ::com::sun::star::util::XModifyBroadcaster,
- ::com::sun::star::lang::XServiceInfo >,
- SfxListener
-{
-public:
-
- explicit ScChart2LabeledDataSequence( ScDocument* pDoc );
- virtual ~ScChart2LabeledDataSequence();
-
- // SfxListener -----------------------------------------------------------
-
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
-
- // XLabeledDataSequence --------------------------------------------------
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues()
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setValues(
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel()
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setLabel(
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XCloneable ------------------------------------------------------------
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
- throw (::com::sun::star::uno::RuntimeException);
-
- // XModifyBroadcaster ----------------------------------------------------
-
- virtual void SAL_CALL addModifyListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeModifyListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo ----------------------------------------------------------
-
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw(
- ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString&
- rServiceName) throw( ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
- getSupportedServiceNames() throw(
- ::com::sun::star::uno::RuntimeException);
-
-private:
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSequence > m_aData;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSequence > m_aLabel;
- ScDocument* m_pDocument;
-};
-
// DataSequence ==============================================================
class ScChart2DataSequence : public
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index a61f32b..3105eeb 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/text/XText.hpp>
#include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
#include <vector>
#include <list>
@@ -62,8 +63,6 @@ SC_SIMPLE_SERVICE_INFO( ScChart2DataProvider, "ScChart2DataProvider",
"com.sun.star.chart2.data.DataProvider")
SC_SIMPLE_SERVICE_INFO( ScChart2DataSource, "ScChart2DataSource",
"com.sun.star.chart2.data.DataSource")
-SC_SIMPLE_SERVICE_INFO( ScChart2LabeledDataSequence, "ScChart2LabeledDataSequence",
- "com.sun.star.chart2.data.LabeledDataSequence")
SC_SIMPLE_SERVICE_INFO( ScChart2DataSequence, "ScChart2DataSequence",
"com.sun.star.chart2.data.DataSequence")
#if USE_CHART2_EMPTYDATASEQUENCE
@@ -1051,27 +1050,40 @@ void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
namespace
{
-ScChart2LabeledDataSequence* lcl_createScChart2DataSequenceFromTokens( auto_ptr< vector<ScSharedTokenRef> > pValueTokens, auto_ptr< vector<ScSharedTokenRef> > pLabelTokens,
- ScDocument* pDoc, const uno::Reference < chart2::data::XDataProvider >& xDP, bool bIncludeHiddenCells )
+Reference< chart2::data::XLabeledDataSequence > lcl_createLabeledDataSequenceFromTokens(
+ auto_ptr< vector< ScSharedTokenRef > > pValueTokens, auto_ptr< vector< ScSharedTokenRef > > pLabelTokens,
+ ScDocument* pDoc, const Reference< chart2::data::XDataProvider >& xDP, bool bIncludeHiddenCells )
{
- ScChart2LabeledDataSequence* pRet = 0;
+ Reference< chart2::data::XLabeledDataSequence > xResult;
bool bHasValues = pValueTokens.get() && !pValueTokens->empty();
bool bHasLabel = pLabelTokens.get() && !pLabelTokens->empty();
if( bHasValues || bHasLabel )
{
- pRet = new ScChart2LabeledDataSequence(pDoc);
- if(bHasValues)
+ try
{
- uno::Reference < chart2::data::XDataSequence > xSeq(new ScChart2DataSequence(pDoc, xDP, pValueTokens.release(), bIncludeHiddenCells));
- pRet->setValues(xSeq);
+ Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ if ( xContext.is() )
+ {
+ xResult.set( xContext->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString::createFromAscii( "com.sun.star.chart2.data.LabeledDataSequence" ),
+ xContext ), uno::UNO_QUERY_THROW );
+ }
+ if ( bHasValues )
+ {
+ Reference< chart2::data::XDataSequence > xSeq( new ScChart2DataSequence( pDoc, xDP, pValueTokens.release(), bIncludeHiddenCells ) );
+ xResult->setValues( xSeq );
+ }
+ if ( bHasLabel )
+ {
+ Reference< chart2::data::XDataSequence > xLabelSeq( new ScChart2DataSequence( pDoc, xDP, pLabelTokens.release(), bIncludeHiddenCells ) );
+ xResult->setLabel( xLabelSeq );
+ }
}
- if(bHasLabel)
+ catch( uno::Exception& ex )
{
- uno::Reference < chart2::data::XDataSequence > xLabelSeq(new ScChart2DataSequence(pDoc, xDP, pLabelTokens.release(), bIncludeHiddenCells));
- pRet->setLabel(xLabelSeq);
}
}
- return pRet;
+ return xResult;
}
//----------------------------------------------------
@@ -1474,7 +1486,7 @@ ScChart2DataProvider::createDataSource(
return xResult;
ScChart2DataSource* pDS = NULL;
- std::list < ScChart2LabeledDataSequence* > aSeqs;
+ ::std::list< Reference< chart2::data::XLabeledDataSequence > > aSeqs;
// Fill Categories
if( bCategories )
@@ -1488,9 +1500,12 @@ ScChart2DataProvider::createDataSource(
auto_ptr< vector<ScSharedTokenRef> > pLabelTokens(NULL);
pLabelTokens.reset(pChartMap->getLeftUpperCornerRanges());
- ScChart2LabeledDataSequence* pCategories = lcl_createScChart2DataSequenceFromTokens( pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells );//ownership of pointers is transfered!
- if( pCategories )
- aSeqs.push_back(pCategories);
+ Reference< chart2::data::XLabeledDataSequence > xCategories = lcl_createLabeledDataSequenceFromTokens(
+ pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
+ if ( xCategories.is() )
+ {
+ aSeqs.push_back( xCategories );
+ }
}
// Fill Serieses (values and label)
@@ -1509,42 +1524,47 @@ ScChart2DataProvider::createDataSource(
pValueTokens.reset(pChartMap->getDataRowRanges(static_cast<SCROW>(i)));
pLabelTokens.reset(pChartMap->getRowHeaderRanges(static_cast<SCROW>(i)));
}
- ScChart2LabeledDataSequence* pChartSeries = lcl_createScChart2DataSequenceFromTokens( pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
- if( pChartSeries )
- aSeqs.push_back(pChartSeries);
+ Reference< chart2::data::XLabeledDataSequence > xChartSeries = lcl_createLabeledDataSequenceFromTokens(
+ pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
+ if ( xChartSeries.is() )
+ {
+ aSeqs.push_back( xChartSeries );
+ }
}
pDS = new ScChart2DataSource(m_pDocument);
- std::list < ScChart2LabeledDataSequence* >::iterator aItr(aSeqs.begin());
- std::list < ScChart2LabeledDataSequence* >::iterator aEndItr(aSeqs.end());
+ ::std::list< Reference< chart2::data::XLabeledDataSequence > >::iterator aItr( aSeqs.begin() );
+ ::std::list< Reference< chart2::data::XLabeledDataSequence > >::iterator aEndItr( aSeqs.end() );
//reorder labeled sequences according to aSequenceMapping
- std::vector< ScChart2LabeledDataSequence* > aSeqVector;
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aSeqVector;
while(aItr != aEndItr)
{
aSeqVector.push_back(*aItr);
++aItr;
}
- std::map< sal_Int32, ScChart2LabeledDataSequence* > aSequenceMap;
+ ::std::map< sal_Int32, Reference< chart2::data::XLabeledDataSequence > > aSequenceMap;
for( sal_Int32 nNewIndex = 0; nNewIndex < aSequenceMapping.getLength(); nNewIndex++ )
{
// note: assuming that the values in the sequence mapping are always non-negative
- std::vector< ScChart2LabeledDataSequence* >::size_type nOldIndex( static_cast< sal_uInt32 >( aSequenceMapping[nNewIndex] ));
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::size_type nOldIndex( static_cast< sal_uInt32 >( aSequenceMapping[nNewIndex] ) );
if( nOldIndex < aSeqVector.size() )
{
pDS->AddLabeledSequence( aSeqVector[nOldIndex] );
aSeqVector[nOldIndex] = 0;
}
-
}
- std::vector< ScChart2LabeledDataSequence* >::iterator aVectorItr(aSeqVector.begin());
- std::vector< ScChart2LabeledDataSequence* >::iterator aVectorEndItr(aSeqVector.end());
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::iterator aVectorItr( aSeqVector.begin() );
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::iterator aVectorEndItr( aSeqVector.end() );
while(aVectorItr != aVectorEndItr)
{
- if(*aVectorItr)
- pDS->AddLabeledSequence(*aVectorItr);
+ Reference< chart2::data::XLabeledDataSequence > xSeq( *aVectorItr );
+ if ( xSeq.is() )
+ {
+ pDS->AddLabeledSequence( xSeq );
+ }
++aVectorItr;
}
@@ -2321,114 +2341,6 @@ void ScChart2DataSource::AddLabeledSequence(const uno::Reference < chart2::data:
m_aLabeledSequences.push_back(xNew);
}
-// LabeledDataSequence =======================================================
-
-ScChart2LabeledDataSequence::ScChart2LabeledDataSequence(
- ScDocument* pDoc ) :
- m_pDocument( pDoc )
-{
- if ( m_pDocument )
- m_pDocument->AddUnoObject( *this);
-}
-
-ScChart2LabeledDataSequence::~ScChart2LabeledDataSequence()
-{
- if ( m_pDocument )
- m_pDocument->RemoveUnoObject( *this);
-}
-
-// SfxListener -----------------------------------------------------------
-
-void ScChart2LabeledDataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
-{
- if ( rHint.ISA( SfxSimpleHint ) &&
- ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING )
- {
- ScUnoGuard aGuard;
- m_pDocument = NULL;
- }
-}
-
-// XLabeledDataSequence --------------------------------------------------
-
-uno::Reference< chart2::data::XDataSequence > SAL_CALL ScChart2LabeledDataSequence::getValues()
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- return m_aData;
-}
-
-void SAL_CALL ScChart2LabeledDataSequence::setValues(
- const uno::Reference< chart2::data::XDataSequence >& xSequence )
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- m_aData = xSequence;
-}
-
-uno::Reference< chart2::data::XDataSequence > SAL_CALL ScChart2LabeledDataSequence::getLabel()
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- return m_aLabel;
-}
-
-void SAL_CALL ScChart2LabeledDataSequence::setLabel(
- const uno::Reference< chart2::data::XDataSequence >& xSequence )
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- m_aLabel = xSequence;
-}
-
-// XCloneable ================================================================
-
-uno::Reference< util::XCloneable > SAL_CALL ScChart2LabeledDataSequence::createClone()
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- uno::Reference< util::XCloneable > xToClone(m_aData, uno::UNO_QUERY);
- if (xToClone.is())
- {
- ScChart2LabeledDataSequence* pRet = new ScChart2LabeledDataSequence(m_pDocument);
- uno::Reference< chart2::data::XDataSequence > xSequence(xToClone->createClone(), uno::UNO_QUERY);
- pRet->setValues(xSequence);
- xToClone.set(m_aLabel, uno::UNO_QUERY);
- if(xToClone.is())
- {
- xSequence.set(xToClone->createClone(), uno::UNO_QUERY);
- pRet->setLabel(xSequence);
- }
- return pRet;
- }
- return NULL;
-}
-
-// XModifyBroadcaster ========================================================
-
-void SAL_CALL ScChart2LabeledDataSequence::addModifyListener( const uno::Reference< util::XModifyListener >& aListener )
- throw (uno::RuntimeException)
-{
- // quick'n dirty: just add the listener to each DataSequence
-
- uno::Reference<util::XModifyBroadcaster> xDataBroadcaster( m_aData, uno::UNO_QUERY );
- if ( xDataBroadcaster.is() )
- xDataBroadcaster->addModifyListener( aListener );
- uno::Reference<util::XModifyBroadcaster> xLabelBroadcaster( m_aLabel, uno::UNO_QUERY );
- if ( xLabelBroadcaster.is() )
- xLabelBroadcaster->addModifyListener( aListener );
-}
-
-void SAL_CALL ScChart2LabeledDataSequence::removeModifyListener( const uno::Reference< util::XModifyListener >& aListener )
- throw (uno::RuntimeException)
-{
- uno::Reference<util::XModifyBroadcaster> xDataBroadcaster( m_aData, uno::UNO_QUERY );
- if ( xDataBroadcaster.is() )
- xDataBroadcaster->removeModifyListener( aListener );
- uno::Reference<util::XModifyBroadcaster> xLabelBroadcaster( m_aLabel, uno::UNO_QUERY );
- if ( xLabelBroadcaster.is() )
- xLabelBroadcaster->removeModifyListener( aListener );
-}
// DataSequence ==============================================================
commit 8883d0964145fd337250ff187c84559257abad59
Author: Thomas Benisch [tbe] <thomas.benisch at oracle.com>
Date: Fri Feb 25 11:01:18 2011 +0100
chart51: #i116037# backout
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 90b0b5c..d9c57e8 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -415,9 +415,9 @@ void ScDrawView::MarkListHasChanged()
if ( pClient && pClient->IsObjectInPlaceActive() && !bUnoRefDialog )
{
// #41730# beim ViewShell::Activate aus dem Reset2Open nicht die Handles anzeigen
- //HMHbDisableHdl = TRUE;
+ //HMHbDisableHdl = sal_True;
pClient->DeactivateObject();
- //HMHbDisableHdl = FALSE;
+ //HMHbDisableHdl = sal_False;
// Image-Ole wieder durch Grafik ersetzen passiert jetzt in ScClient::UIActivate
}
commit b649f20b197402784db045369409de4e90930577
Merge: 8b575d5... 2851cc7...
Author: Ingrid Halama [iha] <Ingrid.Halama at oracle.com>
Date: Thu Feb 24 17:39:29 2011 +0100
chart51: merge with DEV300_m101
diff --cc chart2/source/view/charttypes/VSeriesPlotter.cxx
index 2b0a2c0,12442b3..fe051a4
mode 100644,100755..100755
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
commit 8b575d53ff5e37ec4767baa8dea3d3a792b6ed1b
Merge: f1a7128... 235e74d...
Author: Thomas Benisch [tbe] <thomas.benisch at oracle.com>
Date: Thu Feb 24 16:47:38 2011 +0100
chart51: #i116037# backout
diff --cc sc/source/ui/app/scdll.cxx
index 035f494,fc1ffce..d87bad6
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@@ -287,42 -287,43 +287,43 @@@ void ScDLL::Init(
// Child-Windows
- ScInputWindowWrapper ::RegisterChildWindow( sal_True, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK|SFX_CHILDWIN_NEVERHIDEACTIVEOLE );
+ // Hack: Eingabezeile mit 42 registrieren, damit sie im PlugIn immer sichtbar ist
+ ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
ScNavigatorDialogWrapper ::RegisterChildWindowContext(
sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
- ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScOptSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScNameDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScPivotLayoutWrapper ::RegisterChildWindow(FALSE, pMod);
- ScTabOpDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScSpecialFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScDbNameDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScConsolidateDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScPrintAreasDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScCondFormatDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScColRowNameRangesDlgWrapper::RegisterChildWindow(FALSE, pMod);
- ScFormulaDlgWrapper ::RegisterChildWindow(FALSE, pMod);
+ ScSolverDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScOptSolverDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScNameDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScPivotLayoutWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScTabOpDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScFilterDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScSpecialFilterDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScDbNameDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScConsolidateDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScPrintAreasDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScCondFormatDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScColRowNameRangesDlgWrapper::RegisterChildWindow(sal_False, pMod);
+ ScFormulaDlgWrapper ::RegisterChildWindow(sal_False, pMod);
// First docking Window for Calc
- ScFunctionChildWindow ::RegisterChildWindow(FALSE, pMod);
+ ScFunctionChildWindow ::RegisterChildWindow(sal_False, pMod);
// Redlining- Window
- ScAcceptChgDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScSimpleRefDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
- ScHighlightChgDlgWrapper ::RegisterChildWindow(FALSE, pMod);
-
- SvxSearchDialogWrapper ::RegisterChildWindow(FALSE, pMod);
- SvxHlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- SvxFontWorkChildWindow ::RegisterChildWindow(FALSE, pMod);
- SvxHyperlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_FORCEDOCK);
- SvxIMapDlgChildWindow ::RegisterChildWindow(FALSE, pMod);
- GalleryChildWindow ::RegisterChildWindow(FALSE, pMod);
- ScSpellDialogChildWindow ::RegisterChildWindow(FALSE, pMod);
- ::avmedia::MediaPlayer ::RegisterChildWindow(FALSE, pMod);
+ ScAcceptChgDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScSimpleRefDlgWrapper ::RegisterChildWindow(sal_False, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
+ ScHighlightChgDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+
+ SvxSearchDialogWrapper ::RegisterChildWindow(sal_False, pMod);
+ SvxHlinkDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ SvxFontWorkChildWindow ::RegisterChildWindow(sal_False, pMod);
+ SvxHyperlinkDlgWrapper ::RegisterChildWindow(sal_False, pMod, SFX_CHILDWIN_FORCEDOCK);
+ SvxIMapDlgChildWindow ::RegisterChildWindow(sal_False, pMod);
+ GalleryChildWindow ::RegisterChildWindow(sal_False, pMod);
+ ScSpellDialogChildWindow ::RegisterChildWindow(sal_False, pMod);
+ ::avmedia::MediaPlayer ::RegisterChildWindow(sal_False, pMod);
//<!--Added by PengYunQuan for Validity Cell Range Picker
- ScValidityRefChildWin::RegisterChildWindow(FALSE, pMod);
+ ScValidityRefChildWin::RegisterChildWindow(sal_False, pMod);
//-->Added by PengYunQuan for Validity Cell Range Picker
// Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init
diff --cc sc/source/ui/drawfunc/fusel.cxx
index 19631c3,2c284d3..10cb120
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@@ -503,13 -468,12 +503,12 @@@ sal_Bool __EXPORT FuSelection::MouseBut
{
ScModule* pScMod = SC_MOD();
bool bUnoRefDialog = pScMod->IsRefDialogOpen() && pScMod->GetCurRefDlgId() == WID_SIMPLE_REF;
- if ( pClient->IsObjectInPlaceActive() && !bUnoRefDialog )
- {
- pClient->DeactivateObj();
- }
+
+ if ( pIPClient->IsObjectInPlaceActive() && !bUnoRefDialog )
+ pIPClient->DeactivateObject();
}
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks == 2 && rMEvt.IsLeft() )
{
if ( pView->AreObjectsMarked() )
diff --cc sc/source/ui/view/tabvwshb.cxx
index 6e820f4,cd61a6c..e716441
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@@ -179,15 -176,9 +178,9 @@@ sal_Bool ScTabViewShell::ActivateObject
((ScClient*)pClient)->SetGrafEdit( NULL );
nErr = pClient->DoVerb( nVerb );
- bErrorShown = TRUE;
+ bErrorShown = sal_True;
// SfxViewShell::DoVerb zeigt seine Fehlermeldungen selber an
- ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl( this );
- if ( pInputHdl )
- {
- pInputHdl->NotifyChange( NULL );
- }
-
// attach listener to selection changes in chart that affect cell
// ranges, so those can be highlighted
// note: do that after DoVerb, so that the chart controller exists
commit 235e74dfe36390dacc18ed7022aac39fbaa0a759
Author: Thomas Benisch [tbe] <thomas.benisch at oracle.com>
Date: Thu Feb 24 16:29:02 2011 +0100
chart51: #i116037# backout
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 258952f..8a55721 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -254,13 +254,3 @@ void __EXPORT ScClient::MakeVisible()
}
}
-void ScClient::DeactivateObj()
-{
- DeactivateObject();
-
- ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell* >( GetViewShell() );
- if ( pViewSh )
- {
- pViewSh->UpdateInputHandler();
- }
-}
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 1f9ae86..fc1ffce 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -287,7 +287,8 @@ void ScDLL::Init()
// Child-Windows
- ScInputWindowWrapper ::RegisterChildWindow( TRUE, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK|SFX_CHILDWIN_NEVERHIDEACTIVEOLE );
+ // Hack: Eingabezeile mit 42 registrieren, damit sie im PlugIn immer sichtbar ist
+ ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
ScNavigatorDialogWrapper ::RegisterChildWindowContext(
sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index dad9313..2c284d3 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -56,7 +56,6 @@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "scmod.hxx"
-#include "client.hxx"
// -----------------------------------------------------------------------
@@ -463,16 +462,15 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
/**************************************************************************
* Ggf. OLE-Objekt beruecksichtigen
**************************************************************************/
+ SfxInPlaceClient* pIPClient = pViewShell->GetIPClient();
- ScClient* pClient = static_cast< ScClient* >( pViewShell->GetIPClient() );
- if ( pClient )
+ if (pIPClient)
{
ScModule* pScMod = SC_MOD();
bool bUnoRefDialog = pScMod->IsRefDialogOpen() && pScMod->GetCurRefDlgId() == WID_SIMPLE_REF;
- if ( pClient->IsObjectInPlaceActive() && !bUnoRefDialog )
- {
- pClient->DeactivateObj();
- }
+
+ if ( pIPClient->IsObjectInPlaceActive() && !bUnoRefDialog )
+ pIPClient->DeactivateObject();
}
USHORT nClicks = rMEvt.GetClicks();
diff --git a/sc/source/ui/inc/client.hxx b/sc/source/ui/inc/client.hxx
index 285c05e..012ce4d 100644
--- a/sc/source/ui/inc/client.hxx
+++ b/sc/source/ui/inc/client.hxx
@@ -56,7 +56,6 @@ public:
SdrGrafObj* GetGrafEdit() const { return pGrafEdit; }
void SetGrafEdit(SdrGrafObj* pNew) { pGrafEdit = pNew; }
SdrOle2Obj* GetDrawObj();
- void DeactivateObj();
};
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index dd999f3..2564360 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -416,7 +416,7 @@ void ScDrawView::MarkListHasChanged()
{
// #41730# beim ViewShell::Activate aus dem Reset2Open nicht die Handles anzeigen
//HMHbDisableHdl = TRUE;
- pClient->DeactivateObj();
+ pClient->DeactivateObject();
//HMHbDisableHdl = FALSE;
// Image-Ole wieder durch Grafik ersetzen passiert jetzt in ScClient::UIActivate
}
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index ef6c62f..cd61a6c 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -76,7 +76,6 @@
#include "chartarr.hxx"
#include "drawview.hxx"
#include "ChartRangeSelectionListener.hxx"
-#include "inputhdl.hxx"
using namespace com::sun::star;
@@ -180,12 +179,6 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
bErrorShown = TRUE;
// SfxViewShell::DoVerb zeigt seine Fehlermeldungen selber an
- ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl( this );
- if ( pInputHdl )
- {
- pInputHdl->NotifyChange( NULL );
- }
-
// attach listener to selection changes in chart that affect cell
// ranges, so those can be highlighted
// note: do that after DoVerb, so that the chart controller exists
@@ -270,7 +263,7 @@ void ScTabViewShell::DeactivateOle()
ScClient* pClient = (ScClient*) GetIPClient();
if ( pClient && pClient->IsObjectInPlaceActive() && !bUnoRefDialog )
- pClient->DeactivateObj();
+ pClient->DeactivateObject();
}
void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
commit ecee0eb4d573ea55afd91e60513e06fabd48293d
Merge: fc5e58b... 2851cc7...
Author: os <os at openoffice.org>
Date: Thu Feb 24 11:56:18 2011 +0100
os150: m101 merged
commit f1a712850474ee725b4e45850b3d3db09e9da5d3
Author: Ingrid Halama [iha] <Ingrid.Halama at oracle.com>
Date: Wed Feb 23 11:51:24 2011 +0100
chart51: #i112773# ensure correct position for equation
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 93d4634..2b0a2c0 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1151,9 +1151,19 @@ void VSeriesPlotter::createRegressionCurveEquationShapes(
if( xTextShape.is())
{
ShapeFactory::setShapeName( xTextShape, rEquationCID );
- xTextShape->setPosition(
- RelativePositionHelper::getUpperLeftCornerOfAnchoredObject(
- aScreenPosition2D, xTextShape->getSize(), aRelativePosition.Anchor ));
+ awt::Size aSize( xTextShape->getSize() );
+ awt::Point aPos( RelativePositionHelper::getUpperLeftCornerOfAnchoredObject(
+ aScreenPosition2D, aSize, aRelativePosition.Anchor ) );
+ //ensure that the equation is fully placed within the page (if possible)
+ if( (aPos.X + aSize.Width) > m_aPageReferenceSize.Width )
+ aPos.X = m_aPageReferenceSize.Width - aSize.Width;
+ if( aPos.X < 0 )
+ aPos.X = 0;
+ if( (aPos.Y + aSize.Height) > m_aPageReferenceSize.Height )
+ aPos.Y = m_aPageReferenceSize.Height - aSize.Height;
+ if( aPos.Y < 0 )
+ aPos.Y = 0;
+ xTextShape->setPosition(aPos);
}
}
}
commit fc5e58b7aaeadc3fc746094dc4b1a44522aa122f
Author: os <os at openoffice.org>
Date: Fri Feb 18 10:06:26 2011 +0100
os150: SvxFontItem member access changed to Set<member>-methods
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
old mode 100644
new mode 100755
index f164fe2..b803281
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -704,7 +704,7 @@ void ScDocument::UpdateFontCharSet()
pItem = (SvxFontItem*)pPool->GetItem2(ATTR_FONT, i);
if ( pItem && ( pItem->GetCharSet() == eSrcSet ||
( bUpdateOld && pItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
- pItem->GetCharSet() = eSysSet;
+ pItem->SetCharSet(eSysSet);
}
if ( pDrawLayer )
@@ -716,7 +716,7 @@ void ScDocument::UpdateFontCharSet()
pItem = (SvxFontItem*)rDrawPool.GetItem2(EE_CHAR_FONTINFO, i);
if ( pItem && ( pItem->GetCharSet() == eSrcSet ||
( bUpdateOld && pItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
- pItem->GetCharSet() = eSysSet;
+ pItem->SetCharSet( eSysSet );
}
}
}
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
old mode 100644
new mode 100755
index e56e7bc..ba02108
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -387,7 +387,7 @@ sal_Bool ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVe
CharSet eSysSet = gsl_getSystemTextEncoding();
CharSet eSrcSet = rStream.GetStreamCharSet();
if( eSrcSet != eSysSet && aFont.GetCharSet() == eSrcSet )
- aFont.GetCharSet() = eSysSet;
+ aFont.SetCharSet(eSysSet);
aStacked.SetValue( aOrientation.IsStacked() );
aRotateAngle.SetValue( aOrientation.GetRotation( aRotateAngle.GetValue() ) );
commit d68d96b261d58c931f2ade1b560d06ecba099025
Author: Ingrid Halama [iha] <Ingrid.Halama at oracle.com>
Date: Wed Feb 16 19:12:40 2011 +0100
chart51: #i116544# integrate fix for copy/paste bug #i116943#
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 180e381..608e369 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -309,6 +309,7 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector,
if ( xEmbeddedObj.is() )
{
bool bDisableDataTableDialog = false;
+ sal_Int32 nOldState = xEmbeddedObj->getCurrentState();
svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj );
uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
if ( xProps.is() &&
@@ -333,6 +334,10 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector,
}
}
}
+ if ( xEmbeddedObj->getCurrentState() != nOldState )
+ {
+ xEmbeddedObj->changeState( nOldState );
+ }
}
}
}
commit 0a9c27cc8b0ca43ba986b4f64ef6599340f11c22
Author: Ingrid Halama [iha] <Ingrid.Halama at oracle.com>
Date: Wed Feb 16 16:39:11 2011 +0100
chart51: merge with DEV300_m100 - part 2
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 27cc055..035f494 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -287,7 +287,7 @@ void ScDLL::Init()
// Child-Windows
- ScInputWindowWrapper ::RegisterChildWindow( TRUE, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK|SFX_CHILDWIN_NEVERHIDEACTIVEOLE );
+ ScInputWindowWrapper ::RegisterChildWindow( sal_True, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK|SFX_CHILDWIN_NEVERHIDEACTIVEOLE );
ScNavigatorDialogWrapper ::RegisterChildWindowContext(
sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
ScSolverDlgWrapper ::RegisterChildWindow(sal_False, pMod);
commit d0ac95be319f1c99200c8cf0d9befa81f734ccde
Merge: a49de55... f663a19...
Author: Ingrid Halama [iha] <Ingrid.Halama at oracle.com>
Date: Tue Feb 15 14:04:40 2011 +0100
chart51: merge with DEV300_m100
diff --cc sc/source/ui/app/scdll.cxx
index 1f9ae86,d87bad6..27cc055
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@@ -287,42 -287,43 +287,42 @@@ void ScDLL::Init(
// Child-Windows
- // Hack: Eingabezeile mit 42 registrieren, damit sie im PlugIn immer sichtbar ist
- ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
+ ScInputWindowWrapper ::RegisterChildWindow( TRUE, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK|SFX_CHILDWIN_NEVERHIDEACTIVEOLE );
ScNavigatorDialogWrapper ::RegisterChildWindowContext(
sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
- ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScOptSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScNameDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScPivotLayoutWrapper ::RegisterChildWindow(FALSE, pMod);
- ScTabOpDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScSpecialFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScDbNameDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScConsolidateDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScPrintAreasDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScCondFormatDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScColRowNameRangesDlgWrapper::RegisterChildWindow(FALSE, pMod);
- ScFormulaDlgWrapper ::RegisterChildWindow(FALSE, pMod);
+ ScSolverDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScOptSolverDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScNameDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScPivotLayoutWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScTabOpDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScFilterDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScSpecialFilterDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScDbNameDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScConsolidateDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScPrintAreasDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScCondFormatDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScColRowNameRangesDlgWrapper::RegisterChildWindow(sal_False, pMod);
+ ScFormulaDlgWrapper ::RegisterChildWindow(sal_False, pMod);
// First docking Window for Calc
- ScFunctionChildWindow ::RegisterChildWindow(FALSE, pMod);
+ ScFunctionChildWindow ::RegisterChildWindow(sal_False, pMod);
// Redlining- Window
- ScAcceptChgDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScSimpleRefDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
- ScHighlightChgDlgWrapper ::RegisterChildWindow(FALSE, pMod);
-
- SvxSearchDialogWrapper ::RegisterChildWindow(FALSE, pMod);
- SvxHlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- SvxFontWorkChildWindow ::RegisterChildWindow(FALSE, pMod);
- SvxHyperlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_FORCEDOCK);
- SvxIMapDlgChildWindow ::RegisterChildWindow(FALSE, pMod);
- GalleryChildWindow ::RegisterChildWindow(FALSE, pMod);
- ScSpellDialogChildWindow ::RegisterChildWindow(FALSE, pMod);
- ::avmedia::MediaPlayer ::RegisterChildWindow(FALSE, pMod);
+ ScAcceptChgDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ ScSimpleRefDlgWrapper ::RegisterChildWindow(sal_False, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
+ ScHighlightChgDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+
+ SvxSearchDialogWrapper ::RegisterChildWindow(sal_False, pMod);
+ SvxHlinkDlgWrapper ::RegisterChildWindow(sal_False, pMod);
+ SvxFontWorkChildWindow ::RegisterChildWindow(sal_False, pMod);
+ SvxHyperlinkDlgWrapper ::RegisterChildWindow(sal_False, pMod, SFX_CHILDWIN_FORCEDOCK);
+ SvxIMapDlgChildWindow ::RegisterChildWindow(sal_False, pMod);
+ GalleryChildWindow ::RegisterChildWindow(sal_False, pMod);
+ ScSpellDialogChildWindow ::RegisterChildWindow(sal_False, pMod);
+ ::avmedia::MediaPlayer ::RegisterChildWindow(sal_False, pMod);
//<!--Added by PengYunQuan for Validity Cell Range Picker
- ScValidityRefChildWin::RegisterChildWindow(FALSE, pMod);
+ ScValidityRefChildWin::RegisterChildWindow(sal_False, pMod);
//-->Added by PengYunQuan for Validity Cell Range Picker
// Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init
diff --cc sc/source/ui/drawfunc/fusel.cxx
index dad9313,59e33b2..19631c3
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@@ -56,7 -56,9 +56,10 @@@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "scmod.hxx"
+#include "client.hxx"
+ #include "charthelper.hxx"
+ #include "docuno.hxx"
+ #include "docsh.hxx"
// -----------------------------------------------------------------------
@@@ -469,13 -502,12 +503,13 @@@ sal_Bool __EXPORT FuSelection::MouseBut
{
ScModule* pScMod = SC_MOD();
bool bUnoRefDialog = pScMod->IsRefDialogOpen() && pScMod->GetCurRefDlgId() == WID_SIMPLE_REF;
-
- if ( pIPClient->IsObjectInPlaceActive() && !bUnoRefDialog )
- pIPClient->DeactivateObject();
+ if ( pClient->IsObjectInPlaceActive() && !bUnoRefDialog )
+ {
+ pClient->DeactivateObj();
+ }
}
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks == 2 && rMEvt.IsLeft() )
{
if ( pView->AreObjectsMarked() )
diff --cc sc/source/ui/view/drawview.cxx
index 702ea7f,d9c57e8..75d2f43
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@@ -415,9 -415,9 +415,9 @@@ void ScDrawView::MarkListHasChanged(
if ( pClient && pClient->IsObjectInPlaceActive() && !bUnoRefDialog )
{
// #41730# beim ViewShell::Activate aus dem Reset2Open nicht die Handles anzeigen
- //HMHbDisableHdl = TRUE;
+ //HMHbDisableHdl = sal_True;
- pClient->DeactivateObject();
+ pClient->DeactivateObj();
- //HMHbDisableHdl = FALSE;
+ //HMHbDisableHdl = sal_False;
// Image-Ole wieder durch Grafik ersetzen passiert jetzt in ScClient::UIActivate
}
diff --cc sc/source/ui/view/tabvwshb.cxx
index ef6c62f,e716441..6e820f4
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@@ -177,15 -178,9 +179,15 @@@ sal_Bool ScTabViewShell::ActivateObject
((ScClient*)pClient)->SetGrafEdit( NULL );
nErr = pClient->DoVerb( nVerb );
- bErrorShown = TRUE;
+ bErrorShown = sal_True;
// SfxViewShell::DoVerb zeigt seine Fehlermeldungen selber an
+ ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl( this );
+ if ( pInputHdl )
+ {
+ pInputHdl->NotifyChange( NULL );
+ }
+
// attach listener to selection changes in chart that affect cell
// ranges, so those can be highlighted
// note: do that after DoVerb, so that the chart controller exists
commit a49de559aaef66f0bfd1b2341bf7bd936ad232a3
Author: Ingrid Halama [iha] <Ingrid.Halama at oracle.com>
Date: Fri Feb 11 18:16:30 2011 +0100
chart51: #i116681# fixed defaults for lights
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index ad8daab..eaa5782 100755
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -195,6 +195,7 @@ private:
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
+ ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
}
};
commit 92662b0e648455b0da5cadcafbb8fe32437a8b24
Merge: 37da6a8... 94048c0...
Author: Ingrid Halama [iha] <Ingrid.Halama at oracle.com>
Date: Mon Jan 31 14:11:09 2011 +0100
chart51: merge with DEV300_m97
diff --cc chart2/source/tools/CharacterProperties.cxx
index 1bf0403,6895b9a..7b3243b
mode 100644,100755..100755
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
commit 37da6a8a8794a4054d143570f14cc1dcd9f5cfbd
Author: Thomas Benisch [tbe] <thomas.benisch at oracle.com>
Date: Wed Jan 19 17:13:10 2011 +0100
chart51: #i103864# Data labels overlining
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index 6183703..84109c2 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -193,6 +193,40 @@ void CharacterPropertyItemConverter::FillSpecialItem(
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ SvxOverlineItem aItem( UNDERLINE_NONE, EE_CHAR_OVERLINE );
+ bool bModified = false;
+
+ uno::Any aValue( GetPropertySet()->getPropertyValue( C2U( "CharOverline" ) ) );
+ if ( aValue.hasValue() )
+ {
+ aItem.PutValue( aValue, MID_TL_STYLE );
+ bModified = true;
+ }
+
+ aValue = GetPropertySet()->getPropertyValue( C2U( "CharOverlineHasColor" ) );
+ if ( aValue.hasValue() &&
+ ( *reinterpret_cast< const sal_Bool* >( aValue.getValue() ) != sal_False ) )
+ {
+ aItem.PutValue( aValue, MID_TL_HASCOLOR );
+ bModified = true;
+ }
+
+ aValue = GetPropertySet()->getPropertyValue( C2U( "CharOverlineColor" ) );
+ if ( aValue.hasValue() )
+ {
+ aItem.PutValue( aValue, MID_TL_COLOR );
+ bModified = true;
+ }
+
+ if ( bModified )
+ {
+ rOutItemSet.Put( aItem );
+ }
+ }
+ break;
+
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
@@ -397,6 +431,39 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ const SvxOverlineItem& rItem = static_cast< const SvxOverlineItem & >( rItemSet.Get( nWhichId ) );
+
+ if ( rItem.QueryValue( aValue, MID_TL_STYLE ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverline" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverline" ), aValue );
+ bChanged = true;
+ }
+ }
+
+ if ( rItem.QueryValue( aValue, MID_TL_COLOR ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverlineColor" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverlineColor" ), aValue );
+ bChanged = true;
+ }
+ }
+
+ if ( rItem.QueryValue( aValue, MID_TL_HASCOLOR ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverlineHasColor" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverlineHasColor" ), aValue );
+ bChanged = true;
+ }
+ }
+ }
+ break;
+
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx
index 7bca5d4..50b88d2 100644
--- a/chart2/source/inc/CharacterProperties.hxx
+++ b/chart2/source/inc/CharacterProperties.hxx
@@ -63,6 +63,9 @@ public:
PROP_CHAR_UNDERLINE,
PROP_CHAR_UNDERLINE_COLOR,
PROP_CHAR_UNDERLINE_HAS_COLOR,
+ PROP_CHAR_OVERLINE,
+ PROP_CHAR_OVERLINE_COLOR,
+ PROP_CHAR_OVERLINE_HAS_COLOR,
PROP_CHAR_WEIGHT,
PROP_CHAR_POSTURE,
PROP_CHAR_AUTO_KERNING,
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 4f56112..1bf0403 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -161,6 +161,28 @@ void CharacterProperties::AddPropertiesToVector(
::getBooleanCppuType(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
+ // CharOverline (see awt.FontUnderline)
+ rOutProperties.push_back(
+ Property( C2U( "CharOverline" ),
+ PROP_CHAR_OVERLINE,
+ ::getCppuType( reinterpret_cast< const sal_Int16* >( 0 ) ),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ) );
+ // CharOverlineColor
+ rOutProperties.push_back(
+ Property( C2U( "CharOverlineColor" ),
+ PROP_CHAR_OVERLINE_COLOR,
+ ::getCppuType( reinterpret_cast< const sal_Int32* >( 0 ) ),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT
+ | beans::PropertyAttribute::MAYBEVOID ) );
+ // CharOverlineHasColor
+ rOutProperties.push_back(
+ Property( C2U( "CharOverlineHasColor" ),
+ PROP_CHAR_OVERLINE_HAS_COLOR,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ) );
// CharWeight (see awt.FontWeight)
rOutProperties.push_back(
Property( C2U( "CharWeight" ),
@@ -503,6 +525,9 @@ void CharacterProperties::AddDefaultsToMap(
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE, awt::FontUnderline::NONE );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_UNDERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE_HAS_COLOR, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE, awt::FontUnderline::NONE );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_OVERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE_HAS_COLOR, false );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_WEIGHT, awt::FontWeight::NORMAL );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_POSTURE, awt::FontSlant_NONE );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_AUTO_KERNING, true );
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 4fc2ad8..17ab78d 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -244,6 +244,9 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProper
( C2U( "CharUnderline" ), C2U("CharUnderline") )
( C2U( "CharUnderlineColor" ), C2U("CharUnderlineColor") )
( C2U( "CharUnderlineHasColor" ), C2U("CharUnderlineHasColor") )
+ ( C2U( "CharOverline" ), C2U("CharOverline") )
+ ( C2U( "CharOverlineColor" ), C2U("CharOverlineColor") )
+ ( C2U( "CharOverlineHasColor" ), C2U("CharOverlineHasColor") )
( C2U( "CharWeight" ), C2U("CharWeight") )
( C2U( "CharWeightAsian" ), C2U("CharWeightAsian") )
( C2U( "CharWeightComplex" ), C2U("CharWeightComplex") )
commit 53343744b778f7d619191bfe1153b779b8465c98
Author: Thomas Benisch <tbe at openoffice.org>
Date: Fri Jan 7 13:20:38 2011 +0100
chart51: #i106137# Formatting Toolbar - Focus doesn't switch when select an other element
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index dfc25bd..21ee071 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1655,7 +1655,16 @@ bool ChartController::requestQuickHelp(
if ( bSuccess )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() )
+ {
+ this->EndTextEdit();
+ }
this->impl_selectObjectAndNotiy();
+ if ( m_pChartWindow )
+ {
+ m_pChartWindow->Invalidate();
+ }
return sal_True;
}
commit 1a42b24a92e20999cb88acc7c68b768aa29554d0
Author: Thomas Benisch <tbe at openoffice.org>
Date: Fri Dec 10 11:57:28 2010 +0100
#i116037# Don't toggle the calc formula bar when activating and deactivating a chart
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 8a55721..258952f 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -254,3 +254,13 @@ void __EXPORT ScClient::MakeVisible()
}
}
+void ScClient::DeactivateObj()
+{
+ DeactivateObject();
+
+ ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell* >( GetViewShell() );
+ if ( pViewSh )
+ {
+ pViewSh->UpdateInputHandler();
+ }
+}
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index fc1ffce..1f9ae86 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -287,8 +287,7 @@ void ScDLL::Init()
// Child-Windows
- // Hack: Eingabezeile mit 42 registrieren, damit sie im PlugIn immer sichtbar ist
- ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
+ ScInputWindowWrapper ::RegisterChildWindow( TRUE, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK|SFX_CHILDWIN_NEVERHIDEACTIVEOLE );
ScNavigatorDialogWrapper ::RegisterChildWindowContext(
sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 2c284d3..dad9313 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -56,6 +56,7 @@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "scmod.hxx"
+#include "client.hxx"
// -----------------------------------------------------------------------
@@ -462,15 +463,16 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
/**************************************************************************
* Ggf. OLE-Objekt beruecksichtigen
**************************************************************************/
- SfxInPlaceClient* pIPClient = pViewShell->GetIPClient();
- if (pIPClient)
+ ScClient* pClient = static_cast< ScClient* >( pViewShell->GetIPClient() );
+ if ( pClient )
{
ScModule* pScMod = SC_MOD();
bool bUnoRefDialog = pScMod->IsRefDialogOpen() && pScMod->GetCurRefDlgId() == WID_SIMPLE_REF;
-
- if ( pIPClient->IsObjectInPlaceActive() && !bUnoRefDialog )
- pIPClient->DeactivateObject();
+ if ( pClient->IsObjectInPlaceActive() && !bUnoRefDialog )
+ {
+ pClient->DeactivateObj();
+ }
}
USHORT nClicks = rMEvt.GetClicks();
diff --git a/sc/source/ui/inc/client.hxx b/sc/source/ui/inc/client.hxx
index 012ce4d..285c05e 100644
--- a/sc/source/ui/inc/client.hxx
+++ b/sc/source/ui/inc/client.hxx
@@ -56,6 +56,7 @@ public:
SdrGrafObj* GetGrafEdit() const { return pGrafEdit; }
void SetGrafEdit(SdrGrafObj* pNew) { pGrafEdit = pNew; }
SdrOle2Obj* GetDrawObj();
+ void DeactivateObj();
};
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 2564360..dd999f3 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -416,7 +416,7 @@ void ScDrawView::MarkListHasChanged()
{
// #41730# beim ViewShell::Activate aus dem Reset2Open nicht die Handles anzeigen
//HMHbDisableHdl = TRUE;
- pClient->DeactivateObject();
+ pClient->DeactivateObj();
//HMHbDisableHdl = FALSE;
// Image-Ole wieder durch Grafik ersetzen passiert jetzt in ScClient::UIActivate
}
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index cd61a6c..ef6c62f 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -76,6 +76,7 @@
#include "chartarr.hxx"
#include "drawview.hxx"
#include "ChartRangeSelectionListener.hxx"
+#include "inputhdl.hxx"
using namespace com::sun::star;
@@ -179,6 +180,12 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
bErrorShown = TRUE;
// SfxViewShell::DoVerb zeigt seine Fehlermeldungen selber an
+ ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl( this );
+ if ( pInputHdl )
+ {
+ pInputHdl->NotifyChange( NULL );
+ }
+
// attach listener to selection changes in chart that affect cell
// ranges, so those can be highlighted
// note: do that after DoVerb, so that the chart controller exists
@@ -263,7 +270,7 @@ void ScTabViewShell::DeactivateOle()
ScClient* pClient = (ScClient*) GetIPClient();
if ( pClient && pClient->IsObjectInPlaceActive() && !bUnoRefDialog )
- pClient->DeactivateObject();
+ pClient->DeactivateObj();
}
void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
commit 2b64bf399511d48ab811787b8270b5b64f665efd
Author: Ingrid Halama <iha at openoffice.org>
Date: Tue Nov 23 18:24:20 2010 +0100
chart51: #i112773# fix exponential fit for small values (Patch from Regina)
diff --git a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
index 533d3e7..b4313ae 100644
--- a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
@@ -63,9 +63,10 @@ private:
throw (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
- // formula is: f(x) = m_fSlope ^ x + m_fIntercept
- double m_fSlope;
- double m_fIntercept;
+ // formula is: f(x) = exp(m_fLogIntercept) * exp( m_fLogSlope * x )
+ // mathematical model f(x) = Intercept * Slope^x
+ double m_fLogSlope;
+ double m_fLogIntercept;
};
} // namespace chart
diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
index f9ea788..9642d1a 100644
--- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
@@ -43,11 +43,11 @@ namespace chart
{
ExponentialRegressionCurveCalculator::ExponentialRegressionCurveCalculator() :
- m_fSlope( 0.0 ),
- m_fIntercept( 0.0 )
+ m_fLogSlope( 0.0 ),
+ m_fLogIntercept( 0.0 )
{
- ::rtl::math::setNan( & m_fSlope );
- ::rtl::math::setNan( & m_fIntercept );
+ ::rtl::math::setNan( & m_fLogSlope );
+ ::rtl::math::setNan( & m_fLogIntercept );
}
ExponentialRegressionCurveCalculator::~ExponentialRegressionCurveCalculator()
@@ -67,9 +67,9 @@ void SAL_CALL ExponentialRegressionCurveCalculator::recalculateRegression(
const size_t nMax = aValues.first.size();
if( nMax == 0 )
{
- ::rtl::math::setNan( & m_fSlope );
- ::rtl::math::setNan( & m_fIntercept );
- ::rtl::math::setNan( & m_fCorrelationCoeffitient );
+ ::rtl::math::setNan( & m_fLogSlope );
+ ::rtl::math::setNan( & m_fLogIntercept );
+ ::rtl::math::setNan( & m_fCorrelationCoeffitient );// actual it is coefficient of determination
return;
}
@@ -96,12 +96,10 @@ void SAL_CALL ExponentialRegressionCurveCalculator::recalculateRegression(
fQxy += fDeltaX * fDeltaY;
}
- m_fSlope = fQxy / fQx;
- m_fIntercept = fAverageY - m_fSlope * fAverageX;
+ m_fLogSlope = fQxy / fQx;
+ m_fLogIntercept = fAverageY - m_fLogSlope * fAverageX;
m_fCorrelationCoeffitient = fQxy / sqrt( fQx * fQy );
- m_fSlope = exp( m_fSlope );
- m_fIntercept = exp( m_fIntercept );
}
double SAL_CALL ExponentialRegressionCurveCalculator::getCurveValue( double x )
@@ -111,10 +109,10 @@ double SAL_CALL ExponentialRegressionCurveCalculator::getCurveValue( double x )
double fResult;
::rtl::math::setNan( & fResult );
- if( ! ( ::rtl::math::isNan( m_fSlope ) ||
- ::rtl::math::isNan( m_fIntercept )))
+ if( ! ( ::rtl::math::isNan( m_fLogSlope ) ||
+ ::rtl::math::isNan( m_fLogIntercept )))
{
- fResult = m_fIntercept * pow( m_fSlope, x );
+ fResult = exp(m_fLogIntercept + x * m_fLogSlope);
}
return fResult;
@@ -150,31 +148,48 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation(
const uno::Reference< util::XNumberFormatter >& xNumFormatter,
::sal_Int32 nNumberFormatKey ) const
{
+ double fIntercept = exp(m_fLogIntercept);
+ double fSlope = exp(m_fLogSlope);
+ bool bHasSlope = !rtl::math::approxEqual( fSlope, 1.0 );
+ bool bHasIntercept = !rtl::math::approxEqual( fIntercept, 1.0 );
+
OUStringBuffer aBuf( C2U( "f(x) = " ));
- if( m_fIntercept == 0.0 ||
- m_fSlope == 0.0 )
+ if ( fIntercept == 0.0)
{
- aBuf.append( sal_Unicode( '0' ));
- }
- else if( rtl::math::approxEqual( m_fSlope, 1.0 ) )
- {
- aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fIntercept ));
+ // underflow, a true zero is impossible
+ aBuf.append( C2U( "exp( " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogIntercept) );
+ aBuf.append( (m_fLogSlope < 0.0) ? C2U( " - " ) : C2U( " + " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope)) );
+ aBuf.append( C2U( " x )" ));
}
else
{
- if( ! rtl::math::approxEqual( m_fIntercept, 1.0 ) )
+ if (bHasIntercept)
{
- aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fIntercept ));
- aBuf.append( sal_Unicode( 0x00b7 ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fIntercept) );
+ aBuf.append( C2U( " exp( " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogSlope) );
+ aBuf.append( C2U( " x )" ));
+ }
+ else
+ {
+ // show logarithmic output, if intercept and slope both are near one
+ // otherwise drop output of intercept, which is 1 here
+ aBuf.append( C2U( " exp( " ));
+ if (!bHasSlope)
+ {
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogIntercept) );
+ aBuf.append( (m_fLogSlope < 0.0) ? C2U( " - " ) : C2U( " + " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope)) );
+ }
+ else
+ {
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogSlope) );
+ }
+ aBuf.append( C2U( " x )" ));
}
-
- if( m_fSlope < 0.0 )
- aBuf.append( sal_Unicode( '(' ));
- aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fSlope ));
- if( m_fSlope < 0.0 )
- aBuf.append( sal_Unicode( ')' ));
- aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "^x" ));
}
return aBuf.makeStringAndClear();
commit f4866768822af9faa95a75375625d904a0ea7dd8
Author: Herbert Duerr [hdu] <herbert.duerr at oracle.com>
Date: Fri Oct 15 09:25:36 2010 +0200
obo55: #163912# fix hairline drawing related artifacts
obo55: #163911# update visible range when switching sheets
Authors:
Herbert Duerr [hdu] <herbert.duerr at oracle.com>
Niklas Nebel <nn at openoffice.org>
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 317cb92..8872288 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -395,6 +395,8 @@ public:
void UpdateDPFromFieldPopupMenu();
+ void UpdateVisibleRange();
+
// #114409#
void CursorChanged();
void DrawLayerCreated();
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 7b06114..616966c 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -194,6 +194,8 @@ private:
void UpdateVarZoom();
+ void UpdateVisibleRange();
+
static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL );
static long GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 46b5d97..3421849 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5100,6 +5100,26 @@ sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScen
return sal_False;
}
+void ScGridWindow::UpdateVisibleRange()
+{
+ // #163911# Update the visible range outside of paint (called when switching sheets).
+ // Use the same logic here as in ScGridWindow::Draw.
+
+ SCCOL nPosX = pViewData->GetPosX( eHWhich );
+ SCROW nPosY = pViewData->GetPosY( eVWhich );
+
+ SCCOL nXRight = nPosX + pViewData->VisibleCellsX(eHWhich);
+ if (nXRight > MAXCOL) nXRight = MAXCOL;
+ SCROW nYBottom = nPosY + pViewData->VisibleCellsY(eVWhich);
+ if (nYBottom > MAXROW) nYBottom = MAXROW;
+
+ // Store the current visible range.
+ maVisibleRange.mnCol1 = nPosX;
+ maVisibleRange.mnCol2 = nXRight;
+ maVisibleRange.mnRow1 = nPosY;
+ maVisibleRange.mnRow2 = nYBottom;
+}
+
// #114409#
void ScGridWindow::DrawLayerCreated()
{
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index c8521eb..b7ac559 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1548,6 +1548,12 @@ void ScTabView::SelectNextTab( short nDir, sal_Bool bExtendSelection )
PaintExtras();
}
+void ScTabView::UpdateVisibleRange()
+{
+ for (sal_uInt16 i=0; i<4; i++)
+ if (pGridWin[i] && pGridWin[i]->IsVisible())
+ pGridWin[i]->UpdateVisibleRange();
+}
// SetTabNo - angezeigte Tabelle
@@ -1736,6 +1742,9 @@ void ScTabView::SetTabNo( SCTAB nTab, sal_Bool bNew, sal_Bool bExtendSelection,
RepeatResize();
InvalidateSplit();
+ // #163911# Update the visible range in each GridWin directly, don't wait for the repaint event.
+ UpdateVisibleRange();
+
if ( aViewData.IsPagebreakMode() )
UpdatePageBreakData(); //! asynchron ??
commit 91280c32bf0c07f452a92cbc9cf3c6fa2e33e10b
Author: obo <obo at openoffice.org>
Date: Fri Mar 11 14:33:15 2011 +0100
obo55: #164395# Calc 1.0 import (by NN)
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index b593857..735ca49 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -414,7 +414,10 @@ Sc10FontData::Sc10FontData(SvStream& rStream)
rStream >> PitchAndFamily;
sal_uInt16 nLen;
rStream >> nLen;
- rStream.Read(FaceName, nLen);
+ if (nLen < sizeof(FaceName))
+ rStream.Read(FaceName, nLen);
+ else
+ rStream.SetError(ERRCODE_IO_WRONGFORMAT);
}
@@ -452,10 +455,14 @@ Sc10NameData::Sc10NameData(SvStream& rStream)
sal_uInt8 nLen;
rStream >> nLen;
rStream.Read(Name, sizeof(Name) - 1);
+ if (nLen >= sizeof(Name))
+ nLen = sizeof(Name) - 1;
Name[nLen] = 0;
rStream >> nLen;
rStream.Read(Reference, sizeof(Reference) - 1);
+ if (nLen >= sizeof(Reference))
+ nLen = sizeof(Reference) - 1;
Reference[nLen] = 0;
rStream.Read(Reserved, sizeof(Reserved));
}
@@ -1452,6 +1459,8 @@ void Sc10Import::LoadTables()
sal_uInt8 nLen;
rStream >> nLen;
rStream.Read(TabName, sizeof(TabName) - 1);
+ if (nLen >= sizeof(TabName))
+ nLen = sizeof(TabName) - 1;
TabName[nLen] = 0;
//----------------------------------------------------------
@@ -1684,7 +1693,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
{
/*double Value =*/ ScfTools::ReadLongDouble(rStream);
sal_uInt8 Len;
- sal_Char s[256];
+ sal_Char s[256+1];
//rStream.Read(&Value, sizeof(Value));
rStream >> Len;
rStream.Read(&s[1], Len);
More information about the Libreoffice-commits
mailing list