diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-20 10:26:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-20 13:08:07 +0200 |
commit | cf66fd32ed8a31d4ca6f031a13e90caf19f40682 (patch) | |
tree | 7456bfbccc3bcadbc958b4b204e515655bb3d9b4 /drawinglayer | |
parent | 58a5bd793a2ed57077fc598281cc74e16373b877 (diff) |
loplugin:unusedmethods
Change-Id: I9ce1ae787b735200cd57b0f470a6e5e3146657fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120777
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/geometry/viewinformation2d.cxx | 66 | ||||
-rw-r--r-- | drawinglayer/source/geometry/viewinformation3d.cxx | 131 |
2 files changed, 0 insertions, 197 deletions
diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx index 115d8cd0b039..e15f2082acd1 100644 --- a/drawinglayer/source/geometry/viewinformation2d.cxx +++ b/drawinglayer/source/geometry/viewinformation2d.cxx @@ -290,72 +290,6 @@ createViewInformation2D(const css::uno::Sequence<css::beans::PropertyValue>& rVi fViewTime, bReducedDisplayQuality); } -uno::Sequence<beans::PropertyValue> -createPropertyValues(const ViewInformation2D& rViewInformation2D) -{ - const bool bObjectTransformationUsed( - !rViewInformation2D.getObjectTransformation().isIdentity()); - const bool bViewTransformationUsed(!rViewInformation2D.getViewTransformation().isIdentity()); - const bool bViewportUsed(!rViewInformation2D.getViewport().isEmpty()); - const bool bTimeUsed(0.0 < rViewInformation2D.getViewTime()); - const bool bVisualizedPageUsed(rViewInformation2D.getVisualizedPage().is()); - const bool bReducedDisplayQualityUsed(rViewInformation2D.getReducedDisplayQuality()); - uno::Sequence<beans::PropertyValue> aPropertyValues; - - sal_uInt32 nIndex = 0; - - const sal_uInt32 nCount((bObjectTransformationUsed ? 1 : 0) + (bViewTransformationUsed ? 1 : 0) - + (bViewportUsed ? 1 : 0) + (bTimeUsed ? 1 : 0) - + (bVisualizedPageUsed ? 1 : 0) + (bReducedDisplayQualityUsed ? 1 : 0)); - - aPropertyValues.realloc(nCount); - - if (bObjectTransformationUsed) - { - css::geometry::AffineMatrix2D aAffineMatrix2D; - basegfx::unotools::affineMatrixFromHomMatrix(aAffineMatrix2D, - rViewInformation2D.getObjectTransformation()); - aPropertyValues[nIndex].Name = g_PropertyName_ObjectTransformation; - aPropertyValues[nIndex].Value <<= aAffineMatrix2D; - nIndex++; - } - - if (bViewTransformationUsed) - { - css::geometry::AffineMatrix2D aAffineMatrix2D; - basegfx::unotools::affineMatrixFromHomMatrix(aAffineMatrix2D, - rViewInformation2D.getViewTransformation()); - aPropertyValues[nIndex].Name = g_PropertyName_ViewTransformation; - aPropertyValues[nIndex].Value <<= aAffineMatrix2D; - nIndex++; - } - - if (bViewportUsed) - { - const css::geometry::RealRectangle2D aViewport( - basegfx::unotools::rectangle2DFromB2DRectangle(rViewInformation2D.getViewport())); - aPropertyValues[nIndex].Name = g_PropertyName_Viewport; - aPropertyValues[nIndex].Value <<= aViewport; - nIndex++; - } - - if (bTimeUsed) - { - aPropertyValues[nIndex].Name = g_PropertyName_Time; - aPropertyValues[nIndex].Value <<= rViewInformation2D.getViewTime(); - nIndex++; - } - - if (bVisualizedPageUsed) - { - aPropertyValues[nIndex].Name = g_PropertyName_VisualizedPage; - aPropertyValues[nIndex].Value <<= rViewInformation2D.getVisualizedPage(); - nIndex++; - } - - return aPropertyValues; -} - } // end of namespace drawinglayer::geometry /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/source/geometry/viewinformation3d.cxx b/drawinglayer/source/geometry/viewinformation3d.cxx index b3e75bffa6dd..bab2e31f9630 100644 --- a/drawinglayer/source/geometry/viewinformation3d.cxx +++ b/drawinglayer/source/geometry/viewinformation3d.cxx @@ -211,122 +211,6 @@ namespace drawinglayer::geometry mxExtendedInformation.realloc(nExtendedInsert); } - // central method to create a Sequence of PropertyValues containing he complete - // data set - void impFillViewInformationFromContent() - { - const bool bObjectTransformationUsed(!maObjectTransformation.isIdentity()); - const bool bOrientationUsed(!maOrientation.isIdentity()); - const bool bProjectionUsed(!maProjection.isIdentity()); - const bool bDeviceToViewUsed(!maDeviceToView.isIdentity()); - const bool bTimeUsed(0.0 < mfViewTime); - const bool bExtraInformation(mxExtendedInformation.hasElements()); - - // projection may be defined using a frustum in which case the last line of - // the 4x4 matrix is not (0,0,0,1). Since AffineMatrix3D does not support that, - // these four values need to be treated extra - const bool bProjectionUsed_30(bProjectionUsed && !basegfx::fTools::equalZero(maProjection.get(3, 0))); - const bool bProjectionUsed_31(bProjectionUsed && !basegfx::fTools::equalZero(maProjection.get(3, 1))); - const bool bProjectionUsed_32(bProjectionUsed && !basegfx::fTools::equalZero(maProjection.get(3, 2))); - const bool bProjectionUsed_33(bProjectionUsed && !basegfx::fTools::equal(maProjection.get(3, 3), 1.0)); - - sal_uInt32 nIndex(0); - const sal_uInt32 nCount( - (bObjectTransformationUsed ? 1 : 0) + - (bOrientationUsed ? 1 : 0) + - (bProjectionUsed ? 1 : 0) + - (bProjectionUsed_30 ? 1 : 0) + - (bProjectionUsed_31 ? 1 : 0) + - (bProjectionUsed_32 ? 1 : 0) + - (bProjectionUsed_33 ? 1 : 0) + - (bDeviceToViewUsed ? 1 : 0) + - (bTimeUsed ? 1 : 0) + - (bExtraInformation ? mxExtendedInformation.getLength() : 0)); - - mxViewInformation.realloc(nCount); - - if(bObjectTransformationUsed) - { - css::geometry::AffineMatrix3D aAffineMatrix3D; - basegfx::unotools::affineMatrixFromHomMatrix3D(aAffineMatrix3D, maObjectTransformation); - mxViewInformation[nIndex].Name = getNamePropertyObjectTransformation(); - mxViewInformation[nIndex].Value <<= aAffineMatrix3D; - nIndex++; - } - - if(bOrientationUsed) - { - css::geometry::AffineMatrix3D aAffineMatrix3D; - basegfx::unotools::affineMatrixFromHomMatrix3D(aAffineMatrix3D, maOrientation); - mxViewInformation[nIndex].Name = getNamePropertyOrientation(); - mxViewInformation[nIndex].Value <<= aAffineMatrix3D; - nIndex++; - } - - if(bProjectionUsed) - { - css::geometry::AffineMatrix3D aAffineMatrix3D; - basegfx::unotools::affineMatrixFromHomMatrix3D(aAffineMatrix3D, maProjection); - mxViewInformation[nIndex].Name = getNamePropertyProjection(); - mxViewInformation[nIndex].Value <<= aAffineMatrix3D; - nIndex++; - } - - if(bProjectionUsed_30) - { - mxViewInformation[nIndex].Name = getNamePropertyProjection_30(); - mxViewInformation[nIndex].Value <<= maProjection.get(3, 0); - nIndex++; - } - - if(bProjectionUsed_31) - { - mxViewInformation[nIndex].Name = getNamePropertyProjection_31(); - mxViewInformation[nIndex].Value <<= maProjection.get(3, 1); - nIndex++; - } - - if(bProjectionUsed_32) - { - mxViewInformation[nIndex].Name = getNamePropertyProjection_32(); - mxViewInformation[nIndex].Value <<= maProjection.get(3, 2); - nIndex++; - } - - if(bProjectionUsed_33) - { - mxViewInformation[nIndex].Name = getNamePropertyProjection_33(); - mxViewInformation[nIndex].Value <<= maProjection.get(3, 3); - nIndex++; - } - - if(bDeviceToViewUsed) - { - css::geometry::AffineMatrix3D aAffineMatrix3D; - basegfx::unotools::affineMatrixFromHomMatrix3D(aAffineMatrix3D, maDeviceToView); - mxViewInformation[nIndex].Name = getNamePropertyDeviceToView(); - mxViewInformation[nIndex].Value <<= aAffineMatrix3D; - nIndex++; - } - - if(bTimeUsed) - { - mxViewInformation[nIndex].Name = getNamePropertyTime(); - mxViewInformation[nIndex].Value <<= mfViewTime; - nIndex++; - } - - if(bExtraInformation) - { - const sal_Int32 nExtra(mxExtendedInformation.getLength()); - - for(sal_Int32 a(0); a < nExtra; a++) - { - mxViewInformation[nIndex++] = mxExtendedInformation[a]; - } - } - } - public: ImpViewInformation3D( const basegfx::B3DHomMatrix& rObjectTransformation, @@ -387,16 +271,6 @@ namespace drawinglayer::geometry return maObjectToView; } - const uno::Sequence< beans::PropertyValue >& getViewInformationSequence() const - { - if(!mxViewInformation.hasElements()) - { - const_cast< ImpViewInformation3D* >(this)->impFillViewInformationFromContent(); - } - - return mxViewInformation; - } - const uno::Sequence< beans::PropertyValue >& getExtendedInformationSequence() const { return mxExtendedInformation; @@ -496,11 +370,6 @@ namespace drawinglayer::geometry return mpViewInformation3D->getViewTime(); } - const uno::Sequence< beans::PropertyValue >& ViewInformation3D::getViewInformationSequence() const - { - return mpViewInformation3D->getViewInformationSequence(); - } - const uno::Sequence< beans::PropertyValue >& ViewInformation3D::getExtendedInformationSequence() const { return mpViewInformation3D->getExtendedInformationSequence(); |