Kaydet (Commit) 33a15db2 authored tarafından Caolán McNamara's avatar Caolán McNamara

rename OneExampleFrame back to SwOneExampleFrame

Change-Id: I11fafbbba752cec1a477ddcab74b6a749637b2b3
Reviewed-on: https://gerrit.libreoffice.org/73265
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6036f100
...@@ -116,8 +116,8 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage(SwMailMergeWizard* pWizard, TabPage ...@@ -116,8 +116,8 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage(SwMailMergeWizard* pWizard, TabPage
uno::Reference< frame::XStorable > xStore( pView->GetDocShell()->GetModel(), uno::UNO_QUERY); uno::Reference< frame::XStorable > xStore( pView->GetDocShell()->GetModel(), uno::UNO_QUERY);
xStore->storeToURL( m_sExampleURL, aValues ); xStore->storeToURL( m_sExampleURL, aValues );
Link<OneExampleFrame&,void> aLink(LINK(this, SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)); Link<SwOneExampleFrame&,void> aLink(LINK(this, SwMailMergeLayoutPage, PreviewLoadedHdl_Impl));
m_xExampleFrame.reset(new OneExampleFrame(EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL)); m_xExampleFrame.reset(new SwOneExampleFrame(EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL));
m_xExampleContainerWIN.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame)); m_xExampleContainerWIN.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame));
Size aSize = m_xExampleFrame->GetDrawingArea()->get_ref_device().LogicToPixel( Size aSize = m_xExampleFrame->GetDrawingArea()->get_ref_device().LogicToPixel(
...@@ -605,7 +605,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig ...@@ -605,7 +605,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
OSL_ENSURE(nullptr == rShell.GetTableFormat(), "What to do with a table here?"); OSL_ENSURE(nullptr == rShell.GetTableFormat(), "What to do with a table here?");
} }
IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, OneExampleFrame&, void) IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, SwOneExampleFrame&, void)
{ {
m_xExampleContainerWIN->show(); m_xExampleContainerWIN->show();
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
class SwMailMergeWizard; class SwMailMergeWizard;
class SwFrameFormat; class SwFrameFormat;
class OneExampleFrame; class SwOneExampleFrame;
class SwWrtShell; class SwWrtShell;
class SwView; class SwView;
...@@ -57,10 +57,10 @@ class SwMailMergeLayoutPage : public svt::OWizardPage ...@@ -57,10 +57,10 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
std::unique_ptr<weld::Button> m_xUpPB; std::unique_ptr<weld::Button> m_xUpPB;
std::unique_ptr<weld::Button> m_xDownPB; std::unique_ptr<weld::Button> m_xDownPB;
std::unique_ptr<weld::ComboBox> m_xZoomLB; std::unique_ptr<weld::ComboBox> m_xZoomLB;
std::unique_ptr<OneExampleFrame> m_xExampleFrame; std::unique_ptr<SwOneExampleFrame> m_xExampleFrame;
std::unique_ptr<weld::CustomWeld> m_xExampleContainerWIN; std::unique_ptr<weld::CustomWeld> m_xExampleContainerWIN;
DECL_LINK(PreviewLoadedHdl_Impl, OneExampleFrame&, void); DECL_LINK(PreviewLoadedHdl_Impl, SwOneExampleFrame&, void);
DECL_LINK(ZoomHdl_Impl, weld::ComboBox&, void); DECL_LINK(ZoomHdl_Impl, weld::ComboBox&, void);
DECL_LINK(ChangeAddressHdl_Impl, weld::MetricSpinButton&, void); DECL_LINK(ChangeAddressHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(GreetingsHdl_Impl, weld::Button&, void); DECL_LINK(GreetingsHdl_Impl, weld::Button&, void);
......
...@@ -94,7 +94,7 @@ static void lcl_SetBOOLProp( ...@@ -94,7 +94,7 @@ static void lcl_SetBOOLProp(
} }
} }
IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, OneExampleFrame&, void) IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void)
{ {
try try
{ {
......
...@@ -445,8 +445,8 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, ShowPreviewHdl, weld::ToggleButton&, void) ...@@ -445,8 +445,8 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, ShowPreviewHdl, weld::ToggleButton&, void)
} }
else else
{ {
Link<OneExampleFrame&,void> aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl)); Link<SwOneExampleFrame&,void> aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl));
m_xExampleFrame.reset(new OneExampleFrame(EX_SHOW_ONLINE_LAYOUT, &aLink, &sTemplate)); m_xExampleFrame.reset(new SwOneExampleFrame(EX_SHOW_ONLINE_LAYOUT, &aLink, &sTemplate));
m_xExampleFrameWin.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame)); m_xExampleFrameWin.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame));
} }
m_xShowExampleCB->set_visible(m_xExampleFrame != nullptr); m_xShowExampleCB->set_visible(m_xExampleFrame != nullptr);
......
...@@ -213,8 +213,8 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame const * pViewFrame, ...@@ -213,8 +213,8 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame const * pViewFrame,
m_xCategoryBox->set_size_request(m_xCategoryBox->get_approximate_digit_width() * 52, m_xCategoryBox->set_size_request(m_xCategoryBox->get_approximate_digit_width() * 52,
m_xCategoryBox->get_height_rows(12)); m_xCategoryBox->get_height_rows(12));
Link<OneExampleFrame&,void> aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl)); Link<SwOneExampleFrame&,void> aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl));
m_xExampleFrame.reset(new OneExampleFrame(EX_SHOW_ONLINE_LAYOUT, &aLink)); m_xExampleFrame.reset(new SwOneExampleFrame(EX_SHOW_ONLINE_LAYOUT, &aLink));
m_xExampleFrameWin.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame)); m_xExampleFrameWin.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame));
Size aSize = m_xExampleFrame->GetDrawingArea()->get_ref_device().LogicToPixel( Size aSize = m_xExampleFrame->GetDrawingArea()->get_ref_device().LogicToPixel(
Size(82, 124), MapMode(MapUnit::MapAppFont)); Size(82, 124), MapMode(MapUnit::MapAppFont));
...@@ -898,7 +898,7 @@ void SwGlossaryDlg::ShowPreview() ...@@ -898,7 +898,7 @@ void SwGlossaryDlg::ShowPreview()
ShowAutoText(::GetCurrGlosGroup(), m_xShortNameEdit->get_text()); ShowAutoText(::GetCurrGlosGroup(), m_xShortNameEdit->get_text());
}; };
IMPL_LINK_NOARG(SwGlossaryDlg, PreviewLoadedHdl, OneExampleFrame&, void) IMPL_LINK_NOARG(SwGlossaryDlg, PreviewLoadedHdl, SwOneExampleFrame&, void)
{ {
ResumeShowAutoText(); ResumeShowAutoText();
} }
......
...@@ -41,7 +41,7 @@ class SwWrtShell; ...@@ -41,7 +41,7 @@ class SwWrtShell;
class SfxViewFrame; class SfxViewFrame;
class PopupMenu; class PopupMenu;
class Menu; class Menu;
class OneExampleFrame; class SwOneExampleFrame;
const short RET_EDIT = 100; const short RET_EDIT = 100;
...@@ -80,7 +80,7 @@ class SwGlossaryDlg : public SfxDialogController ...@@ -80,7 +80,7 @@ class SwGlossaryDlg : public SfxDialogController
std::unique_ptr<weld::MenuButton> m_xEditBtn; std::unique_ptr<weld::MenuButton> m_xEditBtn;
std::unique_ptr<weld::Button> m_xBibBtn; std::unique_ptr<weld::Button> m_xBibBtn;
std::unique_ptr<weld::Button> m_xPathBtn; std::unique_ptr<weld::Button> m_xPathBtn;
std::unique_ptr<OneExampleFrame> m_xExampleFrame; std::unique_ptr<SwOneExampleFrame> m_xExampleFrame;
std::unique_ptr<weld::CustomWeld> m_xExampleFrameWin; std::unique_ptr<weld::CustomWeld> m_xExampleFrameWin;
void EnableShortName(bool bOn = true); void EnableShortName(bool bOn = true);
...@@ -95,7 +95,7 @@ class SwGlossaryDlg : public SfxDialogController ...@@ -95,7 +95,7 @@ class SwGlossaryDlg : public SfxDialogController
DECL_LINK( InsertHdl, weld::Button&, void ); DECL_LINK( InsertHdl, weld::Button&, void );
DECL_LINK( PathHdl, weld::Button&, void ); DECL_LINK( PathHdl, weld::Button&, void );
DECL_LINK( CheckBoxHdl, weld::ToggleButton&, void ); DECL_LINK( CheckBoxHdl, weld::ToggleButton&, void );
DECL_LINK( PreviewLoadedHdl, OneExampleFrame&, void ); DECL_LINK( PreviewLoadedHdl, SwOneExampleFrame&, void );
DECL_LINK( KeyInputHdl, const KeyEvent&, bool ); DECL_LINK( KeyInputHdl, const KeyEvent&, bool );
DECL_LINK( TextFilterHdl, OUString&, bool ); DECL_LINK( TextFilterHdl, OUString&, bool );
......
...@@ -43,7 +43,7 @@ class SwTOXWidget; ...@@ -43,7 +43,7 @@ class SwTOXWidget;
class SwTOXEdit; class SwTOXEdit;
class SwTOXButton; class SwTOXButton;
class SwTOXEntryTabPage; class SwTOXEntryTabPage;
class OneExampleFrame; class SwOneExampleFrame;
class SwWrtShell; class SwWrtShell;
namespace com{namespace sun{namespace star{ namespace com{namespace sun{namespace star{
...@@ -83,14 +83,14 @@ class SwMultiTOXTabDialog : public SfxTabDialogController ...@@ -83,14 +83,14 @@ class SwMultiTOXTabDialog : public SfxTabDialogController
bool m_bExampleCreated; bool m_bExampleCreated;
bool const m_bGlobalFlag; bool const m_bGlobalFlag;
std::unique_ptr<OneExampleFrame> m_xExampleFrame; std::unique_ptr<SwOneExampleFrame> m_xExampleFrame;
std::unique_ptr<weld::CheckButton> m_xShowExampleCB; std::unique_ptr<weld::CheckButton> m_xShowExampleCB;
std::unique_ptr<weld::CustomWeld> m_xExampleFrameWin; std::unique_ptr<weld::CustomWeld> m_xExampleFrameWin;
virtual short Ok() override; virtual short Ok() override;
std::unique_ptr<SwTOXDescription> CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX); std::unique_ptr<SwTOXDescription> CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX);
DECL_LINK(CreateExample_Hdl, OneExampleFrame&, void); DECL_LINK(CreateExample_Hdl, SwOneExampleFrame&, void);
DECL_LINK(ShowPreviewHdl, weld::ToggleButton&, void); DECL_LINK(ShowPreviewHdl, weld::ToggleButton&, void);
public: public:
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
class SwView; class SwView;
class SW_DLLPUBLIC OneExampleFrame : public weld::CustomWidgetController class SW_DLLPUBLIC SwOneExampleFrame : public weld::CustomWidgetController
{ {
ScopedVclPtr<VirtualDevice> m_xVirDev; ScopedVclPtr<VirtualDevice> m_xVirDev;
css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Reference< css::frame::XModel > m_xModel;
...@@ -49,7 +49,7 @@ class SW_DLLPUBLIC OneExampleFrame : public weld::CustomWidgetController ...@@ -49,7 +49,7 @@ class SW_DLLPUBLIC OneExampleFrame : public weld::CustomWidgetController
css::uno::Reference< css::text::XTextCursor > m_xCursor; css::uno::Reference< css::text::XTextCursor > m_xCursor;
Idle m_aLoadedIdle; Idle m_aLoadedIdle;
Link<OneExampleFrame&,void> m_aInitializedLink; Link<SwOneExampleFrame&,void> m_aInitializedLink;
OUString m_sArgumentURL; OUString m_sArgumentURL;
...@@ -66,13 +66,13 @@ class SW_DLLPUBLIC OneExampleFrame : public weld::CustomWidgetController ...@@ -66,13 +66,13 @@ class SW_DLLPUBLIC OneExampleFrame : public weld::CustomWidgetController
SAL_DLLPRIVATE void DisposeControl(); SAL_DLLPRIVATE void DisposeControl();
public: public:
OneExampleFrame(sal_uInt32 nStyleFlags, SwOneExampleFrame(sal_uInt32 nStyleFlags,
const Link<OneExampleFrame&,void>* pInitalizedLink, const Link<SwOneExampleFrame&,void>* pInitalizedLink,
const OUString* pURL = nullptr); const OUString* pURL = nullptr);
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual bool ContextMenu(const CommandEvent& rCEvt) override; virtual bool ContextMenu(const CommandEvent& rCEvt) override;
virtual ~OneExampleFrame() override; virtual ~SwOneExampleFrame() override;
css::uno::Reference< css::frame::XModel > & GetModel() {return m_xModel;} css::uno::Reference< css::frame::XModel > & GetModel() {return m_xModel;}
css::uno::Reference< css::frame::XController > & GetController() {return m_xController;} css::uno::Reference< css::frame::XController > & GetController() {return m_xController;}
......
...@@ -96,10 +96,10 @@ static const sal_Int16 nZoomValues[] = ...@@ -96,10 +96,10 @@ static const sal_Int16 nZoomValues[] =
100 100
}; };
OneExampleFrame::OneExampleFrame(sal_uInt32 nFlags, SwOneExampleFrame::SwOneExampleFrame(sal_uInt32 nFlags,
const Link<OneExampleFrame&,void>* pInitializedLink, const Link<SwOneExampleFrame&,void>* pInitializedLink,
const OUString* pURL) const OUString* pURL)
: m_aLoadedIdle("sw uibase OneExampleFrame Loaded") : m_aLoadedIdle("sw uibase SwOneExampleFrame Loaded")
, m_pModuleView(SW_MOD()->GetView()) , m_pModuleView(SW_MOD()->GetView())
, m_nStyleFlags(nFlags) , m_nStyleFlags(nFlags)
, m_bIsInitialized(false) , m_bIsInitialized(false)
...@@ -111,11 +111,11 @@ OneExampleFrame::OneExampleFrame(sal_uInt32 nFlags, ...@@ -111,11 +111,11 @@ OneExampleFrame::OneExampleFrame(sal_uInt32 nFlags,
m_aInitializedLink = *pInitializedLink; m_aInitializedLink = *pInitializedLink;
// the controller is asynchronously set // the controller is asynchronously set
m_aLoadedIdle.SetInvokeHandler(LINK(this, OneExampleFrame, TimeoutHdl)); m_aLoadedIdle.SetInvokeHandler(LINK(this, SwOneExampleFrame, TimeoutHdl));
m_aLoadedIdle.SetPriority(TaskPriority::HIGH_IDLE); m_aLoadedIdle.SetPriority(TaskPriority::HIGH_IDLE);
} }
void OneExampleFrame::SetDrawingArea(weld::DrawingArea* pDrawingArea) void SwOneExampleFrame::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{ {
CustomWidgetController::SetDrawingArea(pDrawingArea); CustomWidgetController::SetDrawingArea(pDrawingArea);
m_xVirDev = VclPtr<VirtualDevice>::Create(); m_xVirDev = VclPtr<VirtualDevice>::Create();
...@@ -125,7 +125,7 @@ void OneExampleFrame::SetDrawingArea(weld::DrawingArea* pDrawingArea) ...@@ -125,7 +125,7 @@ void OneExampleFrame::SetDrawingArea(weld::DrawingArea* pDrawingArea)
CreateControl(); CreateControl();
} }
bool OneExampleFrame::ContextMenu(const CommandEvent& rCEvt) bool SwOneExampleFrame::ContextMenu(const CommandEvent& rCEvt)
{ {
switch (rCEvt.GetCommand()) switch (rCEvt.GetCommand())
{ {
...@@ -142,7 +142,7 @@ bool OneExampleFrame::ContextMenu(const CommandEvent& rCEvt) ...@@ -142,7 +142,7 @@ bool OneExampleFrame::ContextMenu(const CommandEvent& rCEvt)
return false; return false;
} }
void OneExampleFrame::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) void SwOneExampleFrame::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{ {
Size aSize(GetOutputSizePixel()); Size aSize(GetOutputSizePixel());
// m_xVirDev instead of rRenderContext just to avoid overlays in writer re-triggering // m_xVirDev instead of rRenderContext just to avoid overlays in writer re-triggering
...@@ -184,12 +184,12 @@ void OneExampleFrame::Paint(vcl::RenderContext& rRenderContext, const tools::Rec ...@@ -184,12 +184,12 @@ void OneExampleFrame::Paint(vcl::RenderContext& rRenderContext, const tools::Rec
rRenderContext.DrawOutDev(Point(), aSize, Point(), aSize, *m_xVirDev); rRenderContext.DrawOutDev(Point(), aSize, Point(), aSize, *m_xVirDev);
} }
OneExampleFrame::~OneExampleFrame() SwOneExampleFrame::~SwOneExampleFrame()
{ {
DisposeControl(); DisposeControl();
} }
void OneExampleFrame::CreateControl() void SwOneExampleFrame::CreateControl()
{ {
// create new doc // create new doc
OUString sTempURL(cFactory); OUString sTempURL(cFactory);
...@@ -211,7 +211,7 @@ void OneExampleFrame::CreateControl() ...@@ -211,7 +211,7 @@ void OneExampleFrame::CreateControl()
m_aLoadedIdle.Start(); m_aLoadedIdle.Start();
} }
void OneExampleFrame::DisposeControl() void SwOneExampleFrame::DisposeControl()
{ {
m_aLoadedIdle.Stop(); m_aLoadedIdle.Stop();
m_xCursor = nullptr; m_xCursor = nullptr;
...@@ -223,7 +223,7 @@ void OneExampleFrame::DisposeControl() ...@@ -223,7 +223,7 @@ void OneExampleFrame::DisposeControl()
m_xController = nullptr; m_xController = nullptr;
} }
IMPL_LINK( OneExampleFrame, TimeoutHdl, Timer*, pTimer, void ) IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void )
{ {
if (!m_xModel.is()) if (!m_xModel.is())
return; return;
...@@ -420,7 +420,7 @@ IMPL_LINK( OneExampleFrame, TimeoutHdl, Timer*, pTimer, void ) ...@@ -420,7 +420,7 @@ IMPL_LINK( OneExampleFrame, TimeoutHdl, Timer*, pTimer, void )
pTimer->Start(); pTimer->Start();
} }
void OneExampleFrame::ClearDocument() void SwOneExampleFrame::ClearDocument()
{ {
uno::Reference< lang::XUnoTunnel> xTunnel( m_xCursor, uno::UNO_QUERY); uno::Reference< lang::XUnoTunnel> xTunnel( m_xCursor, uno::UNO_QUERY);
if( xTunnel.is() ) if( xTunnel.is() )
...@@ -454,7 +454,7 @@ void OneExampleFrame::ClearDocument() ...@@ -454,7 +454,7 @@ void OneExampleFrame::ClearDocument()
} }
} }
bool OneExampleFrame::CreatePopup(const Point& rPt) bool SwOneExampleFrame::CreatePopup(const Point& rPt)
{ {
if (EX_SHOW_ONLINE_LAYOUT != m_nStyleFlags) if (EX_SHOW_ONLINE_LAYOUT != m_nStyleFlags)
return false; return false;
...@@ -484,7 +484,7 @@ bool OneExampleFrame::CreatePopup(const Point& rPt) ...@@ -484,7 +484,7 @@ bool OneExampleFrame::CreatePopup(const Point& rPt)
return true; return true;
} }
void OneExampleFrame::PopupHdl(const OString& rId) void SwOneExampleFrame::PopupHdl(const OString& rId)
{ {
OString sZoomValue; OString sZoomValue;
if (rId.startsWith("zoom", &sZoomValue)) if (rId.startsWith("zoom", &sZoomValue))
......
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