Kaydet (Commit) 338e5626 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld ScAutoFormatDlg

Change-Id: I700034eefe9fb25ee331645283bd3611c88faf5b
Reviewed-on: https://gerrit.libreoffice.org/69052
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst dd552855
...@@ -189,9 +189,6 @@ ...@@ -189,9 +189,6 @@
<glade-widget-class title="Table Preview" name="swuilo-AutoFmtPreview" <glade-widget-class title="Table Preview" name="swuilo-AutoFmtPreview"
generic-name="Table Preview Window" parent="GtkDrawingArea" generic-name="Table Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Calc Table Preview" name="sclo-ScAutoFmtPreview"
generic-name="Calc Table Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Extension List" name="deploymentgui-ExtensionBox" <glade-widget-class title="Extension List" name="deploymentgui-ExtensionBox"
generic-name="Extensions List" parent="GtkDrawingArea" generic-name="Extensions List" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
......
...@@ -400,7 +400,7 @@ public: ...@@ -400,7 +400,7 @@ public:
virtual VclPtr<AbstractScTextImportOptionsDlg> CreateScTextImportOptionsDlg(weld::Window* pParent) = 0; virtual VclPtr<AbstractScTextImportOptionsDlg> CreateScTextImportOptionsDlg(weld::Window* pParent) = 0;
virtual VclPtr<AbstractScAutoFormatDlg> CreateScAutoFormatDlg(vcl::Window* pParent, virtual VclPtr<AbstractScAutoFormatDlg> CreateScAutoFormatDlg(weld::Window* pParent,
ScAutoFormat* pAutoFormat, ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData, const ScAutoFormatData* pSelFormatData,
ScViewData *pViewData) = 0; ScViewData *pViewData) = 0;
......
...@@ -32,9 +32,8 @@ class autoFormat(UITestCase): ...@@ -32,9 +32,8 @@ class autoFormat(UITestCase):
alignmentcb = xDialog.getChild("alignmentcb") alignmentcb = xDialog.getChild("alignmentcb")
autofitcb = xDialog.getChild("autofitcb") autofitcb = xDialog.getChild("autofitcb")
props = {"TEXT": "Financial"} entry = formatlb.getChild("7") #Financial
actionProps = mkPropertyValues(props) entry.executeAction("SELECT", tuple())
formatlb.executeAction("SELECT", actionProps)
numformatcb.executeAction("CLICK", tuple()) numformatcb.executeAction("CLICK", tuple())
bordercb.executeAction("CLICK", tuple()) bordercb.executeAction("CLICK", tuple())
fontcb.executeAction("CLICK", tuple()) fontcb.executeAction("CLICK", tuple())
...@@ -57,9 +56,8 @@ class autoFormat(UITestCase): ...@@ -57,9 +56,8 @@ class autoFormat(UITestCase):
alignmentcb = xDialog.getChild("alignmentcb") alignmentcb = xDialog.getChild("alignmentcb")
autofitcb = xDialog.getChild("autofitcb") autofitcb = xDialog.getChild("autofitcb")
props = {"TEXT": "Financial"} entry = formatlb.getChild("7") #Financial
actionProps = mkPropertyValues(props) entry.executeAction("SELECT", tuple())
formatlb.executeAction("SELECT", actionProps)
self.assertEqual(get_state_as_dict(numformatcb)["Selected"], "false") self.assertEqual(get_state_as_dict(numformatcb)["Selected"], "false")
self.assertEqual(get_state_as_dict(bordercb)["Selected"], "false") self.assertEqual(get_state_as_dict(bordercb)["Selected"], "false")
self.assertEqual(get_state_as_dict(fontcb)["Selected"], "false") self.assertEqual(get_state_as_dict(fontcb)["Selected"], "false")
......
...@@ -71,7 +71,11 @@ ...@@ -71,7 +71,11 @@
#include <conditio.hxx> #include <conditio.hxx>
IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl); IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl);
short AbstractScAutoFormatDlg_Impl::Execute()
{
return m_xDlg->run();
}
short AbstractScColRowLabelDlg_Impl::Execute() short AbstractScColRowLabelDlg_Impl::Execute()
{ {
...@@ -269,12 +273,12 @@ void AbstractScImportAsciiDlg_Impl::SaveParameters() ...@@ -269,12 +273,12 @@ void AbstractScImportAsciiDlg_Impl::SaveParameters()
sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const
{ {
return pDlg->GetIndex(); return m_xDlg->GetIndex();
} }
OUString AbstractScAutoFormatDlg_Impl::GetCurrFormatName() OUString AbstractScAutoFormatDlg_Impl::GetCurrFormatName()
{ {
return pDlg->GetCurrFormatName(); return m_xDlg->GetCurrFormatName();
} }
bool AbstractScColRowLabelDlg_Impl::IsCol() bool AbstractScColRowLabelDlg_Impl::IsCol()
...@@ -763,13 +767,12 @@ VclPtr<AbstractScTextImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScTex ...@@ -763,13 +767,12 @@ VclPtr<AbstractScTextImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScTex
return VclPtr<AbstractScTextImportOptionsDlg_Impl>::Create(std::make_unique<ScTextImportOptionsDlg>(pParent)); return VclPtr<AbstractScTextImportOptionsDlg_Impl>::Create(std::make_unique<ScTextImportOptionsDlg>(pParent));
} }
VclPtr<AbstractScAutoFormatDlg> ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg(vcl::Window* pParent, VclPtr<AbstractScAutoFormatDlg> ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg(weld::Window* pParent,
ScAutoFormat* pAutoFormat, ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData, const ScAutoFormatData* pSelFormatData,
ScViewData *pViewData) ScViewData *pViewData)
{ {
VclPtr<ScAutoFormatDlg> pDlg = VclPtr<ScAutoFormatDlg>::Create(pParent, pAutoFormat, pSelFormatData, pViewData); return VclPtr<AbstractScAutoFormatDlg_Impl>::Create(std::make_unique<ScAutoFormatDlg>(pParent, pAutoFormat, pSelFormatData, pViewData));
return VclPtr<AbstractScAutoFormatDlg_Impl>::Create(pDlg);
} }
VclPtr<AbstractScColRowLabelDlg> ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(weld::Window* pParent, VclPtr<AbstractScColRowLabelDlg> ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(weld::Window* pParent,
......
...@@ -105,7 +105,13 @@ class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg ...@@ -105,7 +105,13 @@ class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg
class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg
{ {
DECL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl, ScAutoFormatDlg) std::unique_ptr<ScAutoFormatDlg> m_xDlg;
public:
explicit AbstractScAutoFormatDlg_Impl(std::unique_ptr<ScAutoFormatDlg> p)
: m_xDlg(std::move(p))
{
}
virtual short Execute() override;
virtual sal_uInt16 GetIndex() const override; virtual sal_uInt16 GetIndex() const override;
virtual OUString GetCurrFormatName() override; virtual OUString GetCurrFormatName() override;
}; };
...@@ -586,7 +592,7 @@ public: ...@@ -586,7 +592,7 @@ public:
virtual VclPtr<AbstractScTextImportOptionsDlg> CreateScTextImportOptionsDlg(weld::Window* pParent) override; virtual VclPtr<AbstractScTextImportOptionsDlg> CreateScTextImportOptionsDlg(weld::Window* pParent) override;
virtual VclPtr<AbstractScAutoFormatDlg> CreateScAutoFormatDlg(vcl::Window* pParent, virtual VclPtr<AbstractScAutoFormatDlg> CreateScAutoFormatDlg(weld::Window* pParent,
ScAutoFormat* pAutoFormat, ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData, const ScAutoFormatData* pSelFormatData,
ScViewData *pViewData) override; ScViewData *pViewData) override;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <svx/framelinkarray.hxx> #include <svx/framelinkarray.hxx>
#include <scdllapi.h> #include <scdllapi.h>
#include <vcl/window.hxx> #include <vcl/customweld.hxx>
namespace com { namespace sun { namespace star { namespace i18n { class XBreakIterator; } } } } namespace com { namespace sun { namespace star { namespace i18n { class XBreakIterator; } } } }
...@@ -33,13 +33,13 @@ class SvNumberFormatter; ...@@ -33,13 +33,13 @@ class SvNumberFormatter;
class VirtualDevice; class VirtualDevice;
class ScViewData; class ScViewData;
class SC_DLLPUBLIC ScAutoFmtPreview : public vcl::Window class SC_DLLPUBLIC ScAutoFmtPreview : public weld::CustomWidgetController
{ {
public: public:
ScAutoFmtPreview(vcl::Window* pParent); ScAutoFmtPreview();
void DetectRTL(const ScViewData *pViewData); void DetectRTL(const ScViewData *pViewData);
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
virtual ~ScAutoFmtPreview() override; virtual ~ScAutoFmtPreview() override;
virtual void dispose() override;
void NotifyChange( ScAutoFormatData* pNewData ); void NotifyChange( ScAutoFormatData* pNewData );
...@@ -85,8 +85,8 @@ private: ...@@ -85,8 +85,8 @@ private:
SAL_DLLPRIVATE void DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow); SAL_DLLPRIVATE void DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow);
SAL_DLLPRIVATE void DrawBackground(vcl::RenderContext& rRenderContext); SAL_DLLPRIVATE void DrawBackground(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void MakeFonts(sal_uInt16 nIndex, vcl::Font& rFont, SAL_DLLPRIVATE void MakeFonts(vcl::RenderContext const& rRenderContext, sal_uInt16 nIndex,
vcl::Font& rCJKFont, vcl::Font& rCTLFont ); vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont);
}; };
#endif // INCLUDED_SC_SOURCE_UI_INC_AUTOFMT_HXX #endif // INCLUDED_SC_SOURCE_UI_INC_AUTOFMT_HXX
......
...@@ -18,35 +18,23 @@ ...@@ -18,35 +18,23 @@
*/ */
#ifndef INCLUDED_SC_SOURCE_UI_INC_SCUIAUTOFMT_HXX #ifndef INCLUDED_SC_SOURCE_UI_INC_SCUIAUTOFMT_HXX
#define INCLUDED_SC_SOURCE_UI_INC_SCUIAUTOFMT_HXX #define INCLUDED_SC_SOURCE_UI_INC_SCUIAUTOFMT_HXX
#include <vcl/customweld.hxx>
#include "autofmt.hxx" #include "autofmt.hxx"
class ScAutoFormatDlg : public ModalDialog class ScAutoFormatDlg : public weld::GenericDialogController
{ {
public: public:
ScAutoFormatDlg(vcl::Window* pParent, ScAutoFormatDlg(weld::Window* pParent,
ScAutoFormat* pAutoFormat, ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData, const ScAutoFormatData* pSelFormatData,
const ScViewData *pViewData); const ScViewData *pViewData);
virtual ~ScAutoFormatDlg() override; virtual ~ScAutoFormatDlg() override;
virtual void dispose() override;
sal_uInt16 GetIndex() const { return nIndex; } sal_uInt16 GetIndex() const { return nIndex; }
OUString GetCurrFormatName(); OUString GetCurrFormatName();
private: private:
VclPtr<ListBox> m_pLbFormat;
VclPtr<ScAutoFmtPreview> m_pWndPreview;
VclPtr<OKButton> m_pBtnOk;
VclPtr<CancelButton> m_pBtnCancel;
VclPtr<PushButton> m_pBtnAdd;
VclPtr<PushButton> m_pBtnRemove;
VclPtr<PushButton> m_pBtnRename;
VclPtr<CheckBox> m_pBtnNumFormat;
VclPtr<CheckBox> m_pBtnBorder;
VclPtr<CheckBox> m_pBtnFont;
VclPtr<CheckBox> m_pBtnPattern;
VclPtr<CheckBox> m_pBtnAlignment;
VclPtr<CheckBox> m_pBtnAdjust;
OUString const aStrTitle; OUString const aStrTitle;
OUString const aStrLabel; OUString const aStrLabel;
OUString const aStrClose; OUString const aStrClose;
...@@ -59,16 +47,31 @@ private: ...@@ -59,16 +47,31 @@ private:
bool bCoreDataChanged; bool bCoreDataChanged;
bool bFmtInserted; bool bFmtInserted;
ScAutoFmtPreview m_aWndPreview;
std::unique_ptr<weld::TreeView> m_xLbFormat;
std::unique_ptr<weld::Button> m_xBtnOk;
std::unique_ptr<weld::Button> m_xBtnCancel;
std::unique_ptr<weld::Button> m_xBtnAdd;
std::unique_ptr<weld::Button> m_xBtnRemove;
std::unique_ptr<weld::Button> m_xBtnRename;
std::unique_ptr<weld::CheckButton> m_xBtnNumFormat;
std::unique_ptr<weld::CheckButton> m_xBtnBorder;
std::unique_ptr<weld::CheckButton> m_xBtnFont;
std::unique_ptr<weld::CheckButton> m_xBtnPattern;
std::unique_ptr<weld::CheckButton> m_xBtnAlignment;
std::unique_ptr<weld::CheckButton> m_xBtnAdjust;
std::unique_ptr<weld::CustomWeld> m_xWndPreview;
void Init (); void Init ();
void UpdateChecks (); void UpdateChecks ();
DECL_LINK( CheckHdl, Button*, void ); DECL_LINK( CheckHdl, weld::ToggleButton&, void );
DECL_LINK( AddHdl, Button*, void ); DECL_LINK( AddHdl, weld::Button&, void );
DECL_LINK( RemoveHdl, Button*, void ); DECL_LINK( RemoveHdl, weld::Button&, void );
DECL_LINK( SelFmtHdl, ListBox&, void ); DECL_LINK( SelFmtHdl, weld::TreeView&, void );
DECL_LINK( CloseHdl, Button *, void ); DECL_LINK( CloseHdl, weld::Button&, void );
DECL_LINK( DblClkHdl, ListBox&, void ); DECL_LINK( DblClkHdl, weld::TreeView&, void );
DECL_LINK( RenameHdl, Button*, void ); DECL_LINK( RenameHdl, weld::Button&, void );
}; };
#endif #endif
......
...@@ -49,10 +49,8 @@ ...@@ -49,10 +49,8 @@
// ScAutoFmtPreview // ScAutoFmtPreview
ScAutoFmtPreview::ScAutoFmtPreview(vcl::Window* pParent) ScAutoFmtPreview::ScAutoFmtPreview()
: Window(pParent) : pCurData(nullptr)
, pCurData(nullptr)
, aVD(*this)
, bFitWidth(false) , bFitWidth(false)
, mbRTL(false) , mbRTL(false)
, aStrJan(ScResId(STR_JAN)) , aStrJan(ScResId(STR_JAN))
...@@ -67,11 +65,16 @@ ScAutoFmtPreview::ScAutoFmtPreview(vcl::Window* pParent) ...@@ -67,11 +65,16 @@ ScAutoFmtPreview::ScAutoFmtPreview(vcl::Window* pParent)
Init(); Init();
} }
VCL_BUILDER_FACTORY(ScAutoFmtPreview) void ScAutoFmtPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
aVD.disposeAndReset(VclPtr<VirtualDevice>::Create(pDrawingArea->get_ref_device()));
CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void ScAutoFmtPreview::Resize() void ScAutoFmtPreview::Resize()
{ {
aPrvSize = Size(GetSizePixel().Width() - 6, GetSizePixel().Height() - 30); Size aSize(GetOutputSizePixel());
aPrvSize = Size(aSize.Width() - 6, aSize.Height() - 30);
mnLabelColWidth = (aPrvSize.Width() - 4) / 4 - 12; mnLabelColWidth = (aPrvSize.Width() - 4) / 4 - 12;
mnDataColWidth1 = (aPrvSize.Width() - 4 - 2 * mnLabelColWidth) / 3; mnDataColWidth1 = (aPrvSize.Width() - 4 - 2 * mnLabelColWidth) / 3;
mnDataColWidth2 = (aPrvSize.Width() - 4 - 2 * mnLabelColWidth) / 4; mnDataColWidth2 = (aPrvSize.Width() - 4 - 2 * mnLabelColWidth) / 4;
...@@ -81,13 +84,6 @@ void ScAutoFmtPreview::Resize() ...@@ -81,13 +84,6 @@ void ScAutoFmtPreview::Resize()
ScAutoFmtPreview::~ScAutoFmtPreview() ScAutoFmtPreview::~ScAutoFmtPreview()
{ {
disposeOnce();
}
void ScAutoFmtPreview::dispose()
{
pNumFmt.reset();
vcl::Window::dispose();
} }
static void lcl_SetFontProperties( static void lcl_SetFontProperties(
...@@ -105,12 +101,12 @@ static void lcl_SetFontProperties( ...@@ -105,12 +101,12 @@ static void lcl_SetFontProperties(
rFont.SetItalic ( rPostureItem.GetValue() ); rFont.SetItalic ( rPostureItem.GetValue() );
} }
void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ) void ScAutoFmtPreview::MakeFonts(vcl::RenderContext const& rRenderContext, sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont)
{ {
if ( pCurData ) if ( pCurData )
{ {
rFont = rCJKFont = rCTLFont = GetFont(); rFont = rCJKFont = rCTLFont = rRenderContext.GetFont();
Size aFontSize( rFont.GetFontSize().Width(), 10 * GetDPIScaleFactor() ); Size aFontSize(rFont.GetFontSize().Width(), 10 * rRenderContext.GetDPIScaleFactor());
const SvxFontItem* pFontItem = pCurData->GetItem( nIndex, ATTR_FONT ); const SvxFontItem* pFontItem = pCurData->GetItem( nIndex, ATTR_FONT );
const SvxWeightItem* pWeightItem = pCurData->GetItem( nIndex, ATTR_FONT_WEIGHT ); const SvxWeightItem* pWeightItem = pCurData->GetItem( nIndex, ATTR_FONT_WEIGHT );
...@@ -134,7 +130,7 @@ void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font ...@@ -134,7 +130,7 @@ void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font
Color aColor( pColorItem->GetValue() ); Color aColor( pColorItem->GetValue() );
if( aColor == COL_TRANSPARENT ) if( aColor == COL_TRANSPARENT )
aColor = GetSettings().GetStyleSettings().GetWindowTextColor(); aColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor();
#define SETONALLFONTS( MethodName, Value ) \ #define SETONALLFONTS( MethodName, Value ) \
rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Value ); rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Value );
...@@ -263,7 +259,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo ...@@ -263,7 +259,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
vcl::Font aFont, aCJKFont, aCTLFont; vcl::Font aFont, aCJKFont, aCTLFont;
Size theMaxStrSize; Size theMaxStrSize;
MakeFonts( nFmtIndex, aFont, aCJKFont, aCTLFont ); MakeFonts(rRenderContext, nFmtIndex, aFont, aCJKFont, aCTLFont);
theMaxStrSize = Size(basegfx::fround(cellRange.getWidth()), basegfx::fround(cellRange.getHeight())); theMaxStrSize = Size(basegfx::fround(cellRange.getWidth()), basegfx::fround(cellRange.getHeight()));
theMaxStrSize.AdjustWidth( -(FRAME_OFFSET) ); theMaxStrSize.AdjustWidth( -(FRAME_OFFSET) );
...@@ -413,9 +409,7 @@ void ScAutoFmtPreview::PaintCells(vcl::RenderContext& rRenderContext) ...@@ -413,9 +409,7 @@ void ScAutoFmtPreview::PaintCells(vcl::RenderContext& rRenderContext)
void ScAutoFmtPreview::Init() void ScAutoFmtPreview::Init()
{ {
SetBorderStyle( WindowBorderStyle::MONO );
maArray.Initialize( 5, 5 ); maArray.Initialize( 5, 5 );
// maArray.SetUseDiagDoubleClipping( false );
mnLabelColWidth = 0; mnLabelColWidth = 0;
mnDataColWidth1 = 0; mnDataColWidth1 = 0;
mnDataColWidth2 = 0; mnDataColWidth2 = 0;
...@@ -491,14 +485,15 @@ void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData ) ...@@ -491,14 +485,15 @@ void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData )
CalcCellArray( bFitWidth ); CalcCellArray( bFitWidth );
CalcLineMap(); CalcLineMap();
Invalidate(tools::Rectangle(Point(0,0), GetSizePixel())); Invalidate();
} }
void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext) void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext)
{ {
rRenderContext.Push(PushFlags::ALL);
DrawModeFlags nOldDrawMode = aVD->GetDrawMode(); DrawModeFlags nOldDrawMode = aVD->GetDrawMode();
Size aWndSize(GetSizePixel()); Size aWndSize(GetOutputSizePixel());
vcl::Font aFont(aVD->GetFont()); vcl::Font aFont(aVD->GetFont());
Color aBackCol(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); Color aBackCol(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
tools::Rectangle aRect(Point(), aWndSize); tools::Rectangle aRect(Point(), aWndSize);
...@@ -521,6 +516,7 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext) ...@@ -521,6 +516,7 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext)
aPos.setX( -aPos.X() ); aPos.setX( -aPos.X() );
rRenderContext.DrawOutDev(aPos, aWndSize, Point(), aWndSize, *aVD); rRenderContext.DrawOutDev(aPos, aWndSize, Point(), aWndSize, *aVD);
aVD->SetDrawMode(nOldDrawMode); aVD->SetDrawMode(nOldDrawMode);
rRenderContext.Pop();
} }
void ScAutoFmtPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) void ScAutoFmtPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
......
...@@ -819,7 +819,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) ...@@ -819,7 +819,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_AUTOFORMAT: case SID_AUTOFORMAT:
{ {
vcl::Window* pDlgParent = pTabViewShell->GetDialogParent(); weld::Window* pDlgParent = pTabViewShell->GetFrameWeld();
SCCOL nStartCol; SCCOL nStartCol;
SCROW nStartRow; SCROW nStartRow;
SCTAB nStartTab; SCTAB nStartTab;
...@@ -877,7 +877,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) ...@@ -877,7 +877,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
} }
else else
{ {
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pDlgParent ? pDlgParent->GetFrameWeld() : nullptr, std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pDlgParent,
VclMessageType::Warning, VclButtonsType::Ok, VclMessageType::Warning, VclButtonsType::Ok,
ScResId(STR_INVALID_AFAREA))); ScResId(STR_INVALID_AFAREA)));
xErrorBox->run(); xErrorBox->run();
......
...@@ -470,7 +470,6 @@ custom_widgets = [ ...@@ -470,7 +470,6 @@ custom_widgets = [
'RubyEdit', 'RubyEdit',
'RubyPreview', 'RubyPreview',
'SameContentListBox', 'SameContentListBox',
'ScAutoFmtPreview',
'ScCondFormatList', 'ScCondFormatList',
'ScCsvTableBox', 'ScCsvTableBox',
'ScCursorRefEdit', 'ScCursorRefEdit',
......
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