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
adfacdd9
Kaydet (Commit)
adfacdd9
authored
Nis 24, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
adapt code to protect sheet .ui
Change-Id: Ic3c375e87cf89a3956f3703c6facbcbe5ffd5d58
üst
f6b05adf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
229 deletions
+64
-229
libreoffice-catalog.xml.in
extras/source/glade/libreoffice-catalog.xml.in
+3
-0
AllLangResTarget_sc.mk
sc/AllLangResTarget_sc.mk
+0
-1
UIConfig_scalc.mk
sc/UIConfig_scalc.mk
+1
-0
protectiondlg.hrc
sc/source/ui/inc/protectiondlg.hrc
+0
-38
protectiondlg.hxx
sc/source/ui/inc/protectiondlg.hxx
+10
-13
protectiondlg.cxx
sc/source/ui/miscdlgs/protectiondlg.cxx
+38
-51
protectiondlg.src
sc/source/ui/miscdlgs/protectiondlg.src
+0
-125
protectsheetdlg.ui
sc/uiconfig/scalc/ui/protectsheetdlg.ui
+0
-0
checklbx.cxx
svx/source/dialog/checklbx.cxx
+12
-1
No files found.
extras/source/glade/libreoffice-catalog.xml.in
Dosyayı görüntüle @
adfacdd9
...
...
@@ -132,6 +132,9 @@
<glade-widget-class
title=
"Tab List"
name=
"svtlo-SvTabListBox"
generic-name=
"Tab List"
parent=
"svtlo-SvTreeListBox"
icon-name=
"widget-gtk-treeview"
/>
<glade-widget-class
title=
"Checked Tree List"
name=
"svxlo-SvxCheckListBox"
generic-name=
"Checked Tree List"
parent=
"GtkTreeView"
icon-name=
"widget-gtk-treeview"
/>
<glade-widget-class
title=
"Dial Control"
name=
"svxlo-DialControl"
generic-name=
"Dial Control"
parent=
"GtkSpinner"
icon-name=
"widget-gtk-spinner"
/>
...
...
sc/AllLangResTarget_sc.mk
Dosyayı görüntüle @
adfacdd9
...
...
@@ -82,7 +82,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/miscdlgs/retypepassdlg.src \
sc/source/ui/miscdlgs/highred.src \
sc/source/ui/miscdlgs/conflictsdlg.src \
sc/source/ui/miscdlgs/protectiondlg.src \
sc/source/ui/miscdlgs/acredlin.src \
sc/source/ui/formdlg/formdlgs.src \
sc/source/ui/formdlg/dwfunctr.src \
...
...
sc/UIConfig_scalc.mk
Dosyayı görüntüle @
adfacdd9
...
...
@@ -72,6 +72,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/insertsheet \
sc/uiconfig/scalc/ui/managenamesdialog \
sc/uiconfig/scalc/ui/printeroptions \
sc/uiconfig/scalc/ui/protectsheetdlg \
sc/uiconfig/scalc/ui/sheetprintpage \
sc/uiconfig/scalc/ui/selectrange \
sc/uiconfig/scalc/ui/selectsource \
...
...
sc/source/ui/inc/protectiondlg.hrc
deleted
100644 → 0
Dosyayı görüntüle @
f6b05adf
/* -*- 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sc.hrc>
#define BTN_OK 1
#define BTN_CANCEL 2
#define BTN_HELP 3
#define BTN_PROTECT 4
#define FT_PASSWORD1 5
#define ED_PASSWORD1 6
#define FT_PASSWORD2 7
#define ED_PASSWORD2 8
#define FL_OPTIONS 9
#define FT_OPTIONS 10
#define CLB_OPTIONS 11
#define ST_SELECT_PROTECTED_CELLS 50
#define ST_SELECT_UNPROTECTED_CELLS 51
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/inc/protectiondlg.hxx
Dosyayı görüntüle @
adfacdd9
...
...
@@ -24,6 +24,7 @@
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
#include <vcl/layout.hxx>
#include <svx/checklbx.hxx>
class
Window
;
...
...
@@ -48,23 +49,19 @@ private:
void
EnableOptionalWidgets
(
bool
bEnable
=
true
);
CheckBox
ma
BtnProtect
;
CheckBox
*
m_p
BtnProtect
;
FixedText
maPassword1Text
;
Edit
maPassword1Edit
;
FixedText
maPassword2Tex
t
;
Edit
ma
Password2Edit
;
VclContainer
*
m_pPasswords
;
VclContainer
*
m_pOptions
;
Edit
*
m_pPassword1Edi
t
;
Edit
*
m_p
Password2Edit
;
FixedLine
maOptionsLine
;
FixedText
maOptionsText
;
SvxCheckListBox
maOptionsListBox
;
SvxCheckListBox
*
m_pOptionsListBox
;
OKButton
maBtnOk
;
CancelButton
maBtnCancel
;
HelpButton
maBtnHelp
;
OKButton
*
m_pBtnOk
;
String
m
aSelectLockedCells
;
String
m
aSelectUnlockedCells
;
OUString
m_
aSelectLockedCells
;
OUString
m_
aSelectUnlockedCells
;
DECL_LINK
(
OKHdl
,
void
*
);
DECL_LINK
(
CheckBoxHdl
,
CheckBox
*
);
...
...
sc/source/ui/miscdlgs/protectiondlg.cxx
Dosyayı görüntüle @
adfacdd9
...
...
@@ -19,7 +19,6 @@
#include "protectiondlg.hxx"
#include "protectiondlg.hrc"
#include "scresid.hxx"
#include "tabprotection.hxx"
...
...
@@ -35,27 +34,21 @@ static const ScTableProtection::Option aOptions[] = {
static
const
sal_uInt16
nOptionCount
=
sizeof
(
aOptions
)
/
sizeof
(
aOptions
[
0
]);
ScTableProtectionDlg
::
ScTableProtectionDlg
(
Window
*
pParent
)
:
ModalDialog
(
pParent
,
ScResId
(
RID_SCDLG_TABPROTECTION
)),
maBtnProtect
(
this
,
ScResId
(
BTN_PROTECT
)),
maPassword1Text
(
this
,
ScResId
(
FT_PASSWORD1
)),
maPassword1Edit
(
this
,
ScResId
(
ED_PASSWORD1
)),
maPassword2Text
(
this
,
ScResId
(
FT_PASSWORD2
)),
maPassword2Edit
(
this
,
ScResId
(
ED_PASSWORD2
)),
maOptionsLine
(
this
,
ScResId
(
FL_OPTIONS
)),
maOptionsText
(
this
,
ScResId
(
FT_OPTIONS
)),
maOptionsListBox
(
this
,
ScResId
(
CLB_OPTIONS
)),
ScTableProtectionDlg
::
ScTableProtectionDlg
(
Window
*
pParent
)
:
ModalDialog
(
pParent
,
"ProtectSheetDialog"
,
"modules/scalc/ui/protectsheetdlg.ui"
)
{
get
(
m_pPasswords
,
"passwords"
);
get
(
m_pOptions
,
"options"
);
get
(
m_pBtnProtect
,
"protect"
);
get
(
m_pOptionsListBox
,
"checklist"
);
get
(
m_pPassword1Edit
,
"password1"
);
get
(
m_pPassword2Edit
,
"password2"
);
get
(
m_pBtnOk
,
"ok"
);
maBtnOk
(
this
,
ScResId
(
BTN_OK
)),
maBtnCancel
(
this
,
ScResId
(
BTN_CANCEL
)),
maBtnHelp
(
this
,
ScResId
(
BTN_HELP
)),
m_aSelectLockedCells
=
get
<
FixedText
>
(
"protected"
)
->
GetText
();
m_aSelectUnlockedCells
=
get
<
FixedText
>
(
"unprotected"
)
->
GetText
();
maSelectLockedCells
(
ScResId
(
ST_SELECT_PROTECTED_CELLS
)),
maSelectUnlockedCells
(
ScResId
(
ST_SELECT_UNPROTECTED_CELLS
))
{
Init
();
FreeResource
();
}
ScTableProtectionDlg
::~
ScTableProtectionDlg
()
...
...
@@ -70,68 +63,62 @@ short ScTableProtectionDlg::Execute()
void
ScTableProtectionDlg
::
SetDialogData
(
const
ScTableProtection
&
rData
)
{
for
(
sal_uInt16
i
=
0
;
i
<
nOptionCount
;
++
i
)
m
aOptionsListBox
.
CheckEntryPos
(
i
,
rData
.
isOptionEnabled
(
aOptions
[
i
]));
m
_pOptionsListBox
->
CheckEntryPos
(
i
,
rData
.
isOptionEnabled
(
aOptions
[
i
]));
}
void
ScTableProtectionDlg
::
WriteData
(
ScTableProtection
&
rData
)
const
{
rData
.
setProtected
(
m
aBtnProtect
.
IsChecked
());
rData
.
setProtected
(
m
_pBtnProtect
->
IsChecked
());
// We assume that the two password texts match.
rData
.
setPassword
(
m
aPassword1Edit
.
GetText
());
rData
.
setPassword
(
m
_pPassword1Edit
->
GetText
());
for
(
sal_uInt16
i
=
0
;
i
<
nOptionCount
;
++
i
)
rData
.
setOption
(
aOptions
[
i
],
m
aOptionsListBox
.
IsChecked
(
i
));
rData
.
setOption
(
aOptions
[
i
],
m
_pOptionsListBox
->
IsChecked
(
i
));
}
void
ScTableProtectionDlg
::
Init
()
{
Link
aLink
=
LINK
(
this
,
ScTableProtectionDlg
,
CheckBoxHdl
);
m
aBtnProtect
.
SetClickHdl
(
aLink
);
m
_pBtnProtect
->
SetClickHdl
(
aLink
);
aLink
=
LINK
(
this
,
ScTableProtectionDlg
,
OKHdl
);
m
aBtnOk
.
SetClickHdl
(
aLink
);
m
_pBtnOk
->
SetClickHdl
(
aLink
);
aLink
=
LINK
(
this
,
ScTableProtectionDlg
,
PasswordModifyHdl
);
m
aPassword1Edit
.
SetModifyHdl
(
aLink
);
m
aPassword2Edit
.
SetModifyHdl
(
aLink
);
m
_pPassword1Edit
->
SetModifyHdl
(
aLink
);
m
_pPassword2Edit
->
SetModifyHdl
(
aLink
);
m
aOptionsListBox
.
SetUpdateMode
(
false
);
m
aOptionsListBox
.
Clear
();
m
_pOptionsListBox
->
SetUpdateMode
(
false
);
m
_pOptionsListBox
->
Clear
();
m
aOptionsListBox
.
InsertEntry
(
m
aSelectLockedCells
);
m
aOptionsListBox
.
InsertEntry
(
m
aSelectUnlockedCells
);
m
_pOptionsListBox
->
InsertEntry
(
m_
aSelectLockedCells
);
m
_pOptionsListBox
->
InsertEntry
(
m_
aSelectUnlockedCells
);
m
aOptionsListBox
.
CheckEntryPos
(
0
,
true
);
m
aOptionsListBox
.
CheckEntryPos
(
1
,
true
);
m
_pOptionsListBox
->
CheckEntryPos
(
0
,
true
);
m
_pOptionsListBox
->
CheckEntryPos
(
1
,
true
);
m
aOptionsListBox
.
SetUpdateMode
(
true
);
m
_pOptionsListBox
->
SetUpdateMode
(
true
);
// Set the default state of the dialog.
m
aBtnProtect
.
Check
(
true
);
m
aPassword1Edit
.
GrabFocus
();
m
_pBtnProtect
->
Check
(
true
);
m
_pPassword1Edit
->
GrabFocus
();
}
void
ScTableProtectionDlg
::
EnableOptionalWidgets
(
bool
bEnable
)
{
maPassword1Text
.
Enable
(
bEnable
);
maPassword1Edit
.
Enable
(
bEnable
);
maPassword2Text
.
Enable
(
bEnable
);
maPassword2Edit
.
Enable
(
bEnable
);
maOptionsLine
.
Enable
(
bEnable
);
maOptionsText
.
Enable
(
bEnable
);
maOptionsListBox
.
Enable
(
bEnable
);
maOptionsListBox
.
Invalidate
();
m_pPasswords
->
Enable
(
bEnable
);
m_pOptions
->
Enable
(
bEnable
);
m_pOptionsListBox
->
Invalidate
();
}
IMPL_LINK
(
ScTableProtectionDlg
,
CheckBoxHdl
,
CheckBox
*
,
pBtn
)
{
if
(
pBtn
==
&
ma
BtnProtect
)
if
(
pBtn
==
m_p
BtnProtect
)
{
bool
bChecked
=
m
aBtnProtect
.
IsChecked
();
bool
bChecked
=
m
_pBtnProtect
->
IsChecked
();
EnableOptionalWidgets
(
bChecked
);
m
aBtnOk
.
Enable
(
bChecked
);
m
_pBtnOk
->
Enable
(
bChecked
);
}
return
0
;
...
...
@@ -145,9 +132,9 @@ IMPL_LINK_NOARG(ScTableProtectionDlg, OKHdl)
IMPL_LINK_NOARG
(
ScTableProtectionDlg
,
PasswordModifyHdl
)
{
String
aPass1
=
maPassword1Edit
.
GetText
();
String
aPass2
=
maPassword2Edit
.
GetText
();
m
aBtnOk
.
Enable
(
aPass1
.
Equals
(
aPass2
)
);
OUString
aPass1
=
m_pPassword1Edit
->
GetText
();
OUString
aPass2
=
m_pPassword2Edit
->
GetText
();
m
_pBtnOk
->
Enable
(
aPass1
==
aPass2
);
return
0
;
}
...
...
sc/source/ui/miscdlgs/protectiondlg.src
deleted
100644 → 0
Dosyayı görüntüle @
f6b05adf
/* -*- 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "protectiondlg.hrc"
ModalDialog RID_SCDLG_TABPROTECTION
{
HelpID = "sc:ModalDialog:RID_SCDLG_TABPROTECTION";
Text [ en-US ] = "Protect Sheet" ;
Size = MAP_APPFONT ( 250 , 135 ) ;
Moveable = TRUE ;
Closeable = TRUE ;
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 194 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 194 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 194 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
CheckBox BTN_PROTECT
{
HelpID = "sc:CheckBox:RID_SCDLG_TABPROTECTION:BTN_PROTECT";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 180 , 10 );
Text [ en-US ] = "P~rotect this sheet and the contents of protected cells" ;
};
FixedText FT_PASSWORD1
{
Pos = MAP_APPFONT ( 11, 23 );
Size = MAP_APPFONT ( 42, 10 );
Text [ en-US ] = "~Password" ;
};
Edit ED_PASSWORD1
{
HelpID = "sc:Edit:RID_SCDLG_TABPROTECTION:ED_PASSWORD1";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 56, 22 );
Size = MAP_APPFONT ( 75, 12 );
};
FixedText FT_PASSWORD2
{
Pos = MAP_APPFONT ( 11, 40 );
Size = MAP_APPFONT ( 42, 10 );
Text [ en-US ] = "~Confirm" ;
};
Edit ED_PASSWORD2
{
HelpID = "sc:Edit:RID_SCDLG_TABPROTECTION:ED_PASSWORD2";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 56, 39 );
Size = MAP_APPFONT ( 75, 12 );
};
FixedLine FL_OPTIONS
{
Pos = MAP_APPFONT ( 6, 60 );
Size = MAP_APPFONT ( 180, 8 );
Text [ en-US ] = "Options";
};
FixedText FT_OPTIONS
{
Pos = MAP_APPFONT ( 11, 74 );
Size = MAP_APPFONT ( 140, 8 );
Text [ en-US ] = "Allow all users of this sheet to:";
};
Control CLB_OPTIONS
{
Pos = MAP_APPFONT ( 11, 85 );
Size = MAP_APPFONT ( 140, 40 );
Border = TRUE ;
TabStop = TRUE ;
};
String ST_SELECT_PROTECTED_CELLS
{
Text [ en-US ] = "Select protected cells";
};
String ST_SELECT_UNPROTECTED_CELLS
{
Text [ en-US ] = "Select unprotected cells";
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/uiconfig/scalc/ui/protectsheetdlg.ui
Dosyayı görüntüle @
adfacdd9
This diff is collapsed.
Click to expand it.
svx/source/dialog/checklbx.cxx
Dosyayı görüntüle @
adfacdd9
...
...
@@ -19,6 +19,8 @@
#include <tools/shl.hxx>
#include <svtools/treelistentry.hxx>
#define _SVX_CHECKLBX_CXX
#include <svx/checklbx.hxx>
...
...
@@ -26,7 +28,7 @@
#include <svx/dialogs.hrc>
#include
"svtools/treelistentry.hxx"
#include
<vcl/builder.hxx>
// class SvxCheckListBox -------------------------------------------------
...
...
@@ -38,6 +40,15 @@ SvxCheckListBox::SvxCheckListBox( Window* pParent, WinBits nWinStyle ) :
Init_Impl
();
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
Window
*
SAL_CALL
makeSvxCheckListBox
(
Window
*
pParent
,
VclBuilder
::
stringmap
&
rMap
)
{
WinBits
nWinStyle
=
WB_TABSTOP
;
OString
sBorder
=
VclBuilder
::
extractCustomProperty
(
rMap
);
if
(
!
sBorder
.
isEmpty
())
nWinStyle
|=
WB_BORDER
;
return
new
SvxCheckListBox
(
pParent
,
nWinStyle
);
}
// -----------------------------------------------------------------------
SvxCheckListBox
::
SvxCheckListBox
(
Window
*
pParent
,
const
ResId
&
rResId
)
:
...
...
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