Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3301
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/01/3301/1
fdo#61389 - Display Properties, Set as default actions in save mode.
It dosent make sense to display delete action since we are saving
a template same for edit.
Change-Id: I83368f80a29f60c8d24b47fe3682ca93a2373a98
---
M sfx2/source/doc/templatedlg.cxx
M sfx2/source/doc/templatedlg.src
2 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 6f78ebe..3097f1f 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -307,6 +307,14 @@
mpViewBar->ShowItem(TBI_TEMPLATE_SAVE);
mpViewBar->HideItem(TBI_TEMPLATE_IMPORT);
mpViewBar->HideItem(TBI_TEMPLATE_REPOSITORY);
+
+ mpTemplateBar->ShowItem(TBI_TEMPLATE_SAVE);
+ mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES);
+ mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT);
+ mpTemplateBar->HideItem(TBI_TEMPLATE_EDIT);
+ mpTemplateBar->HideItem(TBI_TEMPLATE_MOVE);
+ mpTemplateBar->HideItem(TBI_TEMPLATE_EXPORT);
+ mpTemplateBar->HideItem(TBI_TEMPLATE_DELETE);
}
else
{
@@ -850,16 +858,22 @@
if (pItem->isSelected())
{
- if (!mbIsSaveMode)
+ if (maSelTemplates.empty())
{
- if (maSelTemplates.empty())
- {
- mpViewBar->Show(false);
- mpTemplateBar->Show();
- }
- else if (maSelTemplates.size() != 1 || !bInSelection)
+ mpViewBar->Show(false);
+ mpTemplateBar->Show();
+ }
+ else if (maSelTemplates.size() != 1 || !bInSelection)
+ {
+ if (!mbIsSaveMode)
{
mpTemplateBar->HideItem(TBI_TEMPLATE_EDIT);
+ mpTemplateBar->HideItem(TBI_TEMPLATE_PROPERTIES);
+ mpTemplateBar->HideItem(TBI_TEMPLATE_DEFAULT);
+ }
+ else
+ {
+ mpTemplateBar->HideItem(TBI_TEMPLATE_SAVE);
mpTemplateBar->HideItem(TBI_TEMPLATE_PROPERTIES);
mpTemplateBar->HideItem(TBI_TEMPLATE_DEFAULT);
}
@@ -874,19 +888,25 @@
{
maSelTemplates.erase(pItem);
- if (!mbIsSaveMode)
+ if (maSelTemplates.empty())
{
- if (maSelTemplates.empty())
- {
- mpTemplateBar->Show(false);
- mpViewBar->Show();
- }
- else if (maSelTemplates.size() == 1)
+ mpTemplateBar->Show(false);
+ mpViewBar->Show();
+ }
+ else if (maSelTemplates.size() == 1)
+ {
+ if (!mbIsSaveMode)
{
mpTemplateBar->ShowItem(TBI_TEMPLATE_EDIT);
mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES);
mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT);
}
+ else
+ {
+ mpTemplateBar->ShowItem(TBI_TEMPLATE_SAVE);
+ mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES);
+ mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT);
+ }
}
}
}
diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index 60c2857..9beb3da 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -212,6 +212,18 @@
{
ToolBoxItem
{
+ Identifier = TBI_TEMPLATE_SAVE;
+ Hide = TRUE;
+ Text [ en-US ] = "Save";
+
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "actionview028.png" ; };
+ };
+ };
+
+ ToolBoxItem
+ {
Identifier = TBI_TEMPLATE_EDIT;
Text [ en-US ] = "Edit";
--
To view, visit https://gerrit.libreoffice.org/3301
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I83368f80a29f60c8d24b47fe3682ca93a2373a98
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Rafael Dominguez <venccsralph@gmail.com>
Context
- [PATCH libreoffice-4-0] fdo#61389 - Display Properties, Set as default actions in sa... · Rafael Dominguez (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.