[Libreoffice-commits] core.git: sw/CppunitTest_sw_globalfilter.mk sw/CppunitTest_sw_odfexport.mk sw/CppunitTest_sw_odfimport.mk sw/CppunitTest_sw_ooxmlfieldexport.mk sw/CppunitTest_sw_ooxmlimport.mk sw/CppunitTest_sw_ooxmlw14export.mk sw/CppunitTest_sw_rtfexport.mk sw/CppunitTest_sw_rtfimport.mk sw/CppunitTest_sw_ww8import.mk sw/inc sw/source

Michael Stahl mstahl at redhat.com
Wed Jan 6 07:56:03 PST 2016


 sw/CppunitTest_sw_globalfilter.mk     |    1 
 sw/CppunitTest_sw_odfexport.mk        |    1 
 sw/CppunitTest_sw_odfimport.mk        |    1 
 sw/CppunitTest_sw_ooxmlfieldexport.mk |    1 
 sw/CppunitTest_sw_ooxmlimport.mk      |    1 
 sw/CppunitTest_sw_ooxmlw14export.mk   |    1 
 sw/CppunitTest_sw_rtfexport.mk        |    1 
 sw/CppunitTest_sw_rtfimport.mk        |    1 
 sw/CppunitTest_sw_ww8import.mk        |    1 
 sw/inc/dbmgr.hxx                      |    7 --
 sw/source/uibase/dbui/dbmgr.cxx       |  109 +++++++++++++++++-----------------
 11 files changed, 57 insertions(+), 68 deletions(-)

New commits:
commit 4b01af28e6fee1ec3096ed713d1db832b3508420
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jan 6 16:45:49 2016 +0100

    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

diff --git a/sw/CppunitTest_sw_globalfilter.mk b/sw/CppunitTest_sw_globalfilter.mk
index a74cb66..6650266 100644
--- a/sw/CppunitTest_sw_globalfilter.mk
+++ b/sw/CppunitTest_sw_globalfilter.mk
@@ -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) \
 ))
 
diff --git a/sw/CppunitTest_sw_odfexport.mk b/sw/CppunitTest_sw_odfexport.mk
index aa5a40a..c6434ac 100644
--- a/sw/CppunitTest_sw_odfexport.mk
+++ b/sw/CppunitTest_sw_odfexport.mk
@@ -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) \
 ))
 
diff --git a/sw/CppunitTest_sw_odfimport.mk b/sw/CppunitTest_sw_odfimport.mk
index c5937d3..eaa3542 100644
--- a/sw/CppunitTest_sw_odfimport.mk
+++ b/sw/CppunitTest_sw_odfimport.mk
@@ -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) \
 ))
 
diff --git a/sw/CppunitTest_sw_ooxmlfieldexport.mk b/sw/CppunitTest_sw_ooxmlfieldexport.mk
index 086e53e..ae67c20 100644
--- a/sw/CppunitTest_sw_ooxmlfieldexport.mk
+++ b/sw/CppunitTest_sw_ooxmlfieldexport.mk
@@ -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) \
 ))
 
diff --git a/sw/CppunitTest_sw_ooxmlimport.mk b/sw/CppunitTest_sw_ooxmlimport.mk
index 1a275bf..4074255 100644
--- a/sw/CppunitTest_sw_ooxmlimport.mk
+++ b/sw/CppunitTest_sw_ooxmlimport.mk
@@ -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) \
 ))
 
diff --git a/sw/CppunitTest_sw_ooxmlw14export.mk b/sw/CppunitTest_sw_ooxmlw14export.mk
index d6bcd07..5958019 100644
--- a/sw/CppunitTest_sw_ooxmlw14export.mk
+++ b/sw/CppunitTest_sw_ooxmlw14export.mk
@@ -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) \
 ))
 
diff --git a/sw/CppunitTest_sw_rtfexport.mk b/sw/CppunitTest_sw_rtfexport.mk
index 0228ee0..b47c906 100644
--- a/sw/CppunitTest_sw_rtfexport.mk
+++ b/sw/CppunitTest_sw_rtfexport.mk
@@ -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) \
 ))
 
diff --git a/sw/CppunitTest_sw_rtfimport.mk b/sw/CppunitTest_sw_rtfimport.mk
index 9cfa5b4..3eafcea 100644
--- a/sw/CppunitTest_sw_rtfimport.mk
+++ b/sw/CppunitTest_sw_rtfimport.mk
@@ -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) \
 ))
 
diff --git a/sw/CppunitTest_sw_ww8import.mk b/sw/CppunitTest_sw_ww8import.mk
index 80cde28..ed28ae9 100644
--- a/sw/CppunitTest_sw_ww8import.mk
+++ b/sw/CppunitTest_sw_ww8import.mk
@@ -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) \
 ))
 
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index fb4ec0d..5218faf 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -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);
 
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index ab1544c..395b3d3 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -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)
 {


More information about the Libreoffice-commits mailing list