summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-21 14:11:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-22 08:42:49 +0200
commitd740173b9cc0d05206349826f55d2b3444204056 (patch)
tree7415fb9ee036b6aa09b0cbb8201123f767afc529 /sd
parente3b61a4bc8771fb7ef2b21ac7c82892592d94ede (diff)
loplugin:unusedfields in sd part1
Change-Id: I8e25d68eecbc3a96d734d9c10b125aed5d01cbc5 Reviewed-on: https://gerrit.libreoffice.org/39059 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/WindowUpdater.hxx9
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx7
-rw-r--r--sd/source/ui/slidesorter/controller/SlsProperties.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx10
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx5
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx1
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx8
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx2
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsTheme.hxx1
-rw-r--r--sd/source/ui/slidesorter/model/SlsVisualState.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx2
-rw-r--r--sd/source/ui/view/WindowUpdater.cxx8
-rw-r--r--sd/source/ui/view/viewshel.cxx1
13 files changed, 3 insertions, 59 deletions
diff --git a/sd/source/ui/inc/WindowUpdater.hxx b/sd/source/ui/inc/WindowUpdater.hxx
index ee5dcd0f55f8..33c947d8eb07 100644
--- a/sd/source/ui/inc/WindowUpdater.hxx
+++ b/sd/source/ui/inc/WindowUpdater.hxx
@@ -73,12 +73,6 @@ public:
*/
void UnregisterWindow (vcl::Window* pWindow);
- /** Set the view shell whose output devices shall be kept up to date.
- It is used to clear the master page cache so that a redraw affects
- the master page content as well.
- */
- void SetViewShell (ViewShell& rViewShell);
-
/** Set the document so that it is reformatted when one of the monitored
values changes.
@param pDocument
@@ -104,9 +98,6 @@ private:
/// Options to monitor for changes.
SvtCTLOptions maCTLOptions;
- /// Keep the output devices of this view shell up to date.
- ViewShell* mpViewShell;
-
/// The document rendered in the output devices.
SdDrawDocument* mpDocument;
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index bb08715be29b..c900cdf6e55d 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -111,14 +111,12 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
mpListener(),
mnModelChangeLockCount(0),
mbIsForcedRearrangePending(false),
- mbPreModelChangeDone(false),
mbPostModelChangePending(false),
maSelectionBeforeSwitch(),
mnCurrentPageBeforeSwitch(0),
mpEditModeChangeMasterPage(nullptr),
maTotalWindowArea(),
- mnPaintEntranceCount(0),
- mbIsContextMenuOpen(false)
+ mnPaintEntranceCount(0)
{
sd::Window *pWindow (mrSlideSorter.GetContentWindow().get());
OSL_ASSERT(pWindow);
@@ -380,7 +378,6 @@ bool SlideSorterController::Command (
}
}
- mbIsContextMenuOpen = true;
if (pViewShell != nullptr)
{
SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
@@ -393,7 +390,6 @@ bool SlideSorterController::Command (
pFunction->ResetMouseAnchor();
}
}
- mbIsContextMenuOpen = false;
if (pPage == nullptr)
{
// Remember the position of the insertion indicator before
@@ -464,7 +460,6 @@ void SlideSorterController::PreModelChange()
// Prevent PreModelChange to execute more than once per model lock.
if (mbPostModelChangePending)
return;
- mbPreModelChangeDone = true;
if (mrSlideSorter.GetViewShell() != nullptr)
mrSlideSorter.GetViewShell()->Broadcast(
diff --git a/sd/source/ui/slidesorter/controller/SlsProperties.cxx b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
index 284f50ac8547..94c3de902cb9 100644
--- a/sd/source/ui/slidesorter/controller/SlsProperties.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
@@ -34,9 +34,7 @@ Properties::Properties()
maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()),
maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
- mbIsUIReadOnly(false),
- mbIsHighContrastModeActive(
- Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ mbIsUIReadOnly(false)
{
}
@@ -50,8 +48,6 @@ void Properties::HandleDataChangeEvent()
maTextColor = Application::GetSettings().GetStyleSettings().GetActiveTextColor();
maSelectionColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor();
- mbIsHighContrastModeActive
- = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
}
void Properties::SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide)
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 67d9e069f6d3..ebfaef7526de 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -110,7 +110,6 @@ public:
SdrPage* mpHitPage;
sal_uInt32 mnEventCode;
InsertionIndicatorHandler::Mode meDragMode;
- bool mbMakeSelectionVisible;
bool mbIsLeaving;
EventDescriptor (
@@ -322,7 +321,6 @@ SelectionFunction::SelectionFunction (
rRequest),
mrSlideSorter(rSlideSorter),
mrController(mrSlideSorter.GetController()),
- mbProcessingMouseButtonDown(false),
mnShiftKeySelectionAnchor(-1),
mpModeHandler(new NormalModeHandler(rSlideSorter, *this))
{
@@ -346,7 +344,6 @@ bool SelectionFunction::MouseButtonDown (const MouseEvent& rEvent)
// remember button state for creation of own MouseEvents
SetMouseButtonCode (rEvent.GetButtons());
aMDPos = rEvent.GetPosPixel();
- mbProcessingMouseButtonDown = true;
// mpWindow->CaptureMouse();
@@ -367,8 +364,6 @@ bool SelectionFunction::MouseButtonUp (const MouseEvent& rEvent)
ProcessMouseEvent(BUTTON_UP, rEvent);
- mbProcessingMouseButtonDown = false;
-
return true;
}
@@ -770,7 +765,6 @@ SelectionFunction::EventDescriptor::EventDescriptor (
mpHitPage(),
mnEventCode(nEventType),
meDragMode(InsertionIndicatorHandler::MoveMode),
- mbMakeSelectionVisible(true),
mbIsLeaving(false)
{
maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition);
@@ -802,7 +796,6 @@ SelectionFunction::EventDescriptor::EventDescriptor (
mpHitPage(),
mnEventCode(nEventType),
meDragMode(InsertionIndicatorHandler::GetModeFromDndAction(nDragAction)),
- mbMakeSelectionVisible(true),
mbIsLeaving(false)
{
maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition);
@@ -1075,12 +1068,10 @@ bool NormalModeHandler::ProcessButtonDownEvent (
// selection is set to this single page. Otherwise the
// selection is not modified.
SetCurrentPage(rDescriptor.mpHitDescriptor);
- rDescriptor.mbMakeSelectionVisible = false;
break;
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
// Do not change the selection. Just adjust the insertion indicator.
- rDescriptor.mbMakeSelectionVisible = false;
break;
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE:
@@ -1335,7 +1326,6 @@ bool MultiSelectionModeHandler::ProcessMotionEvent (
{
SetSelectionModeFromModifier(rDescriptor.mnEventCode);
UpdatePosition(rDescriptor.maMousePosition, true);
- rDescriptor.mbMakeSelectionVisible = false;
return true;
}
else
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index f7674550f008..9a68255a09d1 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -241,7 +241,6 @@ private:
int mnModelChangeLockCount;
bool mbIsForcedRearrangePending;
- bool mbPreModelChangeDone;
bool mbPostModelChangePending;
/** This array stores the indices of the selected page descriptors at
@@ -268,10 +267,6 @@ private:
*/
sal_Int32 mnPaintEntranceCount;
- /** Remember whether the context menu is open.
- */
- bool mbIsContextMenuOpen;
-
/** Prepare for several model changes, i.e. prevent time-consuming and
non-critical operations like repaints until UnlockModelChange() is
called. Critical operations like releasing references to pages that
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
index 36721db11049..7f9668bd543b 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
@@ -117,7 +117,6 @@ private:
Color maSelectionColor;
Color maHighlightColor;
bool mbIsUIReadOnly;
- bool mbIsHighContrastModeActive;
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
index f0f19a791366..301a4cd3fed6 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
@@ -108,14 +108,6 @@ protected:
virtual ~SelectionFunction() override;
private:
- /** We use this flag to filter out the cases where MouseMotion() is called
- with a pressed mouse button but without a prior MouseButtonDown()
- call. This is an indication that the mouse button was pressed over
- another control, e.g. the view tab bar, and that a re-layout of the
- controls moved the slide sorter under the mouse.
- */
- bool mbProcessingMouseButtonDown;
-
/** Remember the slide where the shift key was pressed and started a
multiselection via keyboard.
*/
diff --git a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
index 3759aca64dbb..35e3b179f75d 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
@@ -55,8 +55,6 @@ public:
private:
State meCurrentVisualState;
- State meOldVisualState;
-
Point maLocationOffset;
};
diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
index 75d49df5d0df..46bb252761b5 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
@@ -134,7 +134,6 @@ private:
sal_Int32 mnBorderOffset2;
};
ColorData maBackgroundColor;
- ColorData maPageBackgroundColor;
::std::vector<GradientDescriptor> maGradients;
::std::vector<BitmapEx> maIcons;
::std::vector<ColorData> maColor;
diff --git a/sd/source/ui/slidesorter/model/SlsVisualState.cxx b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
index d4a89b4f55d0..ad62e9e2904f 100644
--- a/sd/source/ui/slidesorter/model/SlsVisualState.cxx
+++ b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
@@ -26,7 +26,6 @@ namespace sd { namespace slidesorter { namespace model {
VisualState::VisualState (const sal_Int32 nPageId)
: mnPageId(nPageId),
meCurrentVisualState(VS_None),
- meOldVisualState(VS_None),
maLocationOffset(0,0)
{
}
@@ -37,7 +36,6 @@ VisualState::~VisualState()
void VisualState::SetVisualState (const State eState)
{
- meOldVisualState = meCurrentVisualState;
meCurrentVisualState = eState;
}
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index c204140ab45f..715f28a40f75 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -62,7 +62,6 @@ ColorData HGBAdapt (
Theme::Theme (const std::shared_ptr<controller::Properties>& rpProperties)
: maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()),
- maPageBackgroundColor(COL_WHITE),
maGradients(),
maIcons(),
maColor()
@@ -83,7 +82,6 @@ void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties)
{
// Set up colors.
maBackgroundColor = rpProperties->GetBackgroundColor().GetColor();
- maPageBackgroundColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
maColor[Color_Background] = maBackgroundColor;
diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx
index 54ce0e292f6f..e355feb42ee6 100644
--- a/sd/source/ui/view/WindowUpdater.cxx
+++ b/sd/source/ui/view/WindowUpdater.cxx
@@ -32,8 +32,7 @@
namespace sd {
WindowUpdater::WindowUpdater()
- : mpViewShell (nullptr),
- mpDocument (nullptr)
+ : mpDocument (nullptr)
{
maCTLOptions.AddListener(this);
}
@@ -70,11 +69,6 @@ void WindowUpdater::UnregisterWindow (vcl::Window* pWindow)
}
}
-void WindowUpdater::SetViewShell (ViewShell& rViewShell)
-{
- mpViewShell = &rViewShell;
-}
-
void WindowUpdater::SetDocument (SdDrawDocument* pDocument)
{
mpDocument = pDocument;
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 75e61456b181..1939e5516059 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -232,7 +232,6 @@ void ViewShell::construct()
GetDoc()->StartOnlineSpelling(false);
- mpWindowUpdater->SetViewShell (*this);
mpWindowUpdater->SetDocument (GetDoc());
// Re-initialize the spell dialog.