Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
76c61ced
Kaydet (Commit)
76c61ced
authored
May 19, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
check for and handle missing base in mail merge (related: fdo#33266)
Change-Id: I3e362a873c28026cbecf005c07def1295aa920e0
üst
4ab498fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
2 deletions
+66
-2
restartdialog.hxx
include/svtools/restartdialog.hxx
+4
-1
restartdialog.cxx
svtools/source/dialogs/restartdialog.cxx
+3
-0
restartdialog.ui
svtools/uiconfig/ui/restartdialog.ui
+15
-0
apphdl.cxx
sw/source/uibase/app/apphdl.cxx
+44
-1
No files found.
include/svtools/restartdialog.hxx
Dosyayı görüntüle @
76c61ced
...
...
@@ -29,9 +29,12 @@ enum RestartReason {
RESTART_REASON_PDF_AS_STANDARD_JOB_FORMAT
,
// For the modified default print job format to take effect,
// %PRODUCTNAME must be restarted.
RESTART_REASON_BIBLIOGRAPHY_INSTALL
RESTART_REASON_BIBLIOGRAPHY_INSTALL
,
// "For the bibliography to work properly,
// %PRODUCTNAME must be restarted."
RESTART_REASON_MAILMERGE_INSTALL
// "For the mail merge to work properly,
// %PRODUCTNAME must be restarted."
};
// Must be called with the solar mutex locked:
...
...
svtools/source/dialogs/restartdialog.cxx
Dosyayı görüntüle @
76c61ced
...
...
@@ -40,6 +40,9 @@ public:
case
svtools
:
:
RESTART_REASON_BIBLIOGRAPHY_INSTALL
:
get
(
reason_
,
"reason_bibliography_install"
);
break
;
case
svtools
:
:
RESTART_REASON_MAILMERGE_INSTALL
:
get
(
reason_
,
"reason_mailmerge_install"
);
break
;
default
:
assert
(
false
);
// this cannot happen
}
...
...
svtools/uiconfig/ui/restartdialog.ui
Dosyayı görüntüle @
76c61ced
...
...
@@ -105,6 +105,21 @@
<property
name=
"position"
>
2
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"reason_mailmerge_install"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"no_show_all"
>
True
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
For the mail merge to work properly, %PRODUCTNAME must be restarted.
</property>
<property
name=
"wrap"
>
True
</property>
<property
name=
"max_width_chars"
>
50
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"label"
>
<property
name=
"visible"
>
True
</property>
...
...
sw/source/uibase/app/apphdl.cxx
Dosyayı görüntüle @
76c61ced
...
...
@@ -21,17 +21,19 @@
#include <hintids.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
#include <tools/link.hxx>
#include <svl/urihelper.hxx>
#include <unotools/pathoptions.hxx>
#include <svtools/accessibilityoptions.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/event.hxx>
#include <sfx2/objitem.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svl/srchitem.hxx>
#include <svtools/accessibilityoptions.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/restartdialog.hxx>
#include <svl/eitem.hxx>
#include <svl/whiter.hxx>
#include <svl/isethint.hxx>
...
...
@@ -92,7 +94,9 @@
#include <com/sun/star/beans/XPropertyContainer.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdb/TextConnectionSettings.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp>
#include <swabstdlg.hxx>
#include <vcl/status.hxx>
...
...
@@ -115,6 +119,24 @@ using namespace ::com::sun::star;
#include <shells.hrc>
namespace
{
static
bool
lcl_hasAllComponentsAvailable
()
{
try
{
return
css
::
sdb
::
TextConnectionSettings
::
create
(
comphelper
::
getProcessComponentContext
()).
is
();
}
catch
(
css
::
uno
::
Exception
&
e
)
{
SAL_INFO
(
"sw.core"
,
"assuming Base to be missing; caught "
<<
e
.
Message
);
return
false
;
}
}
}
SFX_IMPL_INTERFACE
(
SwModule
,
SfxModule
)
void
SwModule
::
InitInterface_Impl
()
...
...
@@ -278,6 +300,27 @@ SwMailMergeWizardExecutor::~SwMailMergeWizardExecutor()
void
SwMailMergeWizardExecutor
::
ExecuteMailMergeWizard
(
const
SfxItemSet
*
pArgs
)
{
if
(
!
lcl_hasAllComponentsAvailable
())
{
try
{
using
namespace
org
::
freedesktop
::
PackageKit
;
using
namespace
svtools
;
css
::
uno
::
Reference
<
XSyncDbusSessionHelper
>
xSyncDbusSessionHelper
(
SyncDbusSessionHelper
::
create
(
comphelper
::
getProcessComponentContext
()));
const
css
::
uno
::
Sequence
<
OUString
>
vPackages
{
"libreoffice-base"
};
OUString
sInteraction
;
xSyncDbusSessionHelper
->
InstallPackageNames
(
0
,
vPackages
,
sInteraction
);
SolarMutexGuard
aGuard
;
executeRestartDialog
(
comphelper
::
getProcessComponentContext
(),
NULL
,
RESTART_REASON_MAILMERGE_INSTALL
);
}
catch
(
const
css
::
uno
::
Exception
&
e
)
{
SAL_INFO
(
"sw.core"
,
"trying to install LibreOffice Base, caught "
<<
e
.
Message
);
}
return
;
}
if
(
m_pView
)
{
OSL_FAIL
(
"SwMailMergeWizardExecutor::ExecuteMailMergeWizard: Already executing the wizard!"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment