summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-12-06 15:19:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-07 07:06:12 +0100
commit3efde47ec9ee091479c04129696f99dc934c3f64 (patch)
treeb9643dedf8d843c4cb43255db103e7a95ee90ebd /filter/source
parentdbc5519e9d4b36a6c48b14d83c8d813d5156433f (diff)
loplugin:unusedfields
Change-Id: Id39c3f484a364fb5163444febe99aee79daf1a76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/msfilter/eschesdo.cxx28
-rw-r--r--filter/source/msfilter/eschesdo.hxx10
2 files changed, 18 insertions, 20 deletions
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 72b85624f302..f13596184484 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -46,11 +46,12 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::task;
using namespace ::com::sun::star::style;
+constexpr o3tl::Length geUnitsSrc(o3tl::Length::mm100);
+// PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi
+constexpr o3tl::Length geUnitsDest(o3tl::Length::twip);
+
ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
: mpEscherEx(&rEx)
- , meUnitsSrc(o3tl::Length::mm100)
- // PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi
- , meUnitsDest(o3tl::Length::twip)
, mpPicStrm(nullptr)
, mpHostAppData(nullptr)
, mbIsTitlePossible(false)
@@ -62,12 +63,12 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
Point ImplEESdrWriter::ImplMapPoint( const Point& rPoint )
{
- return o3tl::convert( rPoint, meUnitsSrc, meUnitsDest );
+ return o3tl::convert( rPoint, geUnitsSrc, geUnitsDest );
}
Size ImplEESdrWriter::ImplMapSize( const Size& rSize )
{
- Size aRetSize( o3tl::convert( rSize, meUnitsSrc, meUnitsDest ) );
+ Size aRetSize( o3tl::convert( rSize, geUnitsSrc, geUnitsDest ) );
if ( !aRetSize.Width() )
aRetSize.AdjustWidth( 1 );
@@ -190,7 +191,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
for( sal_uInt32 n = 0, nCnt = xXIndexAccess->getCount();
n < nCnt; ++n )
{
- ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
+ ImplEESdrObject aObj( *o3tl::doAccess<Reference<XShape>>(
xXIndexAccess->getByIndex( n )) );
if( aObj.IsValid() )
{
@@ -838,7 +839,7 @@ void ImplEESdrWriter::ImplWritePage(
const sal_uInt32 nShapes = mXShapes->getCount();
for( sal_uInt32 n = 0; n < nShapes; ++n )
{
- ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
+ ImplEESdrObject aObj( *o3tl::doAccess<Reference<XShape>>(
mXShapes->getByIndex( n )) );
if( aObj.IsValid() )
{
@@ -1011,12 +1012,11 @@ ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
// why not declare a const parameter if the object will
// not be modified?
mXShape.set( const_cast<SdrObject*>(&rObj)->getUnoShape(), UNO_QUERY );
- Init( rEx );
+ Init();
}
}
-ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
- const Reference< XShape >& rShape ) :
+ImplEESdrObject::ImplEESdrObject( const Reference< XShape >& rShape ) :
mXShape( rShape ),
mnShapeId( 0 ),
mnTextSize( 0 ),
@@ -1026,7 +1026,7 @@ ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
mbEmptyPresObj( false ),
mbOOXML(false)
{
- Init( rEx );
+ Init();
}
@@ -1137,7 +1137,7 @@ static basegfx::B2DRange getUnrotatedGroupBoundRange(const Reference< XShape >&
return aRetval;
}
-void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
+void ImplEESdrObject::Init()
{
mXPropSet.set( mXShape, UNO_QUERY );
if( !mXPropSet.is() )
@@ -1155,7 +1155,7 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
const Point aNewP(basegfx::fround(aUnrotatedRange.getMinX()), basegfx::fround(aUnrotatedRange.getMinY()));
const Size aNewS(basegfx::fround(aUnrotatedRange.getWidth()), basegfx::fround(aUnrotatedRange.getHeight()));
- SetRect(rEx.ImplMapPoint(aNewP), rEx.ImplMapSize(aNewS));
+ SetRect(ImplEESdrWriter::ImplMapPoint(aNewP), ImplEESdrWriter::ImplMapSize(aNewS));
}
else
{
@@ -1163,7 +1163,7 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
const Point aOldP(mXShape->getPosition().X, mXShape->getPosition().Y);
const Size aOldS(mXShape->getSize().Width, mXShape->getSize().Height);
- SetRect(rEx.ImplMapPoint(aOldP), rEx.ImplMapSize(aOldS));
+ SetRect(ImplEESdrWriter::ImplMapPoint(aOldP), ImplEESdrWriter::ImplMapSize(aOldS));
}
if( ImplGetPropertyValue( "IsPresentationObject" ) )
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index 6d5f84f6a760..6ece40a69b10 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -42,12 +42,12 @@ class ImplEESdrObject
bool mbEmptyPresObj : 1;
bool mbOOXML;
- void Init( ImplEESdrWriter& rEx );
+ void Init();
public:
css::uno::Reference< css::beans::XPropertySet > mXPropSet;
ImplEESdrObject( ImplEESdrWriter& rEx, const SdrObject& rObj, bool bOOXML );
- ImplEESdrObject( ImplEESdrWriter& rEx, const css::uno::Reference< css::drawing::XShape >& rShape );
+ ImplEESdrObject( const css::uno::Reference< css::drawing::XShape >& rShape );
~ImplEESdrObject();
bool ImplGetPropertyValue( const OUString& rString );
@@ -100,8 +100,6 @@ class EscherExHostAppData;
class ImplEESdrWriter
{
EscherEx* mpEscherEx;
- o3tl::Length meUnitsSrc;
- o3tl::Length meUnitsDest;
css::uno::Reference< css::drawing::XDrawPage > mXDrawPage;
css::uno::Reference< css::drawing::XShapes > mXShapes;
SvStream* mpPicStrm;
@@ -127,8 +125,8 @@ class ImplEESdrWriter
public:
explicit ImplEESdrWriter( EscherEx& rEx );
~ImplEESdrWriter();
- Point ImplMapPoint( const Point& rPoint );
- Size ImplMapSize( const Size& rSize );
+ static Point ImplMapPoint( const Point& rPoint );
+ static Size ImplMapSize( const Size& rSize );
EscherExHostAppData* ImplGetHostData() { return mpHostAppData; }
bool ImplInitPage( const SdrPage& rPage );
bool ImplInitUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes );