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
73295fa4
Kaydet (Commit)
73295fa4
authored
Nis 10, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert RID_POPUP_DROPMODE menu to .ui
Change-Id: I004bb61ab6d0cb2dfacc9290236c32a2adf7ff82
üst
9781272a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
65 deletions
+93
-65
UIConfig_scalc.mk
sc/UIConfig_scalc.mk
+1
-0
helpids.h
sc/inc/helpids.h
+0
-5
scres.hrc
sc/inc/scres.hrc
+0
-6
content.cxx
sc/source/ui/navipi/content.cxx
+34
-18
navipi.cxx
sc/source/ui/navipi/navipi.cxx
+25
-7
navipi.src
sc/source/ui/navipi/navipi.src
+0
-29
dropmenu.ui
sc/uiconfig/scalc/ui/dropmenu.ui
+33
-0
No files found.
sc/UIConfig_scalc.mk
Dosyayı görüntüle @
73295fa4
...
@@ -121,6 +121,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
...
@@ -121,6 +121,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/deletecells \
sc/uiconfig/scalc/ui/deletecells \
sc/uiconfig/scalc/ui/deletecontents \
sc/uiconfig/scalc/ui/deletecontents \
sc/uiconfig/scalc/ui/descriptivestatisticsdialog \
sc/uiconfig/scalc/ui/descriptivestatisticsdialog \
sc/uiconfig/scalc/ui/dropmenu \
sc/uiconfig/scalc/ui/doubledialog \
sc/uiconfig/scalc/ui/doubledialog \
sc/uiconfig/scalc/ui/erroralerttabpage \
sc/uiconfig/scalc/ui/erroralerttabpage \
sc/uiconfig/scalc/ui/externaldata \
sc/uiconfig/scalc/ui/externaldata \
...
...
sc/inc/helpids.h
Dosyayı görüntüle @
73295fa4
...
@@ -46,11 +46,6 @@
...
@@ -46,11 +46,6 @@
#define HID_SC_ADD_AUTOFMT "SC_HID_SC_ADD_AUTOFMT"
#define HID_SC_ADD_AUTOFMT "SC_HID_SC_ADD_AUTOFMT"
#define HID_SC_AUTOFMT_NAME "SC_HID_SC_AUTOFMT_NAME"
#define HID_SC_AUTOFMT_NAME "SC_HID_SC_AUTOFMT_NAME"
#define HID_SC_DROPMODE_URL "SC_HID_SC_DROPMODE_URL"
#define HID_SC_DROPMODE_LINK "SC_HID_SC_DROPMODE_LINK"
#define HID_SC_DROPMODE_COPY "SC_HID_SC_DROPMODE_COPY"
#define HID_SC_SCENARIO_DELETE "SC_HID_SC_SCENARIO_DELETE"
#define HID_SC_SCENARIO_DELETE "SC_HID_SC_SCENARIO_DELETE"
#define HID_SC_SCENARIO_EDIT "SC_HID_SC_SCENARIO_EDIT"
#define HID_SC_SCENARIO_EDIT "SC_HID_SC_SCENARIO_EDIT"
...
...
sc/inc/scres.hrc
Dosyayı görüntüle @
73295fa4
...
@@ -441,12 +441,6 @@
...
@@ -441,12 +441,6 @@
#define RID_SCDLG_HFEDIT_HEADER (SC_DIALOGS_START + 68)
#define RID_SCDLG_HFEDIT_HEADER (SC_DIALOGS_START + 68)
#define RID_SCDLG_HFEDIT_FOOTER (SC_DIALOGS_START + 69)
#define RID_SCDLG_HFEDIT_FOOTER (SC_DIALOGS_START + 69)
// popup for drop-mode in navigator
#define RID_POPUP_DROPMODE (SC_DIALOGS_START + 92)
#define RID_DROPMODE_URL (SC_DIALOGS_START + 93)
#define RID_DROPMODE_LINK (SC_DIALOGS_START + 94)
#define RID_DROPMODE_COPY (SC_DIALOGS_START + 95)
#define RID_POPUP_NAVIPI_SCENARIO (SC_DIALOGS_START + 120)
#define RID_POPUP_NAVIPI_SCENARIO (SC_DIALOGS_START + 120)
#define RID_NAVIPI_SCENARIO_DELETE (SC_DIALOGS_START + 121)
#define RID_NAVIPI_SCENARIO_DELETE (SC_DIALOGS_START + 121)
#define RID_NAVIPI_SCENARIO_EDIT (SC_DIALOGS_START + 122)
#define RID_NAVIPI_SCENARIO_EDIT (SC_DIALOGS_START + 122)
...
...
sc/source/ui/navipi/content.cxx
Dosyayı görüntüle @
73295fa4
...
@@ -579,14 +579,28 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
...
@@ -579,14 +579,28 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
// Drag-Drop Modus
// Drag-Drop Modus
ScopedVclPtrInstance
<
PopupMenu
>
aPop
;
ScopedVclPtrInstance
<
PopupMenu
>
aPop
;
VclPtrInstance
<
ScPopupMenu
>
aDropMenu
(
ScResId
(
RID_POPUP_DROPMODE
)
);
VclBuilder
aBuilder
(
nullptr
,
VclBuilderContainer
::
getUIRootDir
(),
"modules/scalc/ui/dropmenu.ui"
,
""
);
aDropMenu
->
CheckItem
(
RID_DROPMODE_URL
+
pParentWindow
->
GetDropMode
()
);
VclPtr
<
PopupMenu
>
aDropMenu
(
aBuilder
.
get_menu
(
"menu"
));
switch
(
pParentWindow
->
GetDropMode
())
{
case
0
:
aDropMenu
->
CheckItem
(
aDropMenu
->
GetItemId
(
"hyperlink"
));
break
;
case
1
:
aDropMenu
->
CheckItem
(
aDropMenu
->
GetItemId
(
"link"
));
break
;
case
2
:
aDropMenu
->
CheckItem
(
aDropMenu
->
GetItemId
(
"copy"
));
break
;
}
aPop
->
InsertItem
(
1
,
pParentWindow
->
GetStrDragMode
()
);
aPop
->
InsertItem
(
1
,
pParentWindow
->
GetStrDragMode
()
);
aPop
->
SetPopupMenu
(
1
,
aDropMenu
.
get
()
);
aPop
->
SetPopupMenu
(
1
,
aDropMenu
.
get
()
);
// displayed document
// displayed document
VclPtrInstance
<
Sc
PopupMenu
>
aDocMenu
;
VclPtrInstance
<
PopupMenu
>
aDocMenu
;
aDocMenu
->
SetMenuFlags
(
aDocMenu
->
GetMenuFlags
()
|
MenuFlags
::
NoAutoMnemonics
);
aDocMenu
->
SetMenuFlags
(
aDocMenu
->
GetMenuFlags
()
|
MenuFlags
::
NoAutoMnemonics
);
sal_uInt16
i
=
0
;
sal_uInt16
i
=
0
;
sal_uInt16
nPos
=
0
;
sal_uInt16
nPos
=
0
;
...
@@ -603,14 +617,16 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
...
@@ -603,14 +617,16 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
aEntry
+=
pParentWindow
->
aStrActive
;
aEntry
+=
pParentWindow
->
aStrActive
;
else
else
aEntry
+=
pParentWindow
->
aStrNotActive
;
aEntry
+=
pParentWindow
->
aStrNotActive
;
aDocMenu
->
InsertItem
(
++
i
,
aEntry
);
++
i
;
aDocMenu
->
InsertItem
(
i
,
aEntry
,
MenuItemBits
::
TEXT
,
OString
(
"document"
)
+
OString
::
number
(
i
));
if
(
!
bHiddenDoc
&&
aName
==
aManualDoc
)
if
(
!
bHiddenDoc
&&
aName
==
aManualDoc
)
nPos
=
i
;
nPos
=
i
;
}
}
pSh
=
SfxObjectShell
::
GetNext
(
*
pSh
);
pSh
=
SfxObjectShell
::
GetNext
(
*
pSh
);
}
}
// "active window"
// "active window"
aDocMenu
->
InsertItem
(
++
i
,
pParentWindow
->
aStrActiveWin
);
++
i
;
aDocMenu
->
InsertItem
(
i
,
pParentWindow
->
aStrActiveWin
,
MenuItemBits
::
TEXT
,
OString
(
"document"
)
+
OString
::
number
(
i
));
if
(
!
bHiddenDoc
&&
aManualDoc
.
isEmpty
())
if
(
!
bHiddenDoc
&&
aManualDoc
.
isEmpty
())
nPos
=
i
;
nPos
=
i
;
// hidden document
// hidden document
...
@@ -618,7 +634,8 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
...
@@ -618,7 +634,8 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
{
{
OUString
aEntry
=
aHiddenTitle
;
OUString
aEntry
=
aHiddenTitle
;
aEntry
+=
pParentWindow
->
aStrHidden
;
aEntry
+=
pParentWindow
->
aStrHidden
;
aDocMenu
->
InsertItem
(
++
i
,
aEntry
);
++
i
;
aDocMenu
->
InsertItem
(
i
,
aEntry
,
MenuItemBits
::
TEXT
,
OString
(
"document"
)
+
OString
::
number
(
i
));
if
(
bHiddenDoc
)
if
(
bHiddenDoc
)
nPos
=
i
;
nPos
=
i
;
}
}
...
@@ -626,21 +643,20 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
...
@@ -626,21 +643,20 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
aPop
->
InsertItem
(
2
,
pParentWindow
->
GetStrDisplay
()
);
aPop
->
InsertItem
(
2
,
pParentWindow
->
GetStrDisplay
()
);
aPop
->
SetPopupMenu
(
2
,
aDocMenu
.
get
()
);
aPop
->
SetPopupMenu
(
2
,
aDocMenu
.
get
()
);
sal_uInt16
nSelected
=
aPop
->
Execute
(
this
,
rCEvt
.
GetMousePosPixel
());
OString
sIdent
=
aPop
->
GetItemIdent
(
nSelected
);
aPop
->
Execute
(
this
,
rCEvt
.
GetMousePosPixel
()
);
if
(
sIdent
.
startsWith
(
"document"
))
if
(
aDropMenu
->
WasHit
()
)
// Drag-Drop Modus
{
sal_uInt16
nId
=
aDropMenu
->
GetSelected
();
if
(
nId
>=
RID_DROPMODE_URL
&&
nId
<=
RID_DROPMODE_COPY
)
pParentWindow
->
SetDropMode
(
nId
-
RID_DROPMODE_URL
);
}
else
if
(
aDocMenu
->
WasHit
()
)
// displayed document
{
{
sal_uInt16
nId
=
aDocMenu
->
GetSelected
();
OUString
aName
=
aDocMenu
->
GetItemText
(
aDocMenu
->
GetItemId
(
sIdent
));
OUString
aName
=
aDocMenu
->
GetItemText
(
nId
);
SelectDoc
(
aName
);
SelectDoc
(
aName
);
}
}
else
if
(
sIdent
==
"hyperlink"
)
pParentWindow
->
SetDropMode
(
0
);
else
if
(
sIdent
==
"link"
)
pParentWindow
->
SetDropMode
(
1
);
else
if
(
sIdent
==
"copy"
)
pParentWindow
->
SetDropMode
(
2
);
}
}
break
;
break
;
default
:
break
;
default
:
break
;
...
...
sc/source/ui/navipi/navipi.cxx
Dosyayı görüntüle @
73295fa4
...
@@ -361,15 +361,33 @@ IMPL_LINK(ScNavigatorDlg, ToolBoxDropdownClickHdl, ToolBox *, pToolBox, void)
...
@@ -361,15 +361,33 @@ IMPL_LINK(ScNavigatorDlg, ToolBoxDropdownClickHdl, ToolBox *, pToolBox, void)
// click (button down) and not in the select (button up)
// click (button down) and not in the select (button up)
if
(
pToolBox
->
GetCurItemId
()
==
nDragModeId
)
if
(
pToolBox
->
GetCurItemId
()
==
nDragModeId
)
{
{
ScopedVclPtrInstance
<
ScPopupMenu
>
aPop
(
ScResId
(
RID_POPUP_DROPMODE
));
VclBuilder
aBuilder
(
nullptr
,
VclBuilderContainer
::
getUIRootDir
(),
"modules/scalc/ui/dropmenu.ui"
,
""
);
aPop
->
CheckItem
(
RID_DROPMODE_URL
+
GetDropMode
());
VclPtr
<
PopupMenu
>
aPop
(
aBuilder
.
get_menu
(
"menu"
));
aPop
->
Execute
(
pToolBox
,
pToolBox
->
GetItemRect
(
nDragModeId
),
PopupMenuFlags
::
ExecuteDown
);
sal_uInt16
nId
=
aPop
->
GetSelected
();
pToolBox
->
EndSelection
();
// before SetDropMode (SetDropMode calls SetItemImage)
switch
(
GetDropMode
())
{
case
0
:
aPop
->
CheckItem
(
aPop
->
GetItemId
(
"hyperlink"
));
break
;
case
1
:
aPop
->
CheckItem
(
aPop
->
GetItemId
(
"link"
));
break
;
case
2
:
aPop
->
CheckItem
(
aPop
->
GetItemId
(
"copy"
));
break
;
}
sal_uInt16
nId
=
aPop
->
Execute
(
pToolBox
,
pToolBox
->
GetItemRect
(
nDragModeId
),
PopupMenuFlags
::
ExecuteDown
);
OString
sIdent
=
aPop
->
GetItemIdent
(
nId
);
if
(
nId
>=
RID_DROPMODE_URL
&&
nId
<=
RID_DROPMODE_COPY
)
if
(
sIdent
==
"hyperlink"
)
SetDropMode
(
nId
-
RID_DROPMODE_URL
);
SetDropMode
(
0
);
else
if
(
sIdent
==
"link"
)
SetDropMode
(
1
);
else
if
(
sIdent
==
"copy"
)
SetDropMode
(
2
);
pToolBox
->
EndSelection
();
// before SetDropMode (SetDropMode calls SetItemImage)
}
}
}
}
...
...
sc/source/ui/navipi/navipi.src
Dosyayı görüntüle @
73295fa4
...
@@ -176,35 +176,6 @@ String SCSTR_QHLP_SCEN_COMMENT
...
@@ -176,35 +176,6 @@ String SCSTR_QHLP_SCEN_COMMENT
Text [ en-US ] = "Comment";
Text [ en-US ] = "Comment";
};
};
// PopupMenu -------------------------------------------------------------
Menu RID_POPUP_DROPMODE
{
ItemList =
{
MenuItem
{
Identifier = RID_DROPMODE_URL ;
HelpId = HID_SC_DROPMODE_URL ;
Text [ en-US ] = "Insert as Hyperlink" ;
RadioCheck = TRUE ;
};
MenuItem
{
Identifier = RID_DROPMODE_LINK ;
HelpId = HID_SC_DROPMODE_LINK ;
Text [ en-US ] = "Insert as Link" ;
RadioCheck = TRUE ;
};
MenuItem
{
Identifier = RID_DROPMODE_COPY ;
HelpId = HID_SC_DROPMODE_COPY ;
Text [ en-US ] = "Insert as Copy" ;
RadioCheck = TRUE ;
};
};
};
Menu RID_POPUP_NAVIPI_SCENARIO
Menu RID_POPUP_NAVIPI_SCENARIO
{
{
ItemList =
ItemList =
...
...
sc/uiconfig/scalc/ui/dropmenu.ui
0 → 100644
Dosyayı görüntüle @
73295fa4
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
<requires
lib=
"gtk+"
version=
"3.10"
/>
<object
class=
"GtkMenu"
id=
"menu"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<child>
<object
class=
"GtkRadioMenuItem"
id=
"hyperlink"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Insert as Hyperlink
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkRadioMenuItem"
id=
"link"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Insert as Link
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkRadioMenuItem"
id=
"copy"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Insert as Copy
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
</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