LibreOffice Module sfx2 (master) 1
versdlg.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21
22#include <com/sun/star/document/XCmisDocument.hpp>
23#include <com/sun/star/frame/XModel.hpp>
24#include <com/sun/star/util/RevisionTag.hpp>
25#include <com/sun/star/beans/NamedValue.hpp>
26
27#include <officecfg/Office/Common.hxx>
29#include <svl/intitem.hxx>
30#include <svl/stritem.hxx>
31#include <svl/itemset.hxx>
33#include <vcl/svapp.hxx>
34#include <vcl/settings.hxx>
35#include <tools/datetime.hxx>
36
37#include <versdlg.hxx>
38#include <sfx2/strings.hrc>
39#include <sfx2/dialoghelper.hxx>
40#include <sfx2/viewfrm.hxx>
41#include <sfx2/sfxresid.hxx>
42#include <sfx2/docfile.hxx>
43#include <sfx2/objsh.hxx>
44#include <sfx2/sfxsids.hrc>
45#include <sfx2/dispatch.hxx>
46
47#include <sfx2/sfxuno.hxx>
48#include <memory>
49#include <vector>
50
51using namespace com::sun::star;
52
54{
55 OUString aName;
56 OUString aComment;
57 OUString aAuthor;
59
61};
62
64{
65private:
66 std::vector<std::unique_ptr<SfxVersionInfo>> aTableList;
67public:
68 explicit SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo );
69 explicit SfxVersionTableDtor( const uno::Sequence < document::CmisVersion > & rInfo );
72
73 size_t size() const
74 { return aTableList.size(); }
75
76 SfxVersionInfo* at( size_t i ) const
77 { return aTableList[ i ].get(); }
78};
79
80SfxVersionTableDtor::SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo )
81{
82 for ( const auto& rItem : rInfo )
83 {
84 std::unique_ptr<SfxVersionInfo> pInfo(new SfxVersionInfo);
85 pInfo->aName = rItem.Identifier;
86 pInfo->aComment = rItem.Comment;
87 pInfo->aAuthor = rItem.Author;
88
89 pInfo->aCreationDate = DateTime( rItem.TimeStamp );
90 aTableList.push_back( std::move(pInfo) );
91 }
92}
93
94SfxVersionTableDtor::SfxVersionTableDtor( const uno::Sequence < document::CmisVersion >& rInfo )
95{
96 for ( const auto& rItem : rInfo )
97 {
98 std::unique_ptr<SfxVersionInfo> pInfo(new SfxVersionInfo);
99 pInfo->aName = rItem.Id;
100 pInfo->aComment = rItem.Comment;
101 pInfo->aAuthor = rItem.Author;
102
103 pInfo->aCreationDate = DateTime( rItem.TimeStamp );
104 aTableList.push_back( std::move(pInfo) );
105 }
106}
107
109 : aCreationDate( DateTime::EMPTY )
110{
111}
112
113namespace
114{
115 void setColSizes(weld::TreeView& rVersionBox)
116 {
117 // recalculate the datetime column width
118 int nWidestTime(rVersionBox.get_pixel_size(getWidestDateTime(Application::GetSettings().GetLocaleDataWrapper(), false)).Width());
119 int nW1 = rVersionBox.get_pixel_size(rVersionBox.get_column_title(1)).Width();
120
121 int nMax = std::max(nWidestTime, nW1) + 12; // max width + a little offset
122 const int nRest = rVersionBox.get_preferred_size().Width() - nMax;
123
124 std::set<OUString> aAuthors;
125 aAuthors.insert(SvtUserOptions().GetFullName());
126
127 for (int i = 0; i < rVersionBox.n_children(); ++i)
128 {
129 aAuthors.insert(weld::fromId<SfxVersionInfo*>(rVersionBox.get_id(i))->aAuthor);
130 }
131
132 int nMaxAuthorWidth = nRest/4;
133 for (auto const& author : aAuthors)
134 {
135 nMaxAuthorWidth = std::max<int>(nMaxAuthorWidth, rVersionBox.get_pixel_size(author).Width());
136 if (nMaxAuthorWidth > nRest/2)
137 {
138 nMaxAuthorWidth = nRest/2;
139 break;
140 }
141 }
142
143 rVersionBox.set_column_fixed_widths({ nMax, nMaxAuthorWidth });
144 }
145}
146
147SfxVersionDialog::SfxVersionDialog(weld::Window* pParent, SfxViewFrame* pVwFrame, bool bIsSaveVersionOnClose)
148 : SfxDialogController(pParent, "sfx/ui/versionsofdialog.ui", "VersionsOfDialog")
149 , m_pViewFrame(pVwFrame)
150 , m_bIsSaveVersionOnClose(bIsSaveVersionOnClose)
151 , m_xSaveButton(m_xBuilder->weld_button("save"))
152 , m_xSaveCheckBox(m_xBuilder->weld_check_button("always"))
153 , m_xOpenButton(m_xBuilder->weld_button("open"))
154 , m_xViewButton(m_xBuilder->weld_button("show"))
155 , m_xDeleteButton(m_xBuilder->weld_button("delete"))
156 , m_xCompareButton(m_xBuilder->weld_button("compare"))
157 , m_xCmisButton(m_xBuilder->weld_button("cmis"))
158 , m_xVersionBox(m_xBuilder->weld_tree_view("versions"))
159{
160 m_xVersionBox->set_size_request(m_xVersionBox->get_approximate_digit_width() * 90,
161 m_xVersionBox->get_height_rows(15));
162 setColSizes(*m_xVersionBox);
163
164 Link<weld::Button&,void> aClickLink = LINK( this, SfxVersionDialog, ButtonHdl_Impl );
165 m_xViewButton->connect_clicked( aClickLink );
166 m_xSaveButton->connect_clicked( aClickLink );
167 m_xDeleteButton->connect_clicked( aClickLink );
168 m_xCompareButton->connect_clicked( aClickLink );
169 m_xOpenButton->connect_clicked( aClickLink );
170 m_xSaveCheckBox->connect_toggled(LINK(this, SfxVersionDialog, ToggleHdl_Impl));
171 m_xCmisButton->connect_clicked( aClickLink );
172
173 m_xVersionBox->connect_changed( LINK( this, SfxVersionDialog, SelectHdl_Impl ) );
174 m_xVersionBox->connect_row_activated( LINK( this, SfxVersionDialog, DClickHdl_Impl ) );
175
176 m_xVersionBox->grab_focus();
177
178 // set dialog title (filename or docinfo title)
179 OUString sText = m_xDialog->get_title() +
181 m_xDialog->set_title(sText);
182
183 Init_Impl();
184}
185
186static OUString ConvertWhiteSpaces_Impl( const OUString& rText )
187{
188 // converted linebreaks and tabs to blanks; it's necessary for the display
189 OUStringBuffer sConverted;
190 const sal_Unicode* pChars = rText.getStr();
191 while ( *pChars )
192 {
193 switch ( *pChars )
194 {
195 case '\n' :
196 case '\t' :
197 sConverted.append(' ');
198 break;
199
200 default:
201 sConverted.append(*pChars);
202 }
203
204 ++pChars;
205 }
206
207 return sConverted.makeStringAndClear();
208}
209
211{
213 SfxMedium* pMedium = pObjShell->GetMedium();
214 uno::Sequence < util::RevisionTag > aVersions = pMedium->GetVersionList( true );
215 m_pTable.reset(new SfxVersionTableDtor( aVersions ));
216 m_xVersionBox->freeze();
217 for (size_t n = 0; n < m_pTable->size(); ++n)
218 {
219 SfxVersionInfo *pInfo = m_pTable->at( n );
221 m_xVersionBox->append(weld::toId(pInfo), aEntry);
222 auto nLastRow = m_xVersionBox->n_children() - 1;
223 m_xVersionBox->set_text(nLastRow, pInfo->aAuthor, 1);
224 m_xVersionBox->set_text(nLastRow, ConvertWhiteSpaces_Impl(pInfo->aComment), 2);
225 }
226 m_xVersionBox->thaw();
227
228 if (auto nCount = m_pTable->size())
229 m_xVersionBox->select(nCount - 1);
230
232
233 bool bEnable = !pObjShell->IsReadOnly();
234 m_xSaveButton->set_sensitive( bEnable );
235 m_xSaveCheckBox->set_sensitive( bEnable );
236
237 m_xOpenButton->set_sensitive(false);
238 m_xViewButton->set_sensitive(false);
239 m_xDeleteButton->set_sensitive(false);
240 m_xCompareButton->set_sensitive(false);
241
242 if ( !officecfg::Office::Common::Misc::ExperimentalMode::get() )
243 m_xCmisButton->hide( );
244 uno::Reference<document::XCmisDocument> xCmisDoc(pObjShell->GetModel(), uno::UNO_QUERY);
245 if (xCmisDoc && xCmisDoc->isVersionable())
246 m_xCmisButton->set_sensitive(true);
247 else
248 m_xCmisButton->set_sensitive(false);
249
250 SelectHdl_Impl(*m_xVersionBox);
251}
252
254{
255}
256
258{
260
261 auto nPos = m_xVersionBox->get_selected_index();
262 SfxInt16Item aItem( SID_VERSION, nPos + 1);
263 SfxStringItem aTarget( SID_TARGETNAME, "_blank" );
264 SfxStringItem aReferer( SID_REFERER, "private:user" );
265 SfxStringItem aFile( SID_FILE_NAME, pObjShell->GetMedium()->GetName() );
266
267 uno::Sequence< beans::NamedValue > aEncryptionData;
268 if ( GetEncryptionData_Impl( &pObjShell->GetMedium()->GetItemSet(), aEncryptionData ) )
269 {
270 // there is a password, it should be used during the opening
271 SfxUnoAnyItem aEncryptionDataItem( SID_ENCRYPTIONDATA, uno::Any( aEncryptionData ) );
273 SID_OPENDOC, SfxCallMode::ASYNCHRON,
274 { &aFile, &aItem, &aTarget, &aReferer, &aEncryptionDataItem });
275 }
276 else
277 {
279 SID_OPENDOC, SfxCallMode::ASYNCHRON,
280 { &aFile, &aItem, &aTarget, &aReferer });
281 }
282
283 m_xDialog->response(RET_OK);
284}
285
287{
288 Open_Impl();
289 return true;
290}
291
293{
294 bool bEnable = m_xVersionBox->get_selected_index() != -1;
295 SfxObjectShell* pObjShell = m_pViewFrame->GetObjectShell();
296 m_xDeleteButton->set_sensitive(bEnable && !pObjShell->IsReadOnly());
297 m_xOpenButton->set_sensitive(bEnable);
298 m_xViewButton->set_sensitive(bEnable);
299
300 const SfxPoolItem *pDummy=nullptr;
301 m_pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy );
302 SfxItemState eState = m_pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy );
303 m_xCompareButton->set_sensitive(bEnable && eState >= SfxItemState::DEFAULT);
304}
305
306IMPL_LINK(SfxVersionDialog, ButtonHdl_Impl, weld::Button&, rButton, void)
307{
308 SfxObjectShell *pObjShell = m_pViewFrame->GetObjectShell();
309
310 int nEntry = m_xVersionBox->get_selected_index();
311
312 if (&rButton == m_xSaveButton.get())
313 {
314 SfxVersionInfo aInfo;
315 aInfo.aAuthor = SvtUserOptions().GetFullName();
316 SfxViewVersionDialog_Impl aDlg(m_xDialog.get(), aInfo, true);
317 short nRet = aDlg.run();
318 if (nRet == RET_OK)
319 {
320 SfxStringItem aComment( SID_DOCINFO_COMMENTS, aInfo.aComment );
321 pObjShell->SetModified();
322 const SfxPoolItem* aItems[2];
323 aItems[0] = &aComment;
324 aItems[1] = nullptr;
325 m_pViewFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, aItems );
326 m_xVersionBox->freeze();
327 m_xVersionBox->clear();
328 m_xVersionBox->thaw();
329 Init_Impl();
330 }
331 }
332 else if (&rButton == m_xDeleteButton.get() && nEntry != -1)
333 {
334 SfxVersionInfo* pInfo = weld::fromId<SfxVersionInfo*>(m_xVersionBox->get_id(nEntry));
335 pObjShell->GetMedium()->RemoveVersion_Impl(pInfo->aName);
336 pObjShell->SetModified();
337 m_xVersionBox->freeze();
338 m_xVersionBox->clear();
339 m_xVersionBox->thaw();
340 Init_Impl();
341 }
342 else if (&rButton == m_xOpenButton.get() && nEntry != -1)
343 {
344 Open_Impl();
345 }
346 else if (&rButton == m_xViewButton.get() && nEntry != -1)
347 {
348 SfxVersionInfo* pInfo = weld::fromId<SfxVersionInfo*>(m_xVersionBox->get_id(nEntry));
349 SfxViewVersionDialog_Impl aDlg(m_xDialog.get(), *pInfo, false);
350 aDlg.run();
351 }
352 else if (&rButton == m_xCompareButton.get() && nEntry != -1)
353 {
354 SfxAllItemSet aSet( pObjShell->GetPool() );
355 aSet.Put(SfxInt16Item(SID_VERSION, nEntry + 1));
356 aSet.Put(SfxStringItem(SID_FILE_NAME, pObjShell->GetMedium()->GetName()));
357
358 SfxItemSet& rSet = pObjShell->GetMedium()->GetItemSet();
359 const SfxStringItem* pFilterItem = rSet.GetItem(SID_FILTER_NAME, false);
360 const SfxStringItem* pFilterOptItem = rSet.GetItem(SID_FILE_FILTEROPTIONS, false);
361 if ( pFilterItem )
362 aSet.Put( *pFilterItem );
363 if ( pFilterOptItem )
364 aSet.Put( *pFilterOptItem );
365
366 m_pViewFrame->GetDispatcher()->Execute( SID_DOCUMENT_COMPARE, SfxCallMode::ASYNCHRON, aSet );
367 m_xDialog->response(RET_CLOSE);
368 }
369 else if (&rButton == m_xCmisButton.get())
370 {
371 SfxCmisVersionsDialog aDlg(m_xDialog.get(), m_pViewFrame);
372 aDlg.run();
373 }
374}
375
376IMPL_LINK(SfxVersionDialog, ToggleHdl_Impl, weld::Toggleable&, rButton, void)
377{
378 if (&rButton == m_xSaveCheckBox.get())
379 {
380 m_bIsSaveVersionOnClose = m_xSaveCheckBox->get_active();
381 }
382}
383
385 : SfxDialogController(pParent, "sfx/ui/versioncommentdialog.ui", "VersionCommentDialog")
386 , m_rInfo(rInfo)
387 , m_xDateTimeText(m_xBuilder->weld_label("timestamp"))
388 , m_xSavedByText(m_xBuilder->weld_label("author"))
389 , m_xEdit(m_xBuilder->weld_text_view("textview"))
390 , m_xOKButton(m_xBuilder->weld_button("ok"))
391 , m_xCancelButton(m_xBuilder->weld_button("cancel"))
392 , m_xCloseButton(m_xBuilder->weld_button("close"))
393{
394 OUString sAuthor = rInfo.aAuthor.isEmpty() ? SfxResId(STR_NO_NAME_SET) : rInfo.aAuthor;
395
397 m_xDateTimeText->set_label(m_xDateTimeText->get_label() + formatDateTime(rInfo.aCreationDate, rLocaleWrapper, false));
398 m_xSavedByText->set_label(m_xSavedByText->get_label() + sAuthor);
399 m_xEdit->set_text(rInfo.aComment);
400 m_xEdit->set_size_request(40 * m_xEdit->get_approximate_digit_width(),
401 7 * m_xEdit->get_text_height());
402 m_xOKButton->connect_clicked(LINK(this, SfxViewVersionDialog_Impl, ButtonHdl));
403
404 if (!bEdit)
405 {
406 m_xOKButton->hide();
407 m_xCancelButton->hide();
408 m_xEdit->set_editable(false);
409 m_xDialog->set_title(SfxResId(STR_VIEWVERSIONCOMMENT));
410 m_xCloseButton->grab_focus();
411 }
412 else
413 {
414 m_xDateTimeText->hide();
415 m_xCloseButton->hide();
416 m_xEdit->grab_focus();
417 }
418}
419
421{
422 assert(&rButton == m_xOKButton.get());
423 (void)rButton;
424 m_rInfo.aComment = m_xEdit->get_text();
425 m_xDialog->response(RET_OK);
426}
427
429 : SfxDialogController(pParent, "sfx/ui/versionscmis.ui", "VersionsCmisDialog")
430 , m_pViewFrame(pVwFrame)
431 , m_xVersionBox(m_xBuilder->weld_tree_view("versions"))
432{
433 m_xVersionBox->set_size_request(m_xVersionBox->get_approximate_digit_width() * 90,
434 m_xVersionBox->get_height_rows(15));
435 setColSizes(*m_xVersionBox);
436
437 m_xVersionBox->grab_focus();
438
439 OUString sText = m_xDialog->get_title() +
441 m_xDialog->set_title(sText);
442
443 LoadVersions();
444}
445
447{
448}
449
451{
453 uno::Sequence < document::CmisVersion > aVersions = pObjShell->GetCmisVersions( );
454 m_pTable.reset(new SfxVersionTableDtor( aVersions ));
455 for (size_t n = 0; n < m_pTable->size(); ++n)
456 {
457 SfxVersionInfo *pInfo = m_pTable->at( n );
459 m_xVersionBox->append(weld::toId(pInfo), aEntry);
460 auto nLastRow = m_xVersionBox->n_children() - 1;
461 m_xVersionBox->set_text(nLastRow, pInfo->aAuthor, 1);
462 m_xVersionBox->set_text(nLastRow, ConvertWhiteSpaces_Impl(pInfo->aComment), 2);
463 }
464
465 if (auto nCount = m_pTable->size())
466 m_xVersionBox->select(nCount - 1);
467}
468
469/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XExecutableDialog > m_xDialog
const LocaleDataWrapper & GetLocaleDataWrapper() const
static const AllSettings & GetSettings()
virtual ~SfxCmisVersionsDialog() override
Definition: versdlg.cxx:446
std::unique_ptr< weld::TreeView > m_xVersionBox
Definition: versdlg.hxx:80
SfxViewFrame * m_pViewFrame
Definition: versdlg.hxx:77
std::unique_ptr< SfxVersionTableDtor > m_pTable
Definition: versdlg.hxx:78
SfxCmisVersionsDialog(weld::Window *pParent, SfxViewFrame *pFrame)
Definition: versdlg.cxx:428
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
Method to execute a <SfxSlot>s over the Slot-Id.
Definition: dispatch.cxx:931
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxItemSet & GetItemSet() const
Definition: docfile.cxx:3647
const css::uno::Sequence< css::util::RevisionTag > & GetVersionList(bool _bNoReload=false)
Definition: docfile.cxx:3687
const OUString & GetName() const
Definition: docfile.cxx:3592
SAL_DLLPRIVATE void RemoveVersion_Impl(const OUString &rVersion)
Definition: docfile.cxx:3755
virtual SfxObjectShell * GetObjectShell() override
Definition: objxtor.cxx:824
bool IsReadOnly() const
Definition: objmisc.cxx:416
SfxMedium * GetMedium() const
Definition: objsh.hxx:261
css::uno::Reference< css::frame::XModel3 > GetModel() const
Definition: objxtor.cxx:838
OUString GetTitle(sal_uInt16 nMaxLen=0) const
Definition: objmisc.cxx:710
SAL_DLLPRIVATE css::uno::Sequence< css::document::CmisVersion > GetCmisVersions() const
Definition: objserv.cxx:387
virtual void SetModified(bool bModified=true)
Definition: objmisc.cxx:301
SfxItemPool & GetPool() const
Each Subclass of SfxShell must reference a pool.
Definition: shell.hxx:511
std::unique_ptr< weld::Button > m_xCompareButton
Definition: versdlg.hxx:40
std::unique_ptr< weld::CheckButton > m_xSaveCheckBox
Definition: versdlg.hxx:36
void Open_Impl()
Definition: versdlg.cxx:257
bool m_bIsSaveVersionOnClose
Definition: versdlg.hxx:33
std::unique_ptr< weld::TreeView > m_xVersionBox
Definition: versdlg.hxx:42
std::unique_ptr< weld::Button > m_xDeleteButton
Definition: versdlg.hxx:39
SfxVersionDialog(weld::Window *pParent, SfxViewFrame *pFrame, bool)
Definition: versdlg.cxx:147
std::unique_ptr< SfxVersionTableDtor > m_pTable
Definition: versdlg.hxx:34
SfxViewFrame * m_pViewFrame
Definition: versdlg.hxx:32
std::unique_ptr< weld::Button > m_xViewButton
Definition: versdlg.hxx:38
std::unique_ptr< weld::Button > m_xSaveButton
Definition: versdlg.hxx:35
std::unique_ptr< weld::Button > m_xOpenButton
Definition: versdlg.hxx:37
std::unique_ptr< weld::Button > m_xCmisButton
Definition: versdlg.hxx:41
virtual ~SfxVersionDialog() override
Definition: versdlg.cxx:253
void Init_Impl()
Definition: versdlg.cxx:210
SfxVersionTableDtor(const uno::Sequence< util::RevisionTag > &rInfo)
Definition: versdlg.cxx:80
SfxVersionInfo * at(size_t i) const
Definition: versdlg.cxx:76
size_t size() const
Definition: versdlg.cxx:73
SfxVersionTableDtor(const SfxVersionTableDtor &)=delete
SfxVersionTableDtor & operator=(const SfxVersionTableDtor &)=delete
std::vector< std::unique_ptr< SfxVersionInfo > > aTableList
Definition: versdlg.cxx:66
SfxDispatcher * GetDispatcher()
Definition: viewfrm.hxx:109
virtual SfxObjectShell * GetObjectShell() override
Definition: viewfrm.cxx:2218
std::unique_ptr< weld::TextView > m_xEdit
Definition: versdlg.hxx:64
std::unique_ptr< weld::Button > m_xCancelButton
Definition: versdlg.hxx:66
std::unique_ptr< weld::Button > m_xOKButton
Definition: versdlg.hxx:65
std::unique_ptr< weld::Label > m_xSavedByText
Definition: versdlg.hxx:63
std::unique_ptr< weld::Button > m_xCloseButton
Definition: versdlg.hxx:67
std::unique_ptr< weld::Label > m_xDateTimeText
Definition: versdlg.hxx:62
SfxViewVersionDialog_Impl(weld::Window *pParent, SfxVersionInfo &rInfo, bool bEdit)
Definition: versdlg.cxx:384
constexpr tools::Long Width() const
virtual short run()
std::shared_ptr< weld::Dialog > m_xDialog
virtual int n_children() const=0
virtual OUString get_column_title(int nColumn) const=0
virtual void set_column_fixed_widths(const std::vector< int > &rWidths)=0
virtual OUString get_id(int pos) const=0
virtual Size get_pixel_size(const OUString &rText) const=0
virtual Size get_preferred_size() const=0
int nCount
OUString getWidestDateTime(const LocaleDataWrapper &rWrapper, bool bWithSec)
OUString formatDateTime(const DateTime &rDateTime, const LocaleDataWrapper &rWrapper, bool bWithSec)
std::unique_ptr< weld::Button > m_xOKButton
Definition: impldde.cxx:53
sal_Int64 n
sal_uInt16 nPos
Definition: linksrc.cxx:118
int i
const LocaleDataWrapper & GetLocaleDataWrapper(LanguageType nLang)
constexpr OUStringLiteral EMPTY
OUString toId(const void *pValue)
bool GetEncryptionData_Impl(const SfxItemSet *pSet, uno::Sequence< beans::NamedValue > &o_rEncryptionData)
Definition: objstor.cxx:170
SfxItemState
OUString SfxResId(TranslateId aId)
Definition: sfxresid.cxx:22
static SfxItemSet & rSet
Definition: shell.cxx:534
OUString aAuthor
Definition: versdlg.cxx:57
OUString aName
Definition: versdlg.cxx:55
DateTime aCreationDate
Definition: versdlg.cxx:58
OUString aComment
Definition: versdlg.cxx:56
sal_uInt16 sal_Unicode
RET_OK
RET_CLOSE
IMPL_LINK_NOARG(SfxVersionDialog, DClickHdl_Impl, weld::TreeView &, bool)
Definition: versdlg.cxx:286
IMPL_LINK(SfxVersionDialog, ButtonHdl_Impl, weld::Button &, rButton, void)
Definition: versdlg.cxx:306
static OUString ConvertWhiteSpaces_Impl(const OUString &rText)
Definition: versdlg.cxx:186