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
207ed1b1
Kaydet (Commit)
207ed1b1
authored
Kas 07, 2012
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CMIS: added CheckIn dialog
Change-Id: Iba938986478b880b7026285f607972a2e4d72283
üst
b7686e41
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
220 additions
and
8 deletions
+220
-8
Library_sfx.mk
sfx2/Library_sfx.mk
+1
-0
UI_sfx.mk
sfx2/UI_sfx.mk
+1
-0
checkin.hxx
sfx2/inc/sfx2/checkin.hxx
+35
-0
checkin.cxx
sfx2/source/dialog/checkin.cxx
+39
-0
objserv.cxx
sfx2/source/doc/objserv.cxx
+12
-8
checkin.ui
sfx2/uiconfig/ui/checkin.ui
+132
-0
No files found.
sfx2/Library_sfx.mk
Dosyayı görüntüle @
207ed1b1
...
...
@@ -147,6 +147,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/control/unoctitm \
sfx2/source/dialog/alienwarn \
sfx2/source/dialog/basedlgs \
sfx2/source/dialog/checkin \
sfx2/source/dialog/dinfdlg \
sfx2/source/dialog/dinfedt \
sfx2/source/dialog/dockwin \
...
...
sfx2/UI_sfx.mk
Dosyayı görüntüle @
207ed1b1
...
...
@@ -10,6 +10,7 @@
$(eval $(call gb_UI_UI,sfx))
$(eval $(call gb_UI_add_uifiles,sfx,\
sfx2/uiconfig/ui/checkin \
sfx2/uiconfig/ui/password \
))
...
...
sfx2/inc/sfx2/checkin.hxx
0 → 100644
Dosyayı görüntüle @
207ed1b1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef _SFX_CHECKIN_HXX
#define _SFX_CHECKIN_HXX
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
class
SfxCheckinDialog
:
public
ModalDialog
{
private
:
Edit
*
m_pCommentED
;
CheckBox
*
m_pMajorCB
;
OKButton
*
m_pOKBtn
;
DECL_DLLPRIVATE_LINK
(
OKHdl
,
void
*
);
public
:
SfxCheckinDialog
(
Window
*
pParent
);
rtl
::
OUString
GetComment
(
);
bool
IsMajor
(
);
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/dialog/checkin.cxx
0 → 100644
Dosyayı görüntüle @
207ed1b1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <sfx2/checkin.hxx>
#include <vcl/msgbox.hxx>
SfxCheckinDialog
::
SfxCheckinDialog
(
Window
*
pParent
)
:
ModalDialog
(
pParent
,
"CheckinDialog"
,
"sfx/ui/checkin.ui"
)
{
get
(
m_pCommentED
,
"VersionComment"
);
get
(
m_pMajorCB
,
"MajorVersion"
);
get
(
m_pOKBtn
,
"ok"
);
m_pOKBtn
->
SetClickHdl
(
LINK
(
this
,
SfxCheckinDialog
,
OKHdl
)
);
}
rtl
::
OUString
SfxCheckinDialog
::
GetComment
(
)
{
return
m_pCommentED
->
GetText
(
);
}
bool
SfxCheckinDialog
::
IsMajor
(
)
{
return
m_pMajorCB
->
IsChecked
(
);
}
IMPL_LINK_NOARG
(
SfxCheckinDialog
,
OKHdl
)
{
EndDialog
(
RET_OK
);
return
0
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/doc/objserv.cxx
Dosyayı görüntüle @
207ed1b1
...
...
@@ -87,6 +87,7 @@
#include "sfx2/sfxhelp.hxx"
#include <sfx2/msgpool.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/checkin.hxx>
#include "../appl/app.hrc"
#include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
...
...
@@ -366,7 +367,6 @@ void SfxObjectShell::CancelCheckOut( )
try
{
uno
::
Reference
<
document
::
XCmisDocument
>
xCmisDoc
(
GetModel
(),
uno
::
UNO_QUERY_THROW
);
// TODO Pop up dialog to ask whether to loose data or not
xCmisDoc
->
cancelCheckOut
(
);
}
catch
(
const
uno
::
RuntimeException
&
e
)
...
...
@@ -382,13 +382,17 @@ void SfxObjectShell::CheckIn( )
try
{
uno
::
Reference
<
document
::
XCmisDocument
>
xCmisDoc
(
GetModel
(),
uno
::
UNO_QUERY_THROW
);
sal_Bool
bIsMajor
=
sal_False
;
rtl
::
OUString
sComment
(
"Some sample comment"
);
// TODO Pop up dialog to ask for comment and major
xCmisDoc
->
checkIn
(
bIsMajor
,
sComment
);
uno
::
Reference
<
util
::
XModifiable
>
xModifiable
(
GetModel
(
),
uno
::
UNO_QUERY
);
if
(
xModifiable
.
is
(
)
)
xModifiable
->
setModified
(
sal_False
);
// Pop up dialog to ask for comment and major
SfxCheckinDialog
checkinDlg
(
&
GetFrame
(
)
->
GetWindow
(
)
);
if
(
checkinDlg
.
Execute
(
)
==
RET_OK
)
{
rtl
::
OUString
sComment
=
checkinDlg
.
GetComment
(
);
sal_Bool
bMajor
=
checkinDlg
.
IsMajor
(
);
xCmisDoc
->
checkIn
(
bMajor
,
sComment
);
uno
::
Reference
<
util
::
XModifiable
>
xModifiable
(
GetModel
(
),
uno
::
UNO_QUERY
);
if
(
xModifiable
.
is
(
)
)
xModifiable
->
setModified
(
sal_False
);
}
}
catch
(
const
uno
::
RuntimeException
&
e
)
{
...
...
sfx2/uiconfig/ui/checkin.ui
0 → 100644
Dosyayı görüntüle @
207ed1b1
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkDialog"
id=
"CheckinDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
5
</property>
<property
name=
"title"
translatable=
"yes"
>
Check-in
</property>
<property
name=
"modal"
>
True
</property>
<property
name=
"window_position"
>
center-on-parent
</property>
<property
name=
"type_hint"
>
dialog
</property>
<child
internal-child=
"vbox"
>
<object
class=
"GtkBox"
id=
"dialog-vbox1"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
2
</property>
<child
internal-child=
"action_area"
>
<object
class=
"GtkButtonBox"
id=
"dialog-action_area1"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"layout_style"
>
end
</property>
<child>
<object
class=
"GtkButton"
id=
"cancel"
>
<property
name=
"label"
>
gtk-cancel
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"ok"
>
<property
name=
"label"
>
gtk-ok
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkBox"
id=
"box1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<child>
<object
class=
"GtkLabel"
id=
"label1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"halign"
>
start
</property>
<property
name=
"ypad"
>
8
</property>
<property
name=
"label"
translatable=
"yes"
>
Version comment
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkAlignment"
id=
"alignment1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"top_padding"
>
6
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"GtkTextView"
id=
"VersionComment"
>
<property
name=
"width_request"
>
300
</property>
<property
name=
"height_request"
>
150
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"wrap_mode"
>
word
</property>
</object>
</child>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkCheckButton"
id=
"MajorVersion"
>
<property
name=
"label"
translatable=
"yes"
>
New major version
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"draw_indicator"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget
response=
"0"
>
cancel
</action-widget>
<action-widget
response=
"0"
>
ok
</action-widget>
</action-widgets>
</object>
</interface>
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