summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorJoe Schaefer <joes@apache.org>2012-11-26 02:32:20 +0000
committerJoe Schaefer <joes@apache.org>2012-11-26 02:32:20 +0000
commit59ee09f905e86724a2ba5cdccab9210d16686820 (patch)
treeb31b34097ade50a060d0d427bce5f8ccd4ad6a6f /tools/source
parent8f4457b94f439f3b8a4a8611f98daa411b615e9e (diff)
mv ooo to top-level
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/generic/b3dtrans.cxx12
-rw-r--r--tools/source/generic/poly2.cxx1
-rw-r--r--tools/source/inet/inetstrm.cxx8
-rw-r--r--tools/source/ref/errinf.cxx14
-rw-r--r--tools/source/ref/pstm.cxx3
-rw-r--r--tools/source/stream/stream.cxx9
6 files changed, 14 insertions, 33 deletions
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index 814ff8deaf06..07dcb387b874 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -43,7 +43,7 @@ B3dTransformationSet::~B3dTransformationSet()
void B3dTransformationSet::Orientation(basegfx::B3DHomMatrix& rTarget, basegfx::B3DPoint aVRP, basegfx::B3DVector aVPN, basegfx::B3DVector aVUP)
{
- rTarget.translate( -aVRP.getX(), -aVRP.getY(), -aVRP.getZ());
+ rTarget.translate(-aVRP);
aVUP.normalize();
aVPN.normalize();
basegfx::B3DVector aRx(aVUP);
@@ -517,7 +517,7 @@ void B3dTransformationSet::SetPerspective(sal_Bool bNew)
}
}
-void B3dTransformationSet::SetViewportRectangle(Rectangle& rRect, Rectangle& rVisible)
+void B3dTransformationSet::SetViewportRectangle(const Rectangle& rRect, const Rectangle& rVisible)
{
if(rRect != maViewportRectangle || rVisible != maVisibleRectangle)
{
@@ -609,9 +609,9 @@ basegfx::B3DHomMatrix B3dTransformationSet::GetMatFromObjectToView()
basegfx::B3DHomMatrix aFromObjectToView = GetObjectToDevice();
const basegfx::B3DVector& rScale(GetScale());
- aFromObjectToView.scale(rScale.getX(), rScale.getY(), rScale.getZ());
+ aFromObjectToView.scale(rScale);
const basegfx::B3DVector& rTranslate(GetTranslate());
- aFromObjectToView.translate(rTranslate.getX(), rTranslate.getY(), rTranslate.getZ());
+ aFromObjectToView.translate(rTranslate);
return aFromObjectToView;
}
@@ -621,9 +621,9 @@ void B3dTransformationSet::CalcMatFromWorldToView()
maMatFromWorldToView = maOrientation;
maMatFromWorldToView *= GetProjection();
const basegfx::B3DVector& rScale(GetScale());
- maMatFromWorldToView.scale(rScale.getX(), rScale.getY(), rScale.getZ());
+ maMatFromWorldToView.scale(rScale);
const basegfx::B3DVector& rTranslate(GetTranslate());
- maMatFromWorldToView.translate(rTranslate.getX(), rTranslate.getY(), rTranslate.getZ());
+ maMatFromWorldToView.translate(rTranslate);
maInvMatFromWorldToView = maMatFromWorldToView;
maInvMatFromWorldToView.invert();
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index d4041a8747b5..e9c68ddb8c64 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -40,6 +40,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
+#include <memory.h>
// ---------------
// - PolyPolygon -
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index 7f96aa418a6b..f9bfbdfadc1c 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -410,7 +410,7 @@ INetMessageOStream::~INetMessageOStream (void)
if (pTargetMsg)
{
SvOpenLockBytes *pLB =
- PTR_CAST (SvOpenLockBytes, pTargetMsg->GetDocumentLB());
+ dynamic_cast< SvOpenLockBytes* >( pTargetMsg->GetDocumentLB());
if (pLB)
{
pLB->Flush();
@@ -555,7 +555,7 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
else
{
SvOpenLockBytes *pLB =
- PTR_CAST(SvOpenLockBytes, pTargetMsg->GetDocumentLB());
+ dynamic_cast< SvOpenLockBytes* >( pTargetMsg->GetDocumentLB());
if (pLB == NULL)
return INETSTREAM_STATUS_WOULDBLOCK;
@@ -866,7 +866,7 @@ int INetMessageDecodeQPStream_Impl::PutMsgLine (
INetMessage *pMsg = GetTargetMessage();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
- SvOpenLockBytes * pLB = PTR_CAST(SvOpenLockBytes, pMsg->GetDocumentLB());
+ SvOpenLockBytes * pLB = dynamic_cast< SvOpenLockBytes* >( pMsg->GetDocumentLB());
if (pLB == NULL) return INETSTREAM_STATUS_WOULDBLOCK;
const sal_Char *pStop = pData + nSize;
@@ -1196,7 +1196,7 @@ int INetMessageDecode64Stream_Impl::PutMsgLine (
INetMessage *pMsg = GetTargetMessage ();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
- SvOpenLockBytes * pLB = PTR_CAST(SvOpenLockBytes, pMsg->GetDocumentLB());
+ SvOpenLockBytes * pLB = dynamic_cast< SvOpenLockBytes* >( pMsg->GetDocumentLB());
if (pLB == NULL) return INETSTREAM_STATUS_WOULDBLOCK;
const sal_Char *pStop = (pData + nSize);
diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx
index 6fdceb4a9b0d..61999c86dce2 100644
--- a/tools/source/ref/errinf.cxx
+++ b/tools/source/ref/errinf.cxx
@@ -130,14 +130,6 @@ void EDcr_Impl::UnRegisterEDcr(DynamicErrorInfo *pDcr)
ppDcr[lIdx]=0;
}
-TYPEINIT0(ErrorInfo);
-TYPEINIT1(DynamicErrorInfo, ErrorInfo);
-TYPEINIT1(StandardErrorInfo, DynamicErrorInfo);
-TYPEINIT1(StringErrorInfo, DynamicErrorInfo);
-TYPEINIT1(TwoStringErrorInfo, DynamicErrorInfo);
-TYPEINIT1(MessageInfo, DynamicErrorInfo);
-
-
ErrorInfo *ErrorInfo::GetErrorInfo(sal_uIntPtr lId)
{
if(lId & ERRCODE_DYNAMIC_MASK)
@@ -319,7 +311,7 @@ sal_uInt16 ErrorHandler::HandleError_Impl(
else
nErrFlags |= ERRCODE_MSG_ERROR;
- DynamicErrorInfo* pDynPtr=PTR_CAST(DynamicErrorInfo,pInfo);
+ DynamicErrorInfo* pDynPtr=dynamic_cast< DynamicErrorInfo* >( pInfo);
if(pDynPtr)
{
sal_uInt16 nDynFlags = pDynPtr->GetDialogMask();
@@ -435,13 +427,13 @@ sal_Bool SimpleErrorHandler::CreateString(
aStr+="\nErrorArea: ";
aStr+=ByteString::CreateFromInt32((nId & ERRCODE_ERROR_MASK &
~((1 << ERRCODE_AREA_SHIFT ) -1 ) ) >> ERRCODE_AREA_SHIFT);
- DynamicErrorInfo *pDyn=PTR_CAST(DynamicErrorInfo,pInfo);
+ const DynamicErrorInfo *pDyn = dynamic_cast< const DynamicErrorInfo* >( pInfo);
if(pDyn)
{
aStr+="\nDId ";
aStr+=ByteString::CreateFromInt32((sal_uIntPtr)*pDyn);
}
- StandardErrorInfo *pStd=PTR_CAST(StandardErrorInfo,pInfo);
+ const StandardErrorInfo *pStd = dynamic_cast< const StandardErrorInfo* >( pInfo);
if(pStd)
{
aStr+="\nXId ";
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index affb6856e845..4082dcf0d744 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -52,9 +52,6 @@ SvCreateInstancePersist SvClassManager::Get( sal_uInt16 nClassId )
return i == aAssocTable.end() ? 0 : i->second;
}
-/****************** SvRttiBase *******************************************/
-TYPEINIT0( SvRttiBase );
-
/****************** SvPersistBaseMemberList ******************************/
SvPersistBaseMemberList::SvPersistBaseMemberList(){}
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 93897942fd70..8ce2393e0809 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -160,9 +160,6 @@ void SvLockBytes::close()
}
//============================================================================
-TYPEINIT0(SvLockBytes);
-
-//============================================================================
// virtual
ErrCode SvLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
sal_Size * pRead) const
@@ -265,16 +262,12 @@ ErrCode SvLockBytes::Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const
//
//============================================================================
-TYPEINIT1(SvOpenLockBytes, SvLockBytes);
-
//============================================================================
//
// class SvAsyncLockBytes
//
//============================================================================
-TYPEINIT1(SvAsyncLockBytes, SvOpenLockBytes);
-
//============================================================================
// virtual
ErrCode SvAsyncLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
@@ -2868,8 +2861,6 @@ void SvMemoryStream::SetSize( sal_Size nNewSize )
ReAllocateMemory( nDiff );
}
-TYPEINIT0 ( SvDataCopyStream )
-
void SvDataCopyStream::Assign( const SvDataCopyStream& )
{
}