[Libreoffice-commits] core.git: officecfg/registry sdext/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 6 09:42:14 UTC 2018
officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu | 3 +++
officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs | 4 ++++
sdext/source/minimizer/optimizerdialog.cxx | 7 +++++--
sdext/source/minimizer/pppoptimizertoken.cxx | 2 ++
sdext/source/minimizer/pppoptimizertoken.hxx | 1 +
5 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit 990761f5297ef7bff78f62e7df63d4d4a20616a6
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Fri Nov 2 13:53:16 2018 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Nov 6 10:41:08 2018 +0100
presentation minimizer: fixed problem with default filename
According to code, it is expected that minimized copy of
presentation is proposed with ".mini" suffix as default,
but this does not works right now. As a solution a new
localized prefix "(minimized)" is added to filename.
Change-Id: If869c70a5885a9c917fc7254aa8b0d164a6f5a50
Reviewed-on: https://gerrit.libreoffice.org/62781
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu b/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
index 1a2bbe315267..c5ea67d39c2b 100644
--- a/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
@@ -196,6 +196,9 @@ The current presentation contains no OLE objects.</value>
<prop oor:name="STR_FILESIZESEPARATOR">
<value xml:lang="en-US">.</value>
</prop>
+ <prop oor:name="STR_FILENAME_SUFFIX">
+ <value xml:lang="en-US">(minimized)</value>
+ </prop>
</node>
<node oor:name="LastUsedSettings">
<prop oor:name="Name">
diff --git a/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs b/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
index 5a9758139b1f..f57c1ad42837 100644
--- a/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
@@ -361,6 +361,10 @@ The current presentation contains no OLE objects.</value>
<info><desc>String STR_FILESIZESEPARATOR.</desc></info>
<value>.</value>
</prop>
+ <prop oor:name="STR_FILENAME_SUFFIX" oor:type="xs:string" oor:localized="true">
+ <info><desc>String STR_FILENAME_SUFFIX.</desc></info>
+ <value>(minimized)</value>
+ </prop>
</group>
<node-ref oor:name="LastUsedSettings" oor:node-type="OptimizerSettings">
<info>
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index 17eb90630715..9185f8e4f327 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -508,12 +508,15 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent )
if ( xStorable.is() && xStorable->hasLocation() )
{
INetURLObject aURLObj( xStorable->getLocation() );
- if ( !aURLObj.hasFinalSlash() &&
- aURLObj.setExtension( "mini", INetURLObject::LAST_SEGMENT, false ) ) {
+ if ( !aURLObj.hasFinalSlash() ) {
// tdf#105382 uri-decode file name
+ aURLObj.removeExtension(INetURLObject::LAST_SEGMENT, false);
auto aName( aURLObj.getName( INetURLObject::LAST_SEGMENT,
false,
INetURLObject::DecodeMechanism::WithCharset ) );
+ // Add "(minimized)"
+ aName += " ";
+ aName += mrOptimizerDialog.getString(STR_FILENAME_SUFFIX);
aFileOpenDialog.setDefaultName( aName );
}
}
diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx
index 8ad7bba53ce1..5470811249d5 100644
--- a/sdext/source/minimizer/pppoptimizertoken.cxx
+++ b/sdext/source/minimizer/pppoptimizertoken.cxx
@@ -152,6 +152,8 @@ static const TokenTable pTokenTableArray[] =
{ "STR_OPTIMIZING_GRAPHICS", STR_OPTIMIZING_GRAPHICS },
{ "STR_CREATING_OLE_REPLACEMENTS",STR_CREATING_OLE_REPLACEMENTS },
{ "STR_FileSizeSeparator", STR_FILESIZESEPARATOR },
+ { "STR_FILENAME_SUFFIX", STR_FILENAME_SUFFIX },
+
{ "NotFound", TK_NotFound }
};
diff --git a/sdext/source/minimizer/pppoptimizertoken.hxx b/sdext/source/minimizer/pppoptimizertoken.hxx
index e458da0d3181..a72afd3ef83d 100644
--- a/sdext/source/minimizer/pppoptimizertoken.hxx
+++ b/sdext/source/minimizer/pppoptimizertoken.hxx
@@ -135,6 +135,7 @@ enum PPPOptimizerTokenEnum
STR_OPTIMIZING_GRAPHICS,
STR_CREATING_OLE_REPLACEMENTS,
STR_FILESIZESEPARATOR,
+ STR_FILENAME_SUFFIX,
TK_NotFound
};
More information about the Libreoffice-commits
mailing list