Kaydet (Commit) 57f33bfd authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Rename BorderColorStatus to ColorStatus

Next commit will use this for all color status updates,
not just for borders.

Change-Id: Ibd95d755a33bfc079fcbffabfd8896b6b777609f
Reviewed-on: https://gerrit.libreoffice.org/63498
Tested-by: Jenkins
Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst f162066d
...@@ -42,7 +42,7 @@ private: ...@@ -42,7 +42,7 @@ private:
sal_uInt16 m_nSlotId; sal_uInt16 m_nSlotId;
bool m_bShowNoneButton; bool m_bShowNoneButton;
std::shared_ptr<PaletteManager> m_xPaletteManager; std::shared_ptr<PaletteManager> m_xPaletteManager;
BorderColorStatus m_aBorderColorStatus; ColorStatus m_aColorStatus;
DECL_LINK(MenuActivateHdl, MenuButton *, void); DECL_LINK(MenuActivateHdl, MenuButton *, void);
void Selected(const NamedColor& rNamedColor); void Selected(const NamedColor& rNamedColor);
...@@ -104,7 +104,7 @@ private: ...@@ -104,7 +104,7 @@ private:
sal_uInt16 m_nSlotId; sal_uInt16 m_nSlotId;
bool m_bShowNoneButton; bool m_bShowNoneButton;
std::shared_ptr<PaletteManager> m_xPaletteManager; std::shared_ptr<PaletteManager> m_xPaletteManager;
BorderColorStatus m_aBorderColorStatus; ColorStatus m_aColorStatus;
void Selected(const NamedColor& rNamedColor); void Selected(const NamedColor& rNamedColor);
void createColorWindow(); void createColorWindow();
......
...@@ -32,14 +32,14 @@ ...@@ -32,14 +32,14 @@
#include <functional> #include <functional>
class SVX_DLLPUBLIC BorderColorStatus class SVX_DLLPUBLIC ColorStatus
{ {
Color maColor; Color maColor;
Color maTLBRColor; Color maTLBRColor;
Color maBLTRColor; Color maBLTRColor;
public: public:
BorderColorStatus(); ColorStatus();
~BorderColorStatus(); ~ColorStatus();
bool statusChanged( const css::frame::FeatureStateEvent& rEvent ); bool statusChanged( const css::frame::FeatureStateEvent& rEvent );
Color GetColor(); Color GetColor();
}; };
...@@ -66,7 +66,7 @@ private: ...@@ -66,7 +66,7 @@ private:
VclPtr<vcl::Window> mxParentWindow; VclPtr<vcl::Window> mxParentWindow;
std::shared_ptr<PaletteManager> mxPaletteManager; std::shared_ptr<PaletteManager> mxPaletteManager;
BorderColorStatus& mrBorderColorStatus; ColorStatus& mrColorStatus;
ColorSelectFunction const maColorSelectFunction; ColorSelectFunction const maColorSelectFunction;
bool const mbReuseParentForPicker; bool const mbReuseParentForPicker;
...@@ -83,7 +83,7 @@ private: ...@@ -83,7 +83,7 @@ private:
public: public:
SvxColorWindow(const OUString& rCommand, SvxColorWindow(const OUString& rCommand,
std::shared_ptr<PaletteManager> const & rPaletteManager, std::shared_ptr<PaletteManager> const & rPaletteManager,
BorderColorStatus& rBorderColorStatus, ColorStatus& rColorStatus,
sal_uInt16 nSlotId, sal_uInt16 nSlotId,
const css::uno::Reference< css::frame::XFrame >& rFrame, const css::uno::Reference< css::frame::XFrame >& rFrame,
vcl::Window* pParentWindow, vcl::Window* pParentWindow,
...@@ -118,7 +118,7 @@ private: ...@@ -118,7 +118,7 @@ private:
weld::Window* const mpParentWindow; weld::Window* const mpParentWindow;
weld::MenuButton* mpMenuButton; weld::MenuButton* mpMenuButton;
std::shared_ptr<PaletteManager> mxPaletteManager; std::shared_ptr<PaletteManager> mxPaletteManager;
BorderColorStatus& mrBorderColorStatus; ColorStatus& mrColorStatus;
ColorSelectFunction const maColorSelectFunction; ColorSelectFunction const maColorSelectFunction;
std::unique_ptr<ColorValueSet> mxColorSet; std::unique_ptr<ColorValueSet> mxColorSet;
...@@ -144,7 +144,7 @@ private: ...@@ -144,7 +144,7 @@ private:
public: public:
ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager, ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager,
BorderColorStatus& rBorderColorStatus, ColorStatus& rColorStatus,
sal_uInt16 nSlotId, sal_uInt16 nSlotId,
const css::uno::Reference< css::frame::XFrame >& rFrame, const css::uno::Reference< css::frame::XFrame >& rFrame,
weld::Window* pParentWindow, weld::MenuButton* pMenuButton, weld::Window* pParentWindow, weld::MenuButton* pMenuButton,
......
...@@ -210,7 +210,7 @@ class SVX_DLLPUBLIC SvxColorToolBoxControl : public cppu::ImplInheritanceHelper< ...@@ -210,7 +210,7 @@ class SVX_DLLPUBLIC SvxColorToolBoxControl : public cppu::ImplInheritanceHelper<
{ {
std::unique_ptr<svx::ToolboxButtonColorUpdater> m_xBtnUpdater; std::unique_ptr<svx::ToolboxButtonColorUpdater> m_xBtnUpdater;
std::shared_ptr<PaletteManager> m_xPaletteManager; std::shared_ptr<PaletteManager> m_xPaletteManager;
BorderColorStatus m_aBorderColorStatus; ColorStatus m_aColorStatus;
bool m_bSplitButton; bool m_bSplitButton;
sal_uInt16 m_nSlotId; sal_uInt16 m_nSlotId;
ColorSelectFunction m_aColorSelectFunction; ColorSelectFunction m_aColorSelectFunction;
......
...@@ -227,7 +227,7 @@ IMPL_LINK(Condition, DropdownClick, ToolBox*, pToolBox, void) ...@@ -227,7 +227,7 @@ IMPL_LINK(Condition, DropdownClick, ToolBox*, pToolBox, void)
m_pColorFloat = VclPtr<SvxColorWindow>::Create( m_pColorFloat = VclPtr<SvxColorWindow>::Create(
OUString() /*m_aCommandURL*/, OUString() /*m_aCommandURL*/,
m_xPaletteManager, m_xPaletteManager,
m_aBorderColorStatus, m_aColorStatus,
nSlotId, nSlotId,
nullptr, nullptr,
pToolBox, pToolBox,
......
...@@ -88,7 +88,7 @@ namespace rptui ...@@ -88,7 +88,7 @@ namespace rptui
sal_uInt16 m_nFontColorId; sal_uInt16 m_nFontColorId;
sal_uInt16 m_nFontDialogId; sal_uInt16 m_nFontDialogId;
std::shared_ptr<PaletteManager> m_xPaletteManager; std::shared_ptr<PaletteManager> m_xPaletteManager;
BorderColorStatus m_aBorderColorStatus; ColorStatus m_aColorStatus;
ConditionColorWrapper m_aColorWrapper; ConditionColorWrapper m_aColorWrapper;
::rptui::OReportController& m_rController; ::rptui::OReportController& m_rController;
......
...@@ -1255,7 +1255,7 @@ void SvxFontNameBox_Impl::Select() ...@@ -1255,7 +1255,7 @@ void SvxFontNameBox_Impl::Select()
SvxColorWindow::SvxColorWindow(const OUString& rCommand, SvxColorWindow::SvxColorWindow(const OUString& rCommand,
std::shared_ptr<PaletteManager> const & rPaletteManager, std::shared_ptr<PaletteManager> const & rPaletteManager,
BorderColorStatus& rBorderColorStatus, ColorStatus& rColorStatus,
sal_uInt16 nSlotId, sal_uInt16 nSlotId,
const Reference< XFrame >& rFrame, const Reference< XFrame >& rFrame,
vcl::Window* pParentWindow, vcl::Window* pParentWindow,
...@@ -1267,7 +1267,7 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand, ...@@ -1267,7 +1267,7 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand,
maCommand( rCommand ), maCommand( rCommand ),
mxParentWindow(pParentWindow), mxParentWindow(pParentWindow),
mxPaletteManager( rPaletteManager ), mxPaletteManager( rPaletteManager ),
mrBorderColorStatus( rBorderColorStatus ), mrColorStatus( rColorStatus ),
maColorSelectFunction(aFunction), maColorSelectFunction(aFunction),
mbReuseParentForPicker(bReuseParentForPicker) mbReuseParentForPicker(bReuseParentForPicker)
{ {
...@@ -1367,7 +1367,7 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand, ...@@ -1367,7 +1367,7 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand,
} }
ColorWindow::ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager, ColorWindow::ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager,
BorderColorStatus& rBorderColorStatus, ColorStatus& rColorStatus,
sal_uInt16 nSlotId, sal_uInt16 nSlotId,
const Reference< XFrame >& rFrame, const Reference< XFrame >& rFrame,
weld::Window* pParentWindow, weld::Window* pParentWindow,
...@@ -1381,7 +1381,7 @@ ColorWindow::ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager ...@@ -1381,7 +1381,7 @@ ColorWindow::ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager
, mpParentWindow(pParentWindow) , mpParentWindow(pParentWindow)
, mpMenuButton(pMenuButton) , mpMenuButton(pMenuButton)
, mxPaletteManager(rPaletteManager) , mxPaletteManager(rPaletteManager)
, mrBorderColorStatus(rBorderColorStatus) , mrColorStatus(rColorStatus)
, maColorSelectFunction(aFunction) , maColorSelectFunction(aFunction)
, mxColorSet(new ColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin"))) , mxColorSet(new ColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin")))
, mxRecentColorSet(new ColorValueSet(nullptr)) , mxRecentColorSet(new ColorValueSet(nullptr))
...@@ -1774,9 +1774,9 @@ void SvxColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent ...@@ -1774,9 +1774,9 @@ void SvxColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent
{ {
Color aColor(COL_TRANSPARENT); Color aColor(COL_TRANSPARENT);
if (mrBorderColorStatus.statusChanged(rEvent)) if (mrColorStatus.statusChanged(rEvent))
{ {
aColor = mrBorderColorStatus.GetColor(); aColor = mrColorStatus.GetColor();
} }
else if (rEvent.IsEnabled) else if (rEvent.IsEnabled)
{ {
...@@ -1803,9 +1803,9 @@ void ColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent ) ...@@ -1803,9 +1803,9 @@ void ColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent )
{ {
Color aColor(COL_TRANSPARENT); Color aColor(COL_TRANSPARENT);
if (mrBorderColorStatus.statusChanged(rEvent)) if (mrColorStatus.statusChanged(rEvent))
{ {
aColor = mrBorderColorStatus.GetColor(); aColor = mrColorStatus.GetColor();
} }
else if (rEvent.IsEnabled) else if (rEvent.IsEnabled)
{ {
...@@ -1926,18 +1926,18 @@ void ColorWindow::SelectEntry(const Color& rColor) ...@@ -1926,18 +1926,18 @@ void ColorWindow::SelectEntry(const Color& rColor)
ColorWindow::SelectEntry(std::make_pair(rColor, sColorName)); ColorWindow::SelectEntry(std::make_pair(rColor, sColorName));
} }
BorderColorStatus::BorderColorStatus() : ColorStatus::ColorStatus() :
maColor( COL_TRANSPARENT ), maColor( COL_TRANSPARENT ),
maTLBRColor( COL_TRANSPARENT ), maTLBRColor( COL_TRANSPARENT ),
maBLTRColor( COL_TRANSPARENT ) maBLTRColor( COL_TRANSPARENT )
{ {
} }
BorderColorStatus::~BorderColorStatus() ColorStatus::~ColorStatus()
{ {
} }
bool BorderColorStatus::statusChanged( const css::frame::FeatureStateEvent& rEvent ) bool ColorStatus::statusChanged( const css::frame::FeatureStateEvent& rEvent )
{ {
Color aColor( COL_TRANSPARENT ); Color aColor( COL_TRANSPARENT );
...@@ -1975,7 +1975,7 @@ bool BorderColorStatus::statusChanged( const css::frame::FeatureStateEvent& rEve ...@@ -1975,7 +1975,7 @@ bool BorderColorStatus::statusChanged( const css::frame::FeatureStateEvent& rEve
return false; return false;
} }
Color BorderColorStatus::GetColor() Color ColorStatus::GetColor()
{ {
bool bHasColor = maColor != COL_TRANSPARENT; bool bHasColor = maColor != COL_TRANSPARENT;
bool bHasTLBRColor = maTLBRColor != COL_TRANSPARENT; bool bHasTLBRColor = maTLBRColor != COL_TRANSPARENT;
...@@ -3172,7 +3172,7 @@ VclPtr<vcl::Window> SvxColorToolBoxControl::createPopupWindow( vcl::Window* pPar ...@@ -3172,7 +3172,7 @@ VclPtr<vcl::Window> SvxColorToolBoxControl::createPopupWindow( vcl::Window* pPar
VclPtrInstance<SvxColorWindow> pColorWin( VclPtrInstance<SvxColorWindow> pColorWin(
m_aCommandURL, m_aCommandURL,
m_xPaletteManager, m_xPaletteManager,
m_aBorderColorStatus, m_aColorStatus,
m_nSlotId, m_nSlotId,
m_xFrame, m_xFrame,
pParent, pParent,
...@@ -3207,9 +3207,9 @@ void SvxColorToolBoxControl::statusChanged( const css::frame::FeatureStateEvent& ...@@ -3207,9 +3207,9 @@ void SvxColorToolBoxControl::statusChanged( const css::frame::FeatureStateEvent&
{ {
Color aColor( COL_TRANSPARENT ); Color aColor( COL_TRANSPARENT );
if ( m_aBorderColorStatus.statusChanged( rEvent ) ) if ( m_aColorStatus.statusChanged( rEvent ) )
{ {
aColor = m_aBorderColorStatus.GetColor(); aColor = m_aColorStatus.GetColor();
} }
else if ( rEvent.IsEnabled ) else if ( rEvent.IsEnabled )
{ {
...@@ -3710,7 +3710,7 @@ void SvxColorListBox::createColorWindow() ...@@ -3710,7 +3710,7 @@ void SvxColorListBox::createColorWindow()
m_xColorWindow = VclPtr<SvxColorWindow>::Create( m_xColorWindow = VclPtr<SvxColorWindow>::Create(
OUString() /*m_aCommandURL*/, OUString() /*m_aCommandURL*/,
m_xPaletteManager, m_xPaletteManager,
m_aBorderColorStatus, m_aColorStatus,
m_nSlotId, m_nSlotId,
xFrame, xFrame,
this, this,
...@@ -3810,7 +3810,7 @@ void ColorListBox::createColorWindow() ...@@ -3810,7 +3810,7 @@ void ColorListBox::createColorWindow()
m_xColorWindow.reset(new ColorWindow( m_xColorWindow.reset(new ColorWindow(
m_xPaletteManager, m_xPaletteManager,
m_aBorderColorStatus, m_aColorStatus,
m_nSlotId, m_nSlotId,
xFrame, xFrame,
m_pTopLevel, m_pTopLevel,
......
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