Kaydet (Commit) 59f398e9 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in sd

Change-Id: I01e6431279b71d0cff8f44614b3cad17f0f89460
Reviewed-on: https://gerrit.libreoffice.org/54452Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 21373c75
......@@ -47,9 +47,6 @@ public:
class SD_DLLPUBLIC SdIOCompat : public old_SdrDownCompat
{
private:
sal_uInt16 nVersion;
public:
// nNewMode: StreamMode::READ or StreamMode::WRITE
// nVer: specify only when writing
......
......@@ -93,18 +93,18 @@ void old_SdrDownCompat::CloseSubRecord()
|*
\************************************************************************/
SdIOCompat::SdIOCompat(SvStream& rNewStream, StreamMode nNewMode, sal_uInt16 nVer)
: old_SdrDownCompat(rNewStream, nNewMode), nVersion(nVer)
SdIOCompat::SdIOCompat(SvStream& rNewStream, StreamMode nNewMode, sal_uInt16 nVersion)
: old_SdrDownCompat(rNewStream, nNewMode)
{
if (nNewMode == StreamMode::WRITE)
{
DBG_ASSERT(nVer != SDIOCOMPAT_VERSIONDONTKNOW,
DBG_ASSERT(nVersion != SDIOCOMPAT_VERSIONDONTKNOW,
"can't write unknown version");
rNewStream.WriteUInt16( nVersion );
}
else if (nNewMode == StreamMode::READ)
{
DBG_ASSERT(nVer == SDIOCOMPAT_VERSIONDONTKNOW,
DBG_ASSERT(nVersion == SDIOCOMPAT_VERSIONDONTKNOW,
"referring to the version while reading is silly!");
rNewStream.ReadUInt16( nVersion );
}
......
......@@ -211,7 +211,6 @@ private:
OUString msDescription;
OUString msEffectName;
CustomAnimationEffectPtr mpEffect;
const CustomAnimationPresets* mpCustomAnimationPresets;
static const long nIconWidth = 19;
static const long nItemMinHeight = 38;
};
......@@ -222,7 +221,6 @@ CustomAnimationListEntryItem::CustomAnimationListEntryItem( const OUString& aDes
, msDescription( aDescription )
, msEffectName( OUString() )
, mpEffect(pEffect)
, mpCustomAnimationPresets(&CustomAnimationPresets::getCustomAnimationPresets())
{
switch(mpEffect->getPresetClass())
{
......@@ -235,7 +233,7 @@ CustomAnimationListEntryItem::CustomAnimationListEntryItem( const OUString& aDes
case EffectPresetClass::MOTIONPATH:
msEffectName = SdResId(STR_CUSTOMANIMATION_MOTION_PATHS); break;
}
msEffectName = msEffectName.replaceFirst( "%1" , mpCustomAnimationPresets->getUINameForPresetId(mpEffect->getPresetId()));
msEffectName = msEffectName.replaceFirst( "%1" , CustomAnimationPresets::getCustomAnimationPresets().getUINameForPresetId(mpEffect->getPresetId()));
}
void CustomAnimationListEntryItem::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData )
......
......@@ -131,7 +131,6 @@ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW,
, m_nCurrentFrame(EMPTY_FRAMELIST)
, bMovie(false)
, bAllObjects(false)
, pBindings(pInBindings)
{
get(m_pBtnFirst, "first");
get(m_pBtnReverse, "prev");
......@@ -165,7 +164,7 @@ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW,
SdPage* pPage = pMyDoc->AllocSdPage(false);
pMyDoc->InsertPage(pPage);
pControllerItem = new AnimationControllerItem( SID_ANIMATOR_STATE, this, pBindings );
pControllerItem = new AnimationControllerItem( SID_ANIMATOR_STATE, this, pInBindings );
// as long as not in the resource
m_pTimeField->SetFormat( TimeFieldFormat::F_SEC_CS );
......
......@@ -32,7 +32,6 @@
*/
SdSnapLineDlg::SdSnapLineDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View const * pView)
: GenericDialogController(pWindow, "modules/sdraw/ui/dlgsnap.ui", "SnapObjectDialog")
, eUIUnit(pView->GetDoc().GetUIUnit())
, aUIScale(pView->GetDoc().GetUIScale())
, m_xFtX(m_xBuilder->weld_label("xlabel"))
, m_xMtrFldX(m_xBuilder->weld_metric_spin_button("x", FUNIT_CM))
......@@ -50,6 +49,7 @@ SdSnapLineDlg::SdSnapLineDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
m_xBtnDelete->connect_clicked(LINK(this, SdSnapLineDlg, ClickHdl));
FieldUnit eUIUnit = pView->GetDoc().GetUIUnit();
SetFieldUnit(*m_xMtrFldX, eUIUnit, true);
SetFieldUnit(*m_xMtrFldY, eUIUnit, true);
......
......@@ -210,9 +210,9 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar
aCtrlSiz = aSiz;
}
mnNotesId = mpTabCtrl->GetPageId("notes");
sal_uInt16 nNotesId = mpTabCtrl->GetPageId("notes");
mpNotesHandoutsTabPage = VclPtr<HeaderFooterTabPage>::Create( mpTabCtrl, pDoc, pNotes, true );
mpTabCtrl->SetTabPage( mnNotesId, mpNotesHandoutsTabPage );
mpTabCtrl->SetTabPage( nNotesId, mpNotesHandoutsTabPage );
get(maPBApplyToAll, "apply_all" );
get(maPBApply, "apply" );
......
......@@ -25,7 +25,6 @@
SdInsertLayerDlg::SdInsertLayerDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
bool bDeletable, const OUString& rStr)
: GenericDialogController(pWindow, "modules/sdraw/ui/insertlayer.ui", "InsertLayerDialog")
, mrOutAttrs(rInAttrs)
, m_xEdtName(m_xBuilder->weld_entry("name"))
, m_xEdtTitle(m_xBuilder->weld_entry("title"))
, m_xEdtDesc(m_xBuilder->weld_text_view("textview"))
......@@ -36,13 +35,13 @@ SdInsertLayerDlg::SdInsertLayerDlg(weld::Window* pWindow, const SfxItemSet& rInA
{
m_xDialog->set_title(rStr);
m_xEdtName->set_text( static_cast<const SfxStringItem&>( mrOutAttrs.Get( ATTR_LAYER_NAME ) ).GetValue() );
m_xEdtTitle->set_text( static_cast<const SfxStringItem&>( mrOutAttrs.Get( ATTR_LAYER_TITLE ) ).GetValue() );
m_xEdtDesc->set_text( static_cast<const SfxStringItem&>( mrOutAttrs.Get( ATTR_LAYER_DESC ) ).GetValue() );
m_xEdtName->set_text( static_cast<const SfxStringItem&>( rInAttrs.Get( ATTR_LAYER_NAME ) ).GetValue() );
m_xEdtTitle->set_text( static_cast<const SfxStringItem&>( rInAttrs.Get( ATTR_LAYER_TITLE ) ).GetValue() );
m_xEdtDesc->set_text( static_cast<const SfxStringItem&>( rInAttrs.Get( ATTR_LAYER_DESC ) ).GetValue() );
m_xEdtDesc->set_size_request(-1, m_xEdtDesc->get_height_rows(4));
m_xCbxVisible->set_active( static_cast<const SfxBoolItem&>( mrOutAttrs.Get( ATTR_LAYER_VISIBLE ) ).GetValue() );
m_xCbxPrintable->set_active( static_cast<const SfxBoolItem&>( mrOutAttrs.Get( ATTR_LAYER_PRINTABLE ) ).GetValue() );
m_xCbxLocked->set_active( static_cast<const SfxBoolItem&>( mrOutAttrs.Get( ATTR_LAYER_LOCKED ) ).GetValue() );
m_xCbxVisible->set_active( static_cast<const SfxBoolItem&>( rInAttrs.Get( ATTR_LAYER_VISIBLE ) ).GetValue() );
m_xCbxPrintable->set_active( static_cast<const SfxBoolItem&>( rInAttrs.Get( ATTR_LAYER_PRINTABLE ) ).GetValue() );
m_xCbxLocked->set_active( static_cast<const SfxBoolItem&>( rInAttrs.Get( ATTR_LAYER_LOCKED ) ).GetValue() );
m_xNameFrame->set_sensitive(bDeletable);
}
......
......@@ -207,9 +207,6 @@ private:
/** holds a model guard during drag and drop between BeginMovingHdl and EndMovingHdl */
std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> maDragAndDropModelGuard;
vcl::Font maPageNumberFont;
vcl::Font maBulletFont;
SvxLRSpaceItem maLRSpaceItem;
Image maSlideImage;
};
......
......@@ -124,7 +124,6 @@ private:
bool bMovie;
bool bAllObjects;
SfxBindings* pBindings;
AnimationControllerItem* pControllerItem;
ScopeLock maPlayLock;
......
......@@ -39,7 +39,6 @@ class SdSnapLineDlg : public weld::GenericDialogController
private:
int nXValue;
int nYValue;
FieldUnit eUIUnit;
Fraction aUIScale;
std::unique_ptr<weld::Label> m_xFtX;
......
......@@ -48,7 +48,6 @@ private:
VclPtr<HeaderFooterTabPage> mpNotesHandoutsTabPage;
sal_uInt16 mnSlidesId;
sal_uInt16 mnNotesId;
VclPtr<PushButton> maPBApplyToAll;
VclPtr<PushButton> maPBApply;
......
......@@ -29,8 +29,6 @@ class SfxItemSet;
class SD_DLLPUBLIC SdInsertLayerDlg : public weld::GenericDialogController
{
private:
const SfxItemSet& mrOutAttrs;
std::unique_ptr<weld::Entry> m_xEdtName;
std::unique_ptr<weld::Entry> m_xEdtTitle;
std::unique_ptr<weld::TextView> m_xEdtDesc;
......
......@@ -152,17 +152,6 @@ SlideBackground::SlideBackground(
maCustomEntry = get<FixedText>("customlabel")->GetText();
SfxViewFrame* pCurrent = SfxViewFrame::Current();
if (pCurrent)
{
const SfxPoolItem* pItem = nullptr;
pCurrent->GetBindings().GetDispatcher()->QueryState( SID_ATTR_PAGE_SIZE, pItem );
if (pItem)
{
const SvxSizeItem* pSize = static_cast<const SvxSizeItem*>( pItem );
m_aPageSize = pSize->GetSize();
}
}
addListener();
Initialize();
}
......
......@@ -141,7 +141,6 @@ private:
SfxBindings* mpBindings;
MapUnit meUnit;
Size m_aPageSize;
DECL_LINK(FillBackgroundHdl, ListBox&, void);
DECL_LINK(FillStyleModifyHdl, ListBox&, void);
......
......@@ -122,7 +122,6 @@ private:
private:
VclPtr<sd::Window> mpWindow;
Size maPageObjectSize;
::tools::Rectangle maFocusIndicatorBoundingBox;
::tools::Rectangle maPageObjectBoundingBox;
::tools::Rectangle maPageNumberAreaBoundingBox;
......
......@@ -42,7 +42,6 @@ PageObjectLayouter::PageObjectLayouter (
sd::Window *pWindow,
const sal_Int32 nPageCount)
: mpWindow(pWindow),
maPageObjectSize(rPageObjectWindowSize.Width(), rPageObjectWindowSize.Height()),
maPageObjectBoundingBox(),
maPageNumberAreaBoundingBox(),
maPreviewBoundingBox(),
......@@ -56,19 +55,20 @@ PageObjectLayouter::PageObjectLayouter (
const int nMaximumBorderWidth (gnOuterBorderWidth);
const int nFocusIndicatorWidth (Theme_FocusIndicatorWidth);
Size aPageObjectSize(rPageObjectWindowSize.Width(), rPageObjectWindowSize.Height());
maPreviewBoundingBox = CalculatePreviewBoundingBox(
maPageObjectSize,
aPageObjectSize,
Size(rPageSize.Width(), rPageSize.Height()),
aPageNumberAreaSize.Width(),
nFocusIndicatorWidth);
maFocusIndicatorBoundingBox = ::tools::Rectangle(Point(0,0), maPageObjectSize);
maFocusIndicatorBoundingBox = ::tools::Rectangle(Point(0,0), rPageObjectWindowSize);
maPageObjectBoundingBox = ::tools::Rectangle(
Point(
nFocusIndicatorWidth,
nFocusIndicatorWidth),
Size(
maPageObjectSize.Width()-2*nFocusIndicatorWidth,
maPageObjectSize.Height()-2*nFocusIndicatorWidth));
aPageObjectSize.Width()-2*nFocusIndicatorWidth,
aPageObjectSize.Height()-2*nFocusIndicatorWidth));
maPageNumberAreaBoundingBox = ::tools::Rectangle(
Point(
......
......@@ -121,21 +121,6 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
mrOutlineViewShell.GetViewShellBase().GetEventMultiplexer()->AddEventListener(aLink);
LanguageType eLang = mrOutliner.GetDefaultLanguage();
maPageNumberFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE, eLang, GetDefaultFontFlags::NONE );
maPageNumberFont.SetFontHeight( 500 );
maBulletFont.SetColor( COL_AUTO );
maBulletFont.SetFontHeight( 1000 );
maBulletFont.SetCharSet(RTL_TEXTENCODING_MS_1252); // and replacing other values by standard
maBulletFont.SetFamilyName( "StarSymbol" );
maBulletFont.SetWeight(WEIGHT_NORMAL);
maBulletFont.SetUnderline(LINESTYLE_NONE);
maBulletFont.SetStrikeout(STRIKEOUT_NONE);
maBulletFont.SetItalic(ITALIC_NONE);
maBulletFont.SetOutline(false);
maBulletFont.SetShadow(false);
Reference<XFrame> xFrame (mrOutlineViewShell.GetViewShellBase().GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY);
maSlideImage = vcl::CommandInfoProvider::GetImageForCommand(".uno:ShowSlide", xFrame, vcl::ImageType::Size26);
......
......@@ -150,7 +150,6 @@ ConfigurationAccess::ConfigurationAccess( const Reference< uno::XComponentContex
maSettings.emplace_back( );
maSettings.back().maName = "LastUsedSettings";
LoadConfiguration();
maInitialSettings = maSettings;
};
ConfigurationAccess::~ConfigurationAccess()
......
......@@ -104,7 +104,6 @@ class ConfigurationAccess
std::map < PPPOptimizerTokenEnum, OUString > maStrings;
std::vector< OptimizerSettings > maSettings;
std::vector< OptimizerSettings > maInitialSettings;
css::uno::Reference< css::uno::XComponentContext > mxContext;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment