Gentoo Archives: gentoo-commits

From: "Andreas HAttel (dilfridge)" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-office/libreoffice/files: libreoffice-4.4.1.2-improve-KDE4FilePicker.patch libreoffice-4.4.1.2-add-kde4-open-url-script.patch
Date: Thu, 26 Feb 2015 20:03:07
Message-Id: 20150226200258.29267129D8@oystercatcher.gentoo.org
1 dilfridge 15/02/26 20:02:58
2
3 Added: libreoffice-4.4.1.2-improve-KDE4FilePicker.patch
4 libreoffice-4.4.1.2-add-kde4-open-url-script.patch
5 Log:
6 Version bump
7
8 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 94BFDF4484AD142F)
9
10 Revision Changes Path
11 1.1 app-office/libreoffice/files/libreoffice-4.4.1.2-improve-KDE4FilePicker.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.4.1.2-improve-KDE4FilePicker.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.4.1.2-improve-KDE4FilePicker.patch?rev=1.1&content-type=text/plain
15
16 Index: libreoffice-4.4.1.2-improve-KDE4FilePicker.patch
17 ===================================================================
18 Merged upstream commits:
19
20 6fc55b9abd783b624241d56e34751ea495adbd7d "KDE4: actually apply file dialog operation mode"
21 b613270a730ace29dd1b16b29be2222b34f34a5d "KDE4: improve default load and save dialog titles"
22
23
24 diff -u b/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
25 --- b/vcl/unx/kde4/KDE4FilePicker.cxx
26 +++ b/vcl/unx/kde4/KDE4FilePicker.cxx
27 @@ -58,6 +58,8 @@
28
29 #include "generic/geninst.h"
30
31 +#include "svids.hrc"
32 +
33 using namespace ::com::sun::star;
34 using namespace ::com::sun::star::ui::dialogs;
35 using namespace ::com::sun::star::ui::dialogs::TemplateDescription;
36 @@ -109,7 +111,6 @@
37
38 KDE4FilePicker::KDE4FilePicker( const uno::Reference<uno::XComponentContext>& )
39 : KDE4FilePicker_Base(_helperMutex)
40 - , _resMgr( ResMgr::CreateResMgr("fps_office") )
41 , allowRemoteUrls( false )
42 {
43 _extraControls = new QWidget();
44 @@ -128,8 +129,7 @@
45 #endif
46
47 setMultiSelectionMode( false );
48 - //default mode
49 - _dialog->setOperationMode(KFileDialog::Opening);
50 + _dialog->setConfirmOverwrite( true );
51
52 // XExecutableDialog functions
53 connect( this, SIGNAL( setTitleSignal( const OUString & ) ),
54 @@ -202,7 +202,6 @@
55 SalYieldMutexReleaser aReleaser;
56 return Q_EMIT cleanupProxySignal();
57 }
58 - delete _resMgr;
59 delete _dialog;
60 }
61
62 @@ -524,6 +523,24 @@
63 return toOUString(label);
64 }
65
66 +QString KDE4FilePicker::getResString( sal_Int16 aRedId )
67 +{
68 + QString aResString;
69 +
70 + if( aRedId < 0 )
71 + return aResString;
72 +
73 + try
74 + {
75 + aResString = toQString(ResId(aRedId, *ImplGetResMgr()).toString());
76 + }
77 + catch(...)
78 + {
79 + }
80 +
81 + return aResString.replace('~', '&');
82 +}
83 +
84 void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
85 {
86 QWidget* widget = 0;
87 @@ -532,37 +549,37 @@
88 switch (controlId)
89 {
90 case CHECKBOX_AUTOEXTENSION:
91 - resId = STR_SVT_FILEPICKER_AUTO_EXTENSION;
92 + resId = STR_FPICKER_AUTO_EXTENSION;
93 break;
94 case CHECKBOX_PASSWORD:
95 - resId = STR_SVT_FILEPICKER_PASSWORD;
96 + resId = STR_FPICKER_PASSWORD;
97 break;
98 case CHECKBOX_FILTEROPTIONS:
99 - resId = STR_SVT_FILEPICKER_FILTER_OPTIONS;
100 + resId = STR_FPICKER_FILTER_OPTIONS;
101 break;
102 case CHECKBOX_READONLY:
103 - resId = STR_SVT_FILEPICKER_READONLY;
104 + resId = STR_FPICKER_READONLY;
105 break;
106 case CHECKBOX_LINK:
107 - resId = STR_SVT_FILEPICKER_INSERT_AS_LINK;
108 + resId = STR_FPICKER_INSERT_AS_LINK;
109 break;
110 case CHECKBOX_PREVIEW:
111 - resId = STR_SVT_FILEPICKER_SHOW_PREVIEW;
112 + resId = STR_FPICKER_SHOW_PREVIEW;
113 break;
114 case CHECKBOX_SELECTION:
115 - resId = STR_SVT_FILEPICKER_SELECTION;
116 + resId = STR_FPICKER_SELECTION;
117 break;
118 case PUSHBUTTON_PLAY:
119 - resId = STR_SVT_FILEPICKER_PLAY;
120 + resId = STR_FPICKER_PLAY;
121 break;
122 case LISTBOX_VERSION:
123 - resId = STR_SVT_FILEPICKER_VERSION;
124 + resId = STR_FPICKER_VERSION;
125 break;
126 case LISTBOX_TEMPLATE:
127 - resId = STR_SVT_FILEPICKER_TEMPLATES;
128 + resId = STR_FPICKER_TEMPLATES;
129 break;
130 case LISTBOX_IMAGE_TEMPLATE:
131 - resId = STR_SVT_FILEPICKER_IMAGE_TEMPLATE;
132 + resId = STR_FPICKER_IMAGE_TEMPLATE;
133 break;
134 case LISTBOX_VERSION_LABEL:
135 case LISTBOX_TEMPLATE_LABEL:
136 @@ -581,16 +598,7 @@
137 case CHECKBOX_PREVIEW:
138 case CHECKBOX_SELECTION:
139 {
140 - QString label;
141 -
142 - if (_resMgr && resId != -1)
143 - {
144 - OUString s(ResId(resId, *_resMgr).toString());
145 - label = toQString(s);
146 - label.replace("~", "&");
147 - }
148 -
149 - widget = new QCheckBox(label, _extraControls);
150 + widget = new QCheckBox(getResString(resId), _extraControls);
151
152 // the checkbox is created even for CHECKBOX_AUTOEXTENSION to simplify
153 // code, but the checkbox is hidden and ignored
154 @@ -719,8 +727,22 @@
155 1 );
156 }
157
158 - _dialog->setOperationMode(operationMode);
159 - _dialog->setConfirmOverwrite(true);
160 + _dialog->setOperationMode( operationMode );
161 +
162 + sal_Int16 resId = -1;
163 + switch (_dialog->operationMode())
164 + {
165 + case KFileDialog::Opening:
166 + resId = STR_FPICKER_OPEN;
167 + break;
168 + case KFileDialog::Saving:
169 + resId = STR_FPICKER_SAVE;
170 + break;
171 + default:
172 + break;
173 + }
174 +
175 + _dialog->setCaption(getResString(resId));
176 }
177
178 void SAL_CALL KDE4FilePicker::cancel()
179 only in patch2:
180 unchanged:
181 --- a/vcl/unx/kde4/KDE4FilePicker.hxx
182 +++ b/vcl/unx/kde4/KDE4FilePicker.hxx
183 @@ -41,8 +41,6 @@ class KFileDialog;
184 class QWidget;
185 class QLayout;
186
187 -class ResMgr;
188 -
189 typedef ::cppu::WeakComponentImplHelper5
190 < ::com::sun::star::ui::dialogs::XFilePicker2
191 , ::com::sun::star::ui::dialogs::XFilePicker3
192 @@ -61,8 +59,6 @@ protected:
193
194 ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener > m_xListener;
195
196 - ResMgr *_resMgr;
197 -
198 //the dialog to display
199 KFileDialog* _dialog;
200
201 @@ -225,6 +221,8 @@ private:
202 //add a custom control widget to the file dialog
203 void addCustomControl(sal_Int16 controlId);
204
205 + QString getResString( sal_Int16 aRedId );
206 +
207 private Q_SLOTS:
208 void cleanupProxy();
209 void checkProtocol();
210
211
212
213 1.1 app-office/libreoffice/files/libreoffice-4.4.1.2-add-kde4-open-url-script.patch
214
215 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.4.1.2-add-kde4-open-url-script.patch?rev=1.1&view=markup
216 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.4.1.2-add-kde4-open-url-script.patch?rev=1.1&content-type=text/plain
217
218 Index: libreoffice-4.4.1.2-add-kde4-open-url-script.patch
219 ===================================================================
220 From f7db2461292be3e23f5b3af47e488eaa8105d8db Mon Sep 17 00:00:00 2001
221 From: Jan-Marek Glogowski <glogow@×××××××.de>
222 Date: Wed, 26 Nov 2014 13:35:42 +0100
223 Subject: Add kde4-open-url script
224
225 Adds a KDE4 specific URL processing script.
226
227 Change-Id: I0116fa95f076a5772e88c616e93de542fe4fe4e4
228
229 diff --git a/shell/Package_scripts_kde.mk b/shell/Package_scripts_kde.mk
230 index c5e4978..162bcc5 100644
231 --- a/shell/Package_scripts_kde.mk
232 +++ b/shell/Package_scripts_kde.mk
233 @@ -9,6 +9,12 @@
234
235 $(eval $(call gb_Package_Package,shell_scripts_kde,$(SRCDIR)/shell/source/unix/misc))
236
237 +ifeq ($(ENABLE_KDE),TRUE)
238 $(eval $(call gb_Package_add_file,shell_scripts_kde,$(LIBO_BIN_FOLDER)/kde-open-url,kde-open-url.sh))
239 +endif
240 +
241 +ifeq ($(ENABLE_KDE4),TRUE)
242 +$(eval $(call gb_Package_add_file,shell_scripts_kde,$(LIBO_BIN_FOLDER)/kde4-open-url,kde4-open-url.sh))
243 +endif
244
245 # vim: set shiftwidth=4 tabstop=4 noexpandtab:
246 diff --git a/shell/source/unix/misc/kde4-open-url.sh b/shell/source/unix/misc/kde4-open-url.sh
247 new file mode 100755
248 index 0000000..e5b8125
249 --- /dev/null
250 +++ b/shell/source/unix/misc/kde4-open-url.sh
251 @@ -0,0 +1,22 @@
252 +#!/bin/sh
253 +#
254 +# This file is part of the LibreOffice project.
255 +#
256 +# This Source Code Form is subject to the terms of the Mozilla Public
257 +# License, v. 2.0. If a copy of the MPL was not distributed with this
258 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
259 +#
260 +# This file incorporates work covered by the following license notice:
261 +#
262 +# Licensed to the Apache Software Foundation (ASF) under one or more
263 +# contributor license agreements. See the NOTICE file distributed
264 +# with this work for additional information regarding copyright
265 +# ownership. The ASF licenses this file to you under the Apache
266 +# License, Version 2.0 (the "License"); you may not use this file
267 +# except in compliance with the License. You may obtain a copy of
268 +# the License at http://www.apache.org/licenses/LICENSE-2.0 .
269 +#
270 +
271 +# use kde-open or xdg-open if available, falling back to our own open-url
272 +kde-open "$1" 2>/dev/null || xdg-open "$1" 2>/dev/null || `dirname "$0"`/open-url "$1" 2>/dev/null
273 +exit 0
274 --
275 cgit v0.10.2