Kaydet (Commit) 4b01af28 authored tarafından Michael Stahl's avatar Michael Stahl

sw: remove include of sw/source/inc/uibase/dbui.hxx from dbmgr.hxx

Quite unnecessary, just remove the implementation details from the
header.

Change-Id: I5712ff32756bb1d31ff7701424b85a323438cced
üst 6bffbf10
......@@ -39,7 +39,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_globalfilter,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -38,7 +38,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_odfexport,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -40,7 +40,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_odfimport,\
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -30,7 +30,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlfieldexport,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -39,7 +39,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlimport,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -30,7 +30,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlw14export,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -37,7 +37,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_rtfexport,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -39,7 +39,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_rtfimport,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -36,7 +36,6 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8import,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
$$(INCLUDE) \
))
......
......@@ -34,7 +34,6 @@
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <unotools/tempfile.hxx>
#include <sfx2/objsh.hxx>
#include <dbui.hxx>
#include <memory>
#include <vector>
......@@ -257,9 +256,6 @@ friend class SwConnectionDisposedListener_Impl;
std::unique_ptr< utl::TempFile > &aTempFile,
const SwMergeDescriptor& rMergeDescriptor, const SfxFilter* pStoreToFilter);
SAL_DLLPRIVATE void UpdateProgressDlg(bool bMergeShell, VclPtr<CancelableDialog> pProgressDlg, bool createTempFile,
std::unique_ptr< INetURLObject > &aTempFileURL,
SwDocShell *pSourceDocSh, sal_Int32 nDocNo);
SAL_DLLPRIVATE bool CreateTargetDocShell(sal_Int32 nMaxDumpDocs, bool bMergeShell, vcl::Window *pSourceWindow,
SwWrtShell *pSourceShell, SwDocShell *pSourceDocSh,
......@@ -269,9 +265,6 @@ friend class SwConnectionDisposedListener_Impl;
SAL_DLLPRIVATE void LockUnlockDisp(bool bLock, SwDocShell *pSourceDocSh);
SAL_DLLPRIVATE void CreateProgessDlg(vcl::Window *&pSourceWindow, VclPtr<CancelableDialog> &pProgressDlg,
bool bMergeShell, SwWrtShell *pSourceShell, vcl::Window *pParent);
SAL_DLLPRIVATE void CreateWorkDoc(SfxObjectShellLock &xWorkDocSh, SwView *&pWorkView, SwDoc *&pWorkDoc, SwDBManager *&pOldDBManager,
SwDocShell *pSourceDocSh, sal_Int32 nMaxDumpDocs, sal_Int32 nDocNo);
......
......@@ -80,6 +80,7 @@
#include <IDocumentFieldsAccess.hxx>
#include <swwait.hxx>
#include <swunohelper.hxx>
#include <dbui.hxx>
#include <dbui.hrc>
#include <globals.hrc>
#include <statstr.hrc>
......@@ -892,6 +893,52 @@ static void lcl_SaveDoc( SfxObjectShell *xTargetDocShell,
delete pDstMed;
}
static void lcl_CreateProgessDlg(Link<Button*, void> const& rPrtCancelHdl,
vcl::Window *&pSourceWindow, VclPtr<CancelableDialog> &pProgressDlg,
bool bMergeShell, SwWrtShell *pSourceShell, vcl::Window *pParent)
{
pSourceWindow = &pSourceShell->GetView().GetEditWin();
if (!pParent)
pParent = pSourceWindow;
if (bMergeShell)
pProgressDlg = VclPtr<CreateMonitor>::Create(pParent, pParent != pSourceWindow);
else
{
pProgressDlg = VclPtr<PrintMonitor>::Create(pParent, pParent != pSourceWindow, PrintMonitor::MONITOR_TYPE_PRINT);
static_cast<PrintMonitor*>( pProgressDlg.get() )->SetText(pSourceShell->GetView().GetDocShell()->GetTitle(22));
}
pProgressDlg->SetCancelHdl(rPrtCancelHdl);
pProgressDlg->Show();
for (sal_uInt16 i = 0; i < 25; ++i)
Application::Reschedule();
}
static void lcl_UpdateProgressDlg(
bool bMergeShell, VclPtr<CancelableDialog> pProgressDlg,
bool createTempFile, std::unique_ptr<INetURLObject> & pTempFileURL,
SwDocShell *pSourceDocSh, sal_Int32 nDocNo)
{
if (bMergeShell)
static_cast<CreateMonitor*>( pProgressDlg.get() )->SetCurrentPosition( nDocNo );
else
{
PrintMonitor *pPrintMonDlg = static_cast<PrintMonitor*>(pProgressDlg.get());
pPrintMonDlg->m_pPrinter->SetText(createTempFile ? pTempFileURL->GetBase() : OUString(pSourceDocSh->GetTitle(22)));
OUString sStat(SW_RES(STR_STATSTR_LETTER));
sStat += " ";
sStat += OUString::number( nDocNo );
pPrintMonDlg->m_pPrintInfo->SetText( sStat );
}
pProgressDlg->Update();
// Computation time for the GUI
for (sal_uInt16 i = 0; i < 25; ++i)
Application::Reschedule();
}
bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
const SwMergeDescriptor& rMergeDescriptor,
vcl::Window* pParent)
......@@ -995,7 +1042,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
vcl::Window *pSourceWindow = nullptr;
VclPtr<CancelableDialog> pProgressDlg;
CreateProgessDlg(pSourceWindow, pProgressDlg, bMergeShell, pSourceShell, pParent);
if (!IsMergeSilent())
{
lcl_CreateProgessDlg(LINK(this, SwDBManager, PrtCancelHdl),
pSourceWindow, pProgressDlg, bMergeShell, pSourceShell, pParent);
}
if(bCreateSingleFile)
{
......@@ -1055,8 +1106,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
if( createTempFile )
aTempFileURL.reset( new INetURLObject(aTempFile->GetURL()));
UpdateProgressDlg(bMergeShell, pProgressDlg, createTempFile, aTempFileURL, pSourceDocSh, nDocNo);
if (!IsMergeSilent())
{
lcl_UpdateProgressDlg(bMergeShell, pProgressDlg,
createTempFile, aTempFileURL, pSourceDocSh, nDocNo);
}
// Create a copy of the source document and work with that one instead of the source.
// If we're not in the single file mode (which requires modifying the document for the merging),
......@@ -1330,32 +1384,6 @@ bool SwDBManager::CreateNewTemp(OUString &sPath, const OUString &sAddress,
return bErr;
}
void SwDBManager::UpdateProgressDlg(bool bMergeShell, VclPtr<CancelableDialog> pProgressDlg, bool createTempFile,
std::unique_ptr< INetURLObject > &aTempFileURL,
SwDocShell *pSourceDocSh, sal_Int32 nDocNo)
{
if (!IsMergeSilent())
{
if( bMergeShell )
static_cast<CreateMonitor*>( pProgressDlg.get() )->SetCurrentPosition( nDocNo );
else
{
PrintMonitor *pPrintMonDlg = static_cast<PrintMonitor*>( pProgressDlg.get() );
pPrintMonDlg->m_pPrinter->SetText( createTempFile ? aTempFileURL->GetBase() : OUString( pSourceDocSh->GetTitle( 22 )));
OUString sStat(SW_RES(STR_STATSTR_LETTER)); // Brief
sStat += " ";
sStat += OUString::number( nDocNo );
pPrintMonDlg->m_pPrintInfo->SetText( sStat );
}
pProgressDlg->Update();
// Computation time for the GUI
for( sal_uInt16 i = 0; i < 25; i++ )
Application::Reschedule();
}
}
bool SwDBManager::CreateTargetDocShell(sal_Int32 nMaxDumpDocs, bool bMergeShell, vcl::Window *pSourceWindow,
SwWrtShell *pSourceShell, SwDocShell *pSourceDocSh,
SfxObjectShellRef &xTargetDocShell, SwDoc *&pTargetDoc,
......@@ -1418,29 +1446,6 @@ void SwDBManager::LockUnlockDisp(bool bLock, SwDocShell *pSourceDocSh)
}
}
void SwDBManager::CreateProgessDlg(vcl::Window *&pSourceWindow, VclPtr<CancelableDialog> &pProgressDlg, bool bMergeShell,
SwWrtShell *pSourceShell, vcl::Window *pParent)
{
if (!IsMergeSilent())
{
pSourceWindow = &pSourceShell->GetView().GetEditWin();
if( ! pParent )
pParent = pSourceWindow;
if( bMergeShell )
pProgressDlg = VclPtr<CreateMonitor>::Create( pParent, pParent != pSourceWindow );
else
{
pProgressDlg = VclPtr<PrintMonitor>::Create( pParent, pParent != pSourceWindow, PrintMonitor::MONITOR_TYPE_PRINT );
static_cast<PrintMonitor*>( pProgressDlg.get() )->SetText(pSourceShell->GetView().GetDocShell()->GetTitle(22));
}
pProgressDlg->SetCancelHdl( LINK(this, SwDBManager, PrtCancelHdl) );
pProgressDlg->Show();
for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
}
}
void SwDBManager::CreateWorkDoc(SfxObjectShellLock &xWorkDocSh, SwView *&pWorkView, SwDoc *&pWorkDoc, SwDBManager *&pOldDBManager,
SwDocShell *pSourceDocSh, sal_Int32 nMaxDumpDocs, sal_Int32 nDocNo)
{
......
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