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

loplugin:unusedfields in sd part1

Change-Id: I8e25d68eecbc3a96d734d9c10b125aed5d01cbc5
Reviewed-on: https://gerrit.libreoffice.org/39059Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e3b61a4b
...@@ -73,12 +73,6 @@ public: ...@@ -73,12 +73,6 @@ public:
*/ */
void UnregisterWindow (vcl::Window* pWindow); 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 /** Set the document so that it is reformatted when one of the monitored
values changes. values changes.
@param pDocument @param pDocument
...@@ -104,9 +98,6 @@ private: ...@@ -104,9 +98,6 @@ private:
/// Options to monitor for changes. /// Options to monitor for changes.
SvtCTLOptions maCTLOptions; SvtCTLOptions maCTLOptions;
/// Keep the output devices of this view shell up to date.
ViewShell* mpViewShell;
/// The document rendered in the output devices. /// The document rendered in the output devices.
SdDrawDocument* mpDocument; SdDrawDocument* mpDocument;
......
...@@ -111,14 +111,12 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter) ...@@ -111,14 +111,12 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
mpListener(), mpListener(),
mnModelChangeLockCount(0), mnModelChangeLockCount(0),
mbIsForcedRearrangePending(false), mbIsForcedRearrangePending(false),
mbPreModelChangeDone(false),
mbPostModelChangePending(false), mbPostModelChangePending(false),
maSelectionBeforeSwitch(), maSelectionBeforeSwitch(),
mnCurrentPageBeforeSwitch(0), mnCurrentPageBeforeSwitch(0),
mpEditModeChangeMasterPage(nullptr), mpEditModeChangeMasterPage(nullptr),
maTotalWindowArea(), maTotalWindowArea(),
mnPaintEntranceCount(0), mnPaintEntranceCount(0)
mbIsContextMenuOpen(false)
{ {
sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); sd::Window *pWindow (mrSlideSorter.GetContentWindow().get());
OSL_ASSERT(pWindow); OSL_ASSERT(pWindow);
...@@ -380,7 +378,6 @@ bool SlideSorterController::Command ( ...@@ -380,7 +378,6 @@ bool SlideSorterController::Command (
} }
} }
mbIsContextMenuOpen = true;
if (pViewShell != nullptr) if (pViewShell != nullptr)
{ {
SfxDispatcher* pDispatcher = pViewShell->GetDispatcher(); SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
...@@ -393,7 +390,6 @@ bool SlideSorterController::Command ( ...@@ -393,7 +390,6 @@ bool SlideSorterController::Command (
pFunction->ResetMouseAnchor(); pFunction->ResetMouseAnchor();
} }
} }
mbIsContextMenuOpen = false;
if (pPage == nullptr) if (pPage == nullptr)
{ {
// Remember the position of the insertion indicator before // Remember the position of the insertion indicator before
...@@ -464,7 +460,6 @@ void SlideSorterController::PreModelChange() ...@@ -464,7 +460,6 @@ void SlideSorterController::PreModelChange()
// Prevent PreModelChange to execute more than once per model lock. // Prevent PreModelChange to execute more than once per model lock.
if (mbPostModelChangePending) if (mbPostModelChangePending)
return; return;
mbPreModelChangeDone = true;
if (mrSlideSorter.GetViewShell() != nullptr) if (mrSlideSorter.GetViewShell() != nullptr)
mrSlideSorter.GetViewShell()->Broadcast( mrSlideSorter.GetViewShell()->Broadcast(
......
...@@ -34,9 +34,7 @@ Properties::Properties() ...@@ -34,9 +34,7 @@ Properties::Properties()
maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()), maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()),
maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()), maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()), maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
mbIsUIReadOnly(false), mbIsUIReadOnly(false)
mbIsHighContrastModeActive(
Application::GetSettings().GetStyleSettings().GetHighContrastMode())
{ {
} }
...@@ -50,8 +48,6 @@ void Properties::HandleDataChangeEvent() ...@@ -50,8 +48,6 @@ void Properties::HandleDataChangeEvent()
maTextColor = Application::GetSettings().GetStyleSettings().GetActiveTextColor(); maTextColor = Application::GetSettings().GetStyleSettings().GetActiveTextColor();
maSelectionColor = Application::GetSettings().GetStyleSettings().GetHighlightColor(); maSelectionColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor(); maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor();
mbIsHighContrastModeActive
= Application::GetSettings().GetStyleSettings().GetHighContrastMode();
} }
void Properties::SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide) void Properties::SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide)
......
...@@ -110,7 +110,6 @@ public: ...@@ -110,7 +110,6 @@ public:
SdrPage* mpHitPage; SdrPage* mpHitPage;
sal_uInt32 mnEventCode; sal_uInt32 mnEventCode;
InsertionIndicatorHandler::Mode meDragMode; InsertionIndicatorHandler::Mode meDragMode;
bool mbMakeSelectionVisible;
bool mbIsLeaving; bool mbIsLeaving;
EventDescriptor ( EventDescriptor (
...@@ -322,7 +321,6 @@ SelectionFunction::SelectionFunction ( ...@@ -322,7 +321,6 @@ SelectionFunction::SelectionFunction (
rRequest), rRequest),
mrSlideSorter(rSlideSorter), mrSlideSorter(rSlideSorter),
mrController(mrSlideSorter.GetController()), mrController(mrSlideSorter.GetController()),
mbProcessingMouseButtonDown(false),
mnShiftKeySelectionAnchor(-1), mnShiftKeySelectionAnchor(-1),
mpModeHandler(new NormalModeHandler(rSlideSorter, *this)) mpModeHandler(new NormalModeHandler(rSlideSorter, *this))
{ {
...@@ -346,7 +344,6 @@ bool SelectionFunction::MouseButtonDown (const MouseEvent& rEvent) ...@@ -346,7 +344,6 @@ bool SelectionFunction::MouseButtonDown (const MouseEvent& rEvent)
// remember button state for creation of own MouseEvents // remember button state for creation of own MouseEvents
SetMouseButtonCode (rEvent.GetButtons()); SetMouseButtonCode (rEvent.GetButtons());
aMDPos = rEvent.GetPosPixel(); aMDPos = rEvent.GetPosPixel();
mbProcessingMouseButtonDown = true;
// mpWindow->CaptureMouse(); // mpWindow->CaptureMouse();
...@@ -367,8 +364,6 @@ bool SelectionFunction::MouseButtonUp (const MouseEvent& rEvent) ...@@ -367,8 +364,6 @@ bool SelectionFunction::MouseButtonUp (const MouseEvent& rEvent)
ProcessMouseEvent(BUTTON_UP, rEvent); ProcessMouseEvent(BUTTON_UP, rEvent);
mbProcessingMouseButtonDown = false;
return true; return true;
} }
...@@ -770,7 +765,6 @@ SelectionFunction::EventDescriptor::EventDescriptor ( ...@@ -770,7 +765,6 @@ SelectionFunction::EventDescriptor::EventDescriptor (
mpHitPage(), mpHitPage(),
mnEventCode(nEventType), mnEventCode(nEventType),
meDragMode(InsertionIndicatorHandler::MoveMode), meDragMode(InsertionIndicatorHandler::MoveMode),
mbMakeSelectionVisible(true),
mbIsLeaving(false) mbIsLeaving(false)
{ {
maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition); maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition);
...@@ -802,7 +796,6 @@ SelectionFunction::EventDescriptor::EventDescriptor ( ...@@ -802,7 +796,6 @@ SelectionFunction::EventDescriptor::EventDescriptor (
mpHitPage(), mpHitPage(),
mnEventCode(nEventType), mnEventCode(nEventType),
meDragMode(InsertionIndicatorHandler::GetModeFromDndAction(nDragAction)), meDragMode(InsertionIndicatorHandler::GetModeFromDndAction(nDragAction)),
mbMakeSelectionVisible(true),
mbIsLeaving(false) mbIsLeaving(false)
{ {
maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition); maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition);
...@@ -1075,12 +1068,10 @@ bool NormalModeHandler::ProcessButtonDownEvent ( ...@@ -1075,12 +1068,10 @@ bool NormalModeHandler::ProcessButtonDownEvent (
// selection is set to this single page. Otherwise the // selection is set to this single page. Otherwise the
// selection is not modified. // selection is not modified.
SetCurrentPage(rDescriptor.mpHitDescriptor); SetCurrentPage(rDescriptor.mpHitDescriptor);
rDescriptor.mbMakeSelectionVisible = false;
break; break;
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE: case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
// Do not change the selection. Just adjust the insertion indicator. // Do not change the selection. Just adjust the insertion indicator.
rDescriptor.mbMakeSelectionVisible = false;
break; break;
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE: case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE:
...@@ -1335,7 +1326,6 @@ bool MultiSelectionModeHandler::ProcessMotionEvent ( ...@@ -1335,7 +1326,6 @@ bool MultiSelectionModeHandler::ProcessMotionEvent (
{ {
SetSelectionModeFromModifier(rDescriptor.mnEventCode); SetSelectionModeFromModifier(rDescriptor.mnEventCode);
UpdatePosition(rDescriptor.maMousePosition, true); UpdatePosition(rDescriptor.maMousePosition, true);
rDescriptor.mbMakeSelectionVisible = false;
return true; return true;
} }
else else
......
...@@ -241,7 +241,6 @@ private: ...@@ -241,7 +241,6 @@ private:
int mnModelChangeLockCount; int mnModelChangeLockCount;
bool mbIsForcedRearrangePending; bool mbIsForcedRearrangePending;
bool mbPreModelChangeDone;
bool mbPostModelChangePending; bool mbPostModelChangePending;
/** This array stores the indices of the selected page descriptors at /** This array stores the indices of the selected page descriptors at
...@@ -268,10 +267,6 @@ private: ...@@ -268,10 +267,6 @@ private:
*/ */
sal_Int32 mnPaintEntranceCount; sal_Int32 mnPaintEntranceCount;
/** Remember whether the context menu is open.
*/
bool mbIsContextMenuOpen;
/** Prepare for several model changes, i.e. prevent time-consuming and /** Prepare for several model changes, i.e. prevent time-consuming and
non-critical operations like repaints until UnlockModelChange() is non-critical operations like repaints until UnlockModelChange() is
called. Critical operations like releasing references to pages that called. Critical operations like releasing references to pages that
......
...@@ -117,7 +117,6 @@ private: ...@@ -117,7 +117,6 @@ private:
Color maSelectionColor; Color maSelectionColor;
Color maHighlightColor; Color maHighlightColor;
bool mbIsUIReadOnly; bool mbIsUIReadOnly;
bool mbIsHighContrastModeActive;
}; };
} } } // end of namespace ::sd::slidesorter::controller } } } // end of namespace ::sd::slidesorter::controller
......
...@@ -108,14 +108,6 @@ protected: ...@@ -108,14 +108,6 @@ protected:
virtual ~SelectionFunction() override; virtual ~SelectionFunction() override;
private: 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 /** Remember the slide where the shift key was pressed and started a
multiselection via keyboard. multiselection via keyboard.
*/ */
......
...@@ -55,8 +55,6 @@ public: ...@@ -55,8 +55,6 @@ public:
private: private:
State meCurrentVisualState; State meCurrentVisualState;
State meOldVisualState;
Point maLocationOffset; Point maLocationOffset;
}; };
......
...@@ -134,7 +134,6 @@ private: ...@@ -134,7 +134,6 @@ private:
sal_Int32 mnBorderOffset2; sal_Int32 mnBorderOffset2;
}; };
ColorData maBackgroundColor; ColorData maBackgroundColor;
ColorData maPageBackgroundColor;
::std::vector<GradientDescriptor> maGradients; ::std::vector<GradientDescriptor> maGradients;
::std::vector<BitmapEx> maIcons; ::std::vector<BitmapEx> maIcons;
::std::vector<ColorData> maColor; ::std::vector<ColorData> maColor;
......
...@@ -26,7 +26,6 @@ namespace sd { namespace slidesorter { namespace model { ...@@ -26,7 +26,6 @@ namespace sd { namespace slidesorter { namespace model {
VisualState::VisualState (const sal_Int32 nPageId) VisualState::VisualState (const sal_Int32 nPageId)
: mnPageId(nPageId), : mnPageId(nPageId),
meCurrentVisualState(VS_None), meCurrentVisualState(VS_None),
meOldVisualState(VS_None),
maLocationOffset(0,0) maLocationOffset(0,0)
{ {
} }
...@@ -37,7 +36,6 @@ VisualState::~VisualState() ...@@ -37,7 +36,6 @@ VisualState::~VisualState()
void VisualState::SetVisualState (const State eState) void VisualState::SetVisualState (const State eState)
{ {
meOldVisualState = meCurrentVisualState;
meCurrentVisualState = eState; meCurrentVisualState = eState;
} }
......
...@@ -62,7 +62,6 @@ ColorData HGBAdapt ( ...@@ -62,7 +62,6 @@ ColorData HGBAdapt (
Theme::Theme (const std::shared_ptr<controller::Properties>& rpProperties) Theme::Theme (const std::shared_ptr<controller::Properties>& rpProperties)
: maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()), : maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()),
maPageBackgroundColor(COL_WHITE),
maGradients(), maGradients(),
maIcons(), maIcons(),
maColor() maColor()
...@@ -83,7 +82,6 @@ void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties) ...@@ -83,7 +82,6 @@ void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties)
{ {
// Set up colors. // Set up colors.
maBackgroundColor = rpProperties->GetBackgroundColor().GetColor(); maBackgroundColor = rpProperties->GetBackgroundColor().GetColor();
maPageBackgroundColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
maColor[Color_Background] = maBackgroundColor; maColor[Color_Background] = maBackgroundColor;
......
...@@ -32,8 +32,7 @@ ...@@ -32,8 +32,7 @@
namespace sd { namespace sd {
WindowUpdater::WindowUpdater() WindowUpdater::WindowUpdater()
: mpViewShell (nullptr), : mpDocument (nullptr)
mpDocument (nullptr)
{ {
maCTLOptions.AddListener(this); maCTLOptions.AddListener(this);
} }
...@@ -70,11 +69,6 @@ void WindowUpdater::UnregisterWindow (vcl::Window* pWindow) ...@@ -70,11 +69,6 @@ void WindowUpdater::UnregisterWindow (vcl::Window* pWindow)
} }
} }
void WindowUpdater::SetViewShell (ViewShell& rViewShell)
{
mpViewShell = &rViewShell;
}
void WindowUpdater::SetDocument (SdDrawDocument* pDocument) void WindowUpdater::SetDocument (SdDrawDocument* pDocument)
{ {
mpDocument = pDocument; mpDocument = pDocument;
......
...@@ -232,7 +232,6 @@ void ViewShell::construct() ...@@ -232,7 +232,6 @@ void ViewShell::construct()
GetDoc()->StartOnlineSpelling(false); GetDoc()->StartOnlineSpelling(false);
mpWindowUpdater->SetViewShell (*this);
mpWindowUpdater->SetDocument (GetDoc()); mpWindowUpdater->SetDocument (GetDoc());
// Re-initialize the spell dialog. // Re-initialize the spell dialog.
......
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