summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx25
-rw-r--r--icon-themes/breeze/links.txt3
-rw-r--r--icon-themes/galaxy/links.txt2
-rw-r--r--icon-themes/hicontrast/links.txt2
-rw-r--r--icon-themes/sifr/links.txt4
-rw-r--r--icon-themes/tango/links.txt2
-rw-r--r--include/sfx2/sfxsids.hrc1
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu11
-rw-r--r--sfx2/sdi/docslots.sdi1
-rw-r--r--sfx2/sdi/sfx.sdi15
10 files changed, 57 insertions, 9 deletions
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 28f7affa0487..50f7ec3c882d 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -354,12 +354,14 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( css::uno::RuntimeException ) override;
private:
+ bool m_bSplitButton;
bool m_bModified;
css::uno::Reference< css::util::XModifiable > m_xModifiable;
};
SaveToolbarController::SaveToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
: ImplInheritanceHelper( rxContext, ".uno:SaveAsMenu" )
+ , m_bSplitButton( true )
, m_bModified( false )
{
}
@@ -369,16 +371,21 @@ void SaveToolbarController::initialize( const css::uno::Sequence< css::uno::Any
{
PopupMenuToolbarController::initialize( aArguments );
- if ( m_sModuleName.endsWith( "RelationDesign" ) )
+ bool bRelationDesignModule = m_sModuleName.endsWith( "RelationDesign" );
+
+ ToolBox* pToolBox = nullptr;
+ sal_uInt16 nId = 0;
+ if ( getToolboxId( nId, &pToolBox )
+ && ( bRelationDesignModule || pToolBox->GetItemCommand( nId ) != m_aCommandURL ) )
{
- // Should not have the dropdown.
- ToolBox* pToolBox = nullptr;
- sal_uInt16 nId = 0;
- if ( getToolboxId( nId, &pToolBox ) )
- pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~ ToolBoxItemBits::DROPDOWN );
- return;
+ m_bSplitButton = false;
+ pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~ ToolBoxItemBits::DROPDOWN );
}
+ if ( bRelationDesignModule )
+ // No modified icon there, just disable the button if there's nothing to save.
+ return;
+
css::uno::Reference< css::frame::XController > xController( m_xFrame->getController(), css::uno::UNO_QUERY );
if ( xController.is() )
m_xModifiable.set( xController->getModel(), css::uno::UNO_QUERY );
@@ -421,7 +428,7 @@ void SaveToolbarController::updateImage()
css::uno::Reference< css::frame::XStorable > xStorable( m_xModifiable, css::uno::UNO_QUERY );
Image aImage;
- if ( xStorable.is() && xStorable->isReadonly() )
+ if ( m_bSplitButton && xStorable.is() && xStorable->isReadonly() )
{
aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( ".uno:SaveAs", bLargeIcons, m_xFrame );
}
@@ -446,7 +453,7 @@ void SaveToolbarController::statusChanged( const css::frame::FeatureStateEvent&
// If the model is able to tell us whether we're in read only mode, change the button to save as only mode
// based on that. Otherwise just dumbly disable the button (because there could be other reasons why the
// save slot is disabled, where save as isn't possible as well).
- if ( xStorable.is() )
+ if ( m_bSplitButton && xStorable.is() )
{
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index fc0ad0b34037..14f7be2fa874 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -826,6 +826,9 @@ cmd/sc_showgraphics.png cmd/sc_graphic.png
cmd/lc_dsbrowserexplorer.png cmd/lc_showfmexplorer.png
cmd/sc_dsbrowserexplorer.png cmd/sc_showfmexplorer.png
+cmd/lc_savesimple.png cmd/lc_save.png
+cmd/sc_savesimple.png cmd/sc_save.png
+
# database
# ==============================================
database/linked_text_table.png cmd/sc_dataimport.png
diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 1a94f0b1d09d..18e589d87423 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -1,3 +1,5 @@
+cmd/lc_savesimple.png cmd/lc_save.png
+cmd/sc_savesimple.png cmd/sc_save.png
cmd/lc_datastreamsplay.png avmedia/res/avl02049.png
cmd/sc_datastreamsplay.png avmedia/res/av02049.png
cmd/lc_datastreamsstop.png avmedia/res/avl02051.png
diff --git a/icon-themes/hicontrast/links.txt b/icon-themes/hicontrast/links.txt
index 6a36734b0267..278aabd1e4ec 100644
--- a/icon-themes/hicontrast/links.txt
+++ b/icon-themes/hicontrast/links.txt
@@ -1,3 +1,5 @@
+cmd/lc_savesimple.png cmd/lc_save.png
+cmd/sc_savesimple.png cmd/sc_save.png
cmd/lc_anchormenu.png cmd/lc_toggleanchortype.png
cmd/sc_anchormenu.png cmd/sc_toggleanchortype.png
diff --git a/icon-themes/sifr/links.txt b/icon-themes/sifr/links.txt
index c5304c522a87..40358893968a 100644
--- a/icon-themes/sifr/links.txt
+++ b/icon-themes/sifr/links.txt
@@ -154,6 +154,10 @@ cmd/sc_insertrowsafter.png cmd/sc_insertrows.png
cmd/lc_insertcolumnsafter.png cmd/lc_insertcolumns.png
cmd/sc_insertcolumnsafter.png cmd/sc_insertcolumns.png
+# simple save button
+cmd/lc_savesimple.png cmd/lc_save.png
+cmd/sc_savesimple.png cmd/sc_save.png
+
# anchor menu
cmd/lc_anchormenu.png cmd/lc_toggleanchortype.png
cmd/sc_anchormenu.png cmd/sc_toggleanchortype.png
diff --git a/icon-themes/tango/links.txt b/icon-themes/tango/links.txt
index c5750f9148b2..21890516b5b0 100644
--- a/icon-themes/tango/links.txt
+++ b/icon-themes/tango/links.txt
@@ -1,3 +1,5 @@
+cmd/lc_savesimple.png cmd/lc_save.png
+cmd/sc_savesimple.png cmd/sc_save.png
cmd/sc_showsinglepage.png cmd/sc_adddirect.png
res/sx03129.png dbaccess/res/db.png
cmd/sc_refresh.png cmd/sc_reload.png
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 25664a9fb3f3..16def420c4e5 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -103,6 +103,7 @@
#define SID_OPENTEMPLATE (SID_SFX_START + 594)
#define SID_SAVEASDOC (SID_SFX_START + 502)
#define SID_SAVEASREMOTE (SID_SFX_START + 516)
+#define SID_SAVESIMPLE (SID_SFX_START + 518)
#define SID_SAVEACOPY (SID_SFX_START + 999)
#define SID_SAVEACOPYITEM (SID_SFX_START + 998)
#define SID_CLOSING (SID_SFX_START +1539)
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index b0c65de23538..e88a79e3f5fa 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -2141,6 +2141,17 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:SaveSimple" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Save Document</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ <prop oor:name="TargetURL" oor:type="xs:string">
+ <value>.uno:Save</value>
+ </prop>
+ </node>
<node oor:name=".uno:BezierInsert" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Insert Points</value>
diff --git a/sfx2/sdi/docslots.sdi b/sfx2/sdi/docslots.sdi
index 73e1e4d790bd..8a54a6c689a5 100644
--- a/sfx2/sdi/docslots.sdi
+++ b/sfx2/sdi/docslots.sdi
@@ -124,6 +124,7 @@ interface OfficeDocument : Document
ExecMethod = ExecProps_Impl ;
StateMethod = GetState_Impl ;
]
+ SID_SAVESIMPLE []
SID_SAVEDOC // ole(req) api(final/play/rec)
[
ExecMethod = ExecFile_Impl ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index e1b37a584a7a..b69f94d116c7 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3563,6 +3563,21 @@ SfxVoidItem RunBasic SID_BASICRUN
GroupId = GID_MACRO;
]
+SfxVoidItem SaveSimple SID_SAVESIMPLE
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ NoRecord;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
SfxBoolItem Save SID_SAVEDOC
(SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem Author SID_DOCINFO_AUTHOR)