summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/fntctrl.cxx6
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx24
2 files changed, 8 insertions, 22 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 311cfdd10d7b..0168c02d7e0c 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -1571,7 +1571,7 @@ void FontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
else
{
if (pImpl->mbUseResText)
- pImpl->maText = GetText();
+ pImpl->maText = OUString();
else if (!pImpl->mbSelection && !pImpl->mbTextInited)
{
using namespace css::i18n::ScriptType;
@@ -1611,7 +1611,7 @@ void FontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
}
if (pImpl->maText.isEmpty())
- pImpl->maText = GetText();
+ pImpl->maText = OUString();
if (pImpl->maText.isEmpty())
{ // fdo#58427: still no text? let's try that one...
@@ -1620,7 +1620,7 @@ void FontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
bool bEmpty = CleanAndCheckEmpty(pImpl->maText);
if (bEmpty)
- pImpl->maText = GetText();
+ pImpl->maText = OUString();
if (pImpl->maText.getLength() > (TEXT_WIDTH - 1))
{
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 325ca4359d7d..84a704ba8a75 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3762,10 +3762,8 @@ ColorListBox::ColorListBox(weld::MenuButton* pControl, weld::Window* pTopLevel)
, m_pTopLevel(pTopLevel)
, m_aColorWrapper(this)
, m_aAutoDisplayColor(Application::GetSettings().GetStyleSettings().GetDialogColor())
- , m_nSlotId(0)
- , m_bShowNoneButton(false)
{
- m_aSelectedColor = GetAutoColor(m_nSlotId);
+ m_aSelectedColor = GetAutoColor(0);
LockWidthRequest();
ShowPreview(m_aSelectedColor);
}
@@ -3793,15 +3791,13 @@ void ColorListBox::createColorWindow()
OUString() /*m_aCommandURL*/,
m_xPaletteManager,
m_aBorderColorStatus,
- m_nSlotId,
+ 0, // slotID
xFrame,
m_pTopLevel,
m_xButton.get(),
m_aColorWrapper));
SetNoSelection();
- if (m_bShowNoneButton)
- m_xColorWindow->ShowNoneButton();
m_xButton->set_popover(m_xColorWindow->GetWidget());
m_xColorWindow->SelectEntry(m_aSelectedColor);
}
@@ -3865,20 +3861,10 @@ void ColorListBox::ShowPreview(const NamedColor &rColor)
ScopedVclPtrInstance<VirtualDevice> xDevice;
xDevice->SetOutputSize(aImageSize);
const tools::Rectangle aRect(Point(0, 0), aImageSize);
- if (m_bShowNoneButton && rColor.first == COL_NONE_COLOR)
- {
- const Color aW(COL_WHITE);
- const Color aG(0xef, 0xef, 0xef);
- xDevice->DrawCheckered(aRect.TopLeft(), aRect.GetSize(), 8, aW, aG);
- xDevice->SetFillColor();
- }
+ if (rColor.first == COL_AUTO)
+ xDevice->SetFillColor(m_aAutoDisplayColor);
else
- {
- if (rColor.first == COL_AUTO)
- xDevice->SetFillColor(m_aAutoDisplayColor);
- else
- xDevice->SetFillColor(rColor.first);
- }
+ xDevice->SetFillColor(rColor.first);
xDevice->SetLineColor(rStyleSettings.GetDisableColor());
xDevice->DrawRect(aRect);