[Libreoffice-commits] core.git: 3 commits - chart2/source
Kohei Yoshida
kohei.yoshida at gmail.com
Tue Sep 3 20:17:48 PDT 2013
chart2/source/inc/chartview/DrawModelWrapper.hxx | 9 +++++----
chart2/source/view/diagram/VDiagram.cxx | 8 +++-----
chart2/source/view/inc/VDiagram.hxx | 11 +++++------
chart2/source/view/main/DrawModelWrapper.cxx | 17 ++++++-----------
4 files changed, 19 insertions(+), 26 deletions(-)
New commits:
commit 4a44d51c999769bd548cf2d9b7d8f844e1ae1ae9
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Tue Sep 3 22:21:02 2013 -0400
std::auto_ptr is deprecated.
Change-Id: I99f619393abc9e2fa7a38a8176084989d063a9ae
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index dc612dc..d58714c 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -31,6 +31,8 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include "chartviewdllapi.hxx"
+#include <boost/scoped_ptr.hpp>
+
namespace chart
{
@@ -42,7 +44,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > m_xMainDrawPage;
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > m_xHiddenDrawPage;
- std::auto_ptr< OutputDevice > m_apRefDevice;
+ boost::scoped_ptr<OutputDevice> m_pRefDevice;
//no default constructor
DrawModelWrapper();
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 2f6606a..c5ad39d 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -107,7 +107,6 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext>
, m_pChartItemPool(0)
, m_xMainDrawPage(0)
, m_xHiddenDrawPage(0)
- , m_apRefDevice(0)
{
m_pChartItemPool = ChartItemPool::CreateChartItemPool();
@@ -163,12 +162,12 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext>
OutputDevice* pDefaultDevice = rOutliner.GetRefDevice();
if( !pDefaultDevice )
pDefaultDevice = Application::GetDefaultDevice();
- m_apRefDevice = std::auto_ptr< OutputDevice >( new VirtualDevice( *pDefaultDevice ) );
- MapMode aMapMode = m_apRefDevice->GetMapMode();
+ m_pRefDevice.reset(new VirtualDevice(*pDefaultDevice));
+ MapMode aMapMode = m_pRefDevice->GetMapMode();
aMapMode.SetMapUnit(MAP_100TH_MM);
- m_apRefDevice->SetMapMode(aMapMode);
- SetRefDevice(m_apRefDevice.get());
- rOutliner.SetRefDevice(m_apRefDevice.get());
+ m_pRefDevice->SetMapMode(aMapMode);
+ SetRefDevice(m_pRefDevice.get());
+ rOutliner.SetRefDevice(m_pRefDevice.get());
}
DrawModelWrapper::~DrawModelWrapper()
commit 44cfb3c3bcb5a84191d3935b1def9e09d7ba3ab3
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Tue Sep 3 22:17:17 2013 -0400
Service manager class member not used. Remove it.
Change-Id: I1734fb6aa100f25e317e15f678f7582353283e73
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index 34646a5..dc612dc 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -37,7 +37,6 @@ namespace chart
class OOO_DLLPUBLIC_CHARTVIEW DrawModelWrapper : private SdrModel
{
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiComponentFactory > m_xMCF;
SfxItemPool* m_pChartItemPool;
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > m_xMainDrawPage;
@@ -49,8 +48,8 @@ private:
DrawModelWrapper();
public:
- SAL_DLLPRIVATE DrawModelWrapper(::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext > const & xContext );
+ SAL_DLLPRIVATE DrawModelWrapper(
+ const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext );
SAL_DLLPRIVATE virtual ~DrawModelWrapper();
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getShapeFactory();
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 2a0abf1..2f6606a 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -102,10 +102,8 @@ OutputDevice * lcl_GetParentRefDevice( const uno::Reference< frame::XModel > & x
namespace chart
{
-DrawModelWrapper::DrawModelWrapper(
- uno::Reference<uno::XComponentContext> const & xContext )
+DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext>& /*xContext*/ )
: SdrModel( SvtPathOptions().GetPalettePath() )
- , m_xMCF(0)
, m_pChartItemPool(0)
, m_xMainDrawPage(0)
, m_xHiddenDrawPage(0)
@@ -113,8 +111,6 @@ DrawModelWrapper::DrawModelWrapper(
{
m_pChartItemPool = ChartItemPool::CreateChartItemPool();
- m_xMCF = xContext->getServiceManager();
-
SetScaleUnit(MAP_100TH_MM);
SetScaleFraction(Fraction(1, 1));
SetDefaultFontHeight(423); // 12pt
commit 302a966f5485578d87872699ef9c90fc173c1600
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Tue Sep 3 21:43:44 2013 -0400
bool cleanup in VDiagram.
m_bPolar no longer used.
And I *believe* >>= now supports bool. So no need to use sal_Bool here.
Change-Id: I3ae3a22fd7c3a1fa05bba17fa3614dfd4020d336
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 92b7162..b91637d 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -48,9 +48,8 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
VDiagram::VDiagram(
- const uno::Reference< XDiagram > & xDiagram
- , const drawing::Direction3D& rPreferredAspectRatio
- , sal_Int32 nDimension, sal_Bool bPolar )
+ const uno::Reference<XDiagram> & xDiagram, const drawing::Direction3D& rPreferredAspectRatio,
+ sal_Int32 nDimension )
: m_xTarget(NULL)
, m_xShapeFactory(NULL)
, m_pShapeFactory(NULL)
@@ -58,14 +57,13 @@ VDiagram::VDiagram(
, m_xCoordinateRegionShape(NULL)
, m_xWall2D(NULL)
, m_nDimensionCount(nDimension)
- , m_bPolar(bPolar)
, m_xDiagram(xDiagram)
, m_aPreferredAspectRatio(rPreferredAspectRatio)
, m_xAspectRatio3D()
, m_fXAnglePi(0)
, m_fYAnglePi(0)
, m_fZAnglePi(0)
- , m_bRightAngledAxes(sal_False)
+ , m_bRightAngledAxes(false)
{
if( m_nDimensionCount == 3)
{
diff --git a/chart2/source/view/inc/VDiagram.hxx b/chart2/source/view/inc/VDiagram.hxx
index 5659354..89f55b1 100644
--- a/chart2/source/view/inc/VDiagram.hxx
+++ b/chart2/source/view/inc/VDiagram.hxx
@@ -39,10 +39,9 @@ diagram.
class VDiagram
{
public: //methods
- VDiagram( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram > & xDiagram
- , const ::com::sun::star::drawing::Direction3D& rPreferredAspectRatio
- , sal_Int32 nDimension=3, sal_Bool bPolar=sal_False );
+ VDiagram( const com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram>& xDiagram,
+ const com::sun::star::drawing::Direction3D& rPreferredAspectRatio,
+ sal_Int32 nDimension = 3 );
virtual ~VDiagram();
void init(
@@ -91,7 +90,6 @@ private: //members
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xWall2D;
sal_Int32 m_nDimensionCount;
- sal_Bool m_bPolar;
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDiagram > m_xDiagram;
@@ -101,13 +99,14 @@ private: //members
double m_fXAnglePi;
double m_fYAnglePi;
double m_fZAnglePi;
- sal_Bool m_bRightAngledAxes;
::com::sun::star::awt::Point m_aAvailablePosIncludingAxes;
::com::sun::star::awt::Size m_aAvailableSizeIncludingAxes;
::com::sun::star::awt::Point m_aCurrentPosWithoutAxes;
::com::sun::star::awt::Size m_aCurrentSizeWithoutAxes;
+
+ bool m_bRightAngledAxes;
};
} //namespace chart
More information about the Libreoffice-commits
mailing list