[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer include/unotools sfx2/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 20 11:08:50 UTC 2021
drawinglayer/source/geometry/viewinformation2d.cxx | 66 ----------
drawinglayer/source/geometry/viewinformation3d.cxx | 131 --------------------
include/drawinglayer/geometry/viewinformation2d.hxx | 2
include/drawinglayer/geometry/viewinformation3d.hxx | 9 -
include/unotools/compatibility.hxx | 12 -
sfx2/source/dialog/StyleList.cxx | 6
sfx2/source/dialog/templdlg.cxx | 42 ------
sfx2/source/inc/StyleList.hxx | 2
sfx2/source/inc/templdgi.hxx | 1
9 files changed, 271 deletions(-)
New commits:
commit cf66fd32ed8a31d4ca6f031a13e90caf19f40682
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Aug 20 10:26:50 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Aug 20 13:08:07 2021 +0200
loplugin:unusedmethods
Change-Id: I9ce1ae787b735200cd57b0f470a6e5e3146657fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120777
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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();
diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx
index 0cc385f1e49f..41d2365cc628 100644
--- a/include/drawinglayer/geometry/viewinformation2d.hxx
+++ b/include/drawinglayer/geometry/viewinformation2d.hxx
@@ -142,8 +142,6 @@ public:
DRAWINGLAYER_DLLPUBLIC ViewInformation2D
createViewInformation2D(const css::uno::Sequence<css::beans::PropertyValue>& rViewParameters);
-DRAWINGLAYER_DLLPUBLIC css::uno::Sequence<css::beans::PropertyValue>
-createPropertyValues(const ViewInformation2D& rViewInformation2D);
} // end of namespace drawinglayer::geometry
diff --git a/include/drawinglayer/geometry/viewinformation3d.hxx b/include/drawinglayer/geometry/viewinformation3d.hxx
index b2510328757b..ca368a6c3d3c 100644
--- a/include/drawinglayer/geometry/viewinformation3d.hxx
+++ b/include/drawinglayer/geometry/viewinformation3d.hxx
@@ -143,15 +143,6 @@ namespace drawinglayer::geometry
/// for convenience, the linear combination of the above four transformations is offered
const basegfx::B3DHomMatrix& getObjectToView() const;
- /** Get the uno::Sequence< beans::PropertyValue > which contains all ViewInformation
-
- Use this call if You need to extract all contained ViewInformation. The ones
- directly supported for convenience will be added to the ones only available
- as PropertyValues. This set completely describes this ViewInformation3D and
- can be used for complete information transport over UNO API.
- */
- const css::uno::Sequence< css::beans::PropertyValue >& getViewInformationSequence() const;
-
/** Get the uno::Sequence< beans::PropertyValue > which contains only ViewInformation
not offered directly
diff --git a/include/unotools/compatibility.hxx b/include/unotools/compatibility.hxx
index eae757103e6c..c74825c8f5bd 100644
--- a/include/unotools/compatibility.hxx
+++ b/include/unotools/compatibility.hxx
@@ -79,18 +79,6 @@ class SvtCompatibilityEntry
static constexpr OUStringLiteral USER_ENTRY_NAME = u"_user";
static constexpr OUStringLiteral DEFAULT_ENTRY_NAME = u"_default";
- static Index getIndex( std::u16string_view rName )
- {
- for ( int i = static_cast<int>(Index::Name); i < static_cast<int>(Index::INVALID); ++i )
- if ( getName( Index(i) ) == rName )
- return Index(i);
-
- /* SvtCompatibilityEntry::getIndex() Undeclared compatibility property name */
- assert(false);
-
- return Index::INVALID;
- }
-
static size_t getElementCount()
{
return static_cast<size_t>(Index::INVALID);
diff --git a/sfx2/source/dialog/StyleList.cxx b/sfx2/source/dialog/StyleList.cxx
index b9d943cf519d..88f251046d09 100644
--- a/sfx2/source/dialog/StyleList.cxx
+++ b/sfx2/source/dialog/StyleList.cxx
@@ -1805,10 +1805,4 @@ IMPL_LINK(StyleList, PopupTreeMenuHdl, const CommandEvent&, rCEvt, bool)
return true;
}
-void StyleList::setVisible(bool b)
-{
- m_xTreeBox->set_visible(b && m_bHierarchical);
- m_xFmtLb->set_visible(b && !m_bHierarchical);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index bb27c5e51fb3..c592306546c8 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -375,48 +375,6 @@ void SfxCommonTemplateDialog_Impl::EnableTreeDrag(bool bEnable)
m_aStyleListEnableTreeDrag.Call(bEnable);
}
-static OUString lcl_GetStyleFamilyName( SfxStyleFamily nFamily )
-{
- if(nFamily == SfxStyleFamily::Char)
- return "CharacterStyles" ;
- if(nFamily == SfxStyleFamily::Para)
- return "ParagraphStyles";
- if(nFamily == SfxStyleFamily::Page)
- return "PageStyles";
- if(nFamily == SfxStyleFamily::Table)
- return "TableStyles";
- if (nFamily == SfxStyleFamily::Pseudo)
- return "NumberingStyles";
- return OUString();
-}
-
-OUString SfxCommonTemplateDialog_Impl::getDefaultStyleName( const SfxStyleFamily eFam, const StyleList& rStyleList )
-{
- OUString sDefaultStyle;
- OUString aFamilyName = lcl_GetStyleFamilyName(eFam);
- if( aFamilyName == "TableStyles" )
- sDefaultStyle = "Default Style";
- else if(aFamilyName == "NumberingStyles")
- sDefaultStyle = "No List";
- else
- sDefaultStyle = "Standard";
- uno::Reference<style::XStyleFamiliesSupplier> xModel(rStyleList.GetObjectShell()->GetModel(), uno::UNO_QUERY);
- OUString aUIName;
- try
- {
- uno::Reference< container::XNameAccess > xStyles;
- uno::Reference< container::XNameAccess > xCont = xModel->getStyleFamilies();
- xCont->getByName( aFamilyName ) >>= xStyles;
- uno::Reference< beans::XPropertySet > xInfo;
- xStyles->getByName( sDefaultStyle ) >>= xInfo;
- xInfo->getPropertyValue("DisplayName") >>= aUIName;
- }
- catch (const uno::Exception&)
- {
- }
- return aUIName;
-}
-
// Updated display: Watering the house
void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
{
diff --git a/sfx2/source/inc/StyleList.hxx b/sfx2/source/inc/StyleList.hxx
index ed228f869c1e..d933d8df9e07 100644
--- a/sfx2/source/inc/StyleList.hxx
+++ b/sfx2/source/inc/StyleList.hxx
@@ -121,8 +121,6 @@ public:
void FamilySelect(sal_uInt16 nEntry);
void FilterSelect(sal_uInt16 nActFilter, bool bsetFilter);
- void setVisible(bool b);
-
private:
void FillTreeBox(SfxStyleFamily eFam);
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 0b9753cccce1..8575bdb49205 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -63,7 +63,6 @@ private:
friend class DeletionWatcher;
DeletionWatcher* impl_setDeletionWatcher(DeletionWatcher* pNewWatcher);
- static OUString getDefaultStyleName( const SfxStyleFamily eFam, const StyleList& rStyleList );
protected:
#define MAX_FAMILIES 6
More information about the Libreoffice-commits
mailing list