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
b44b9753
Kaydet (Commit)
b44b9753
authored
8 years ago
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert navigator menu to .ui
Change-Id: I754da935de04dde6d94fa2a1331c771a4bd5ec88
üst
0191f643
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
74 deletions
+111
-74
UIConfig_dbreport.mk
reportdesign/UIConfig_dbreport.mk
+1
-0
RptResId.hrc
reportdesign/inc/RptResId.hrc
+0
-2
Navigator.cxx
reportdesign/source/ui/dlg/Navigator.cxx
+35
-11
Navigator.src
reportdesign/source/ui/dlg/Navigator.src
+0
-61
navigatormenu.ui
reportdesign/uiconfig/dbreport/ui/navigatormenu.ui
+75
-0
No files found.
reportdesign/UIConfig_dbreport.mk
Dosyayı görüntüle @
b44b9753
...
...
@@ -48,6 +48,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/dbreport,\
reportdesign/uiconfig/dbreport/ui/floatingnavigator \
reportdesign/uiconfig/dbreport/ui/floatingsort \
reportdesign/uiconfig/dbreport/ui/groupsortmenu \
reportdesign/uiconfig/dbreport/ui/navigatormenu \
reportdesign/uiconfig/dbreport/ui/pagedialog \
reportdesign/uiconfig/dbreport/ui/pagenumberdialog \
))
...
...
This diff is collapsed.
Click to expand it.
reportdesign/inc/RptResId.hrc
Dosyayı görüntüle @
b44b9753
...
...
@@ -191,8 +191,6 @@
#define RID_STR_VERTICALALIGN (RID_STRING_START + 160)
#define RID_STR_PARAADJUST (RID_STRING_START + 161)
// menu -----------------------------------------------------------------------
#define RID_MENU_NAVIGATOR ( RID_MENU_START + 1 )
// bitmaps
#define RID_SVXBMP_SELECT_REPORT (RID_BITMAP_START + 0 )
#define RID_SVXBMP_FM_FIXEDTEXT (RID_BITMAP_START + 1 )
...
...
This diff is collapsed.
Click to expand it.
reportdesign/source/ui/dlg/Navigator.cxx
Dosyayı görüntüle @
b44b9753
...
...
@@ -261,6 +261,26 @@ void NavigatorTree::dispose()
SvTreeListBox
::
dispose
();
}
namespace
{
sal_uInt16
mapIdent
(
const
OString
&
rIdent
)
{
if
(
rIdent
==
"sorting"
)
return
SID_SORTINGANDGROUPING
;
else
if
(
rIdent
==
"page"
)
return
SID_PAGEHEADERFOOTER
;
else
if
(
rIdent
==
"report"
)
return
SID_REPORTHEADERFOOTER
;
else
if
(
rIdent
==
"function"
)
return
SID_RPT_NEW_FUNCTION
;
else
if
(
rIdent
==
"properties"
)
return
SID_SHOW_PROPERTYBROWSER
;
else
if
(
rIdent
==
"delete"
)
return
SID_DELETE
;
return
0
;
}
}
void
NavigatorTree
::
Command
(
const
CommandEvent
&
rEvt
)
{
bool
bHandled
=
false
;
...
...
@@ -297,29 +317,33 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
uno
::
Reference
<
report
::
XGroup
>
xGroup
(
pData
->
getContent
(),
uno
::
UNO_QUERY
);
bool
bDeleteAllowed
=
m_rController
.
isEditable
()
&&
(
xGroup
.
is
()
||
uno
::
Reference
<
report
::
XFunction
>
(
pData
->
getContent
(),
uno
::
UNO_QUERY
).
is
());
ScopedVclPtrInstance
<
PopupMenu
>
aContextMenu
(
ModuleRes
(
RID_MENU_NAVIGATOR
)
);
VclBuilder
aBuilder
(
nullptr
,
VclBuilderContainer
::
getUIRootDir
(),
"modules/dbreport/ui/navigatormenu.ui"
,
""
);
VclPtr
<
PopupMenu
>
aContextMenu
(
aBuilder
.
get_menu
(
"menu"
));
sal_uInt16
nCount
=
aContextMenu
->
GetItemCount
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
{
if
(
MenuItemType
::
SEPARATOR
!=
aContextMenu
->
GetItemType
(
i
))
{
sal_uInt16
nId
=
aContextMenu
->
GetItemId
(
i
);
sal_uInt16
nMId
=
aContextMenu
->
GetItemId
(
i
);
sal_uInt16
nSId
=
mapIdent
(
aContextMenu
->
GetItemIdent
(
nMId
));
aContextMenu
->
CheckItem
(
n
Id
,
m_rController
.
isCommandChecked
(
n
Id
));
bool
bEnabled
=
m_rController
.
isCommandEnabled
(
nId
);
if
(
nId
==
SID_RPT_NEW_FUNCTION
)
aContextMenu
->
EnableItem
(
n
Id
,
m_rController
.
isEditable
()
&&
(
xSupplier
.
is
()
||
xFunctions
.
is
())
);
aContextMenu
->
CheckItem
(
n
MId
,
m_rController
.
isCommandChecked
(
nS
Id
));
bool
bEnabled
=
m_rController
.
isCommandEnabled
(
n
S
Id
);
if
(
nSId
==
SID_RPT_NEW_FUNCTION
)
aContextMenu
->
EnableItem
(
n
MId
,
m_rController
.
isEditable
()
&&
(
xSupplier
.
is
()
||
xFunctions
.
is
())
);
// special condition, check for function and group
else
if
(
nId
==
SID_DELETE
)
aContextMenu
->
EnableItem
(
SID_DELETE
,
bDeleteAllowed
);
else
if
(
nSId
==
SID_DELETE
)
aContextMenu
->
EnableItem
(
nMId
,
bDeleteAllowed
);
else
aContextMenu
->
EnableItem
(
n
Id
,
bEnabled
);
aContextMenu
->
EnableItem
(
n
MId
,
bEnabled
);
}
}
sal_uInt16
nId
=
aContextMenu
->
Execute
(
this
,
aWhere
);
if
(
nId
)
if
(
aContextMenu
->
Execute
(
this
,
aWhere
)
)
{
sal_uInt16
nId
=
mapIdent
(
aContextMenu
->
GetCurItemIdent
());
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
;
if
(
nId
==
SID_RPT_NEW_FUNCTION
)
{
...
...
This diff is collapsed.
Click to expand it.
reportdesign/source/ui/dlg/Navigator.src
Dosyayı görüntüle @
b44b9753
...
...
@@ -117,65 +117,4 @@ String RID_STR_GROUPS
Text [ en-US ] = "Groups" ;
};
Menu RID_MENU_NAVIGATOR
{
ItemList =
{
MenuItem
{
Identifier = SID_SORTINGANDGROUPING;
Command = ".uno:DbSortingAndGrouping";
Text [ en-US ] = "Sorting and Grouping...";
};
MenuItem
{
Separator = TRUE;
};
MenuItem
{
Identifier = SID_PAGEHEADERFOOTER;
Command = ".uno:PageHeaderFooter";
Checkable = TRUE;
Text [ en-US ] = "Page Header/Footer...";
};
MenuItem
{
Identifier = SID_REPORTHEADERFOOTER;
Command = ".uno:ReportHeaderFooter";
Checkable = TRUE;
Text [ en-US ] = "Report Header/Footer...";
};
MenuItem
{
Separator = TRUE;
};
MenuItem
{
Identifier = SID_RPT_NEW_FUNCTION;
Command = ".uno:NewFunction";
Text [ en-US ] = "New Function";
};
MenuItem
{
Separator = TRUE;
};
MenuItem
{
Identifier = SID_SHOW_PROPERTYBROWSER;
Command = ".uno:FormProperties";
Text [ en-US ] = "Properties...";
};
MenuItem
{
Separator = TRUE;
};
MenuItem
{
Identifier = SID_DELETE ;
Command = ".uno:Delete" ;
Text [ en-US ] = "~Delete" ;
};
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
Click to expand it.
reportdesign/uiconfig/dbreport/ui/navigatormenu.ui
0 → 100644
Dosyayı görüntüle @
b44b9753
<?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=
"GtkMenuItem"
id=
"sorting"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Sorting and Grouping...
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkSeparatorMenuItem"
id=
"menuitem5"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
</child>
<child>
<object
class=
"GtkCheckMenuItem"
id=
"page"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Page Header/Footer...
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkCheckMenuItem"
id=
"report"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Report Header/Footer...
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkSeparatorMenuItem"
id=
"menuitem1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
</child>
<child>
<object
class=
"GtkMenuItem"
id=
"function"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
New Function
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkSeparatorMenuItem"
id=
"menuitem2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
</child>
<child>
<object
class=
"GtkMenuItem"
id=
"properties"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Properties...
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkMenuItem"
id=
"delete"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
_Delete
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
</object>
</interface>
This diff is collapsed.
Click to expand it.
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