rpms/openoffice.org/devel openoffice.org-2.4.0.ooo85854.sw.graphicsaveas.patch, NONE, 1.1 openoffice.org.spec, 1.1414, 1.1415
Caolan McNamara (caolanm)
fedora-extras-commits at redhat.com
Mon Feb 4 11:03:59 UTC 2008
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23188
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-2.4.0.ooo85854.sw.graphicsaveas.patch
Log Message:
next version
openoffice.org-2.4.0.ooo85854.sw.graphicsaveas.patch:
--- NEW FILE openoffice.org-2.4.0.ooo85854.sw.graphicsaveas.patch ---
Index: inc/cmdid.h
===================================================================
RCS file: /cvs/sw/sw/inc/cmdid.h,v
retrieving revision 1.74
diff -u -r1.74 cmdid.h
--- openoffice.org.orig/sw/inc/cmdid.h 22 Nov 2007 15:27:06 -0000 1.74
+++ openoffice.org/sw/inc/cmdid.h 4 Feb 2008 10:39:43 -0000
@@ -716,6 +716,8 @@
#define FN_FORMAT_APPLY_TEXTBODY (FN_FORMAT2 + 158)
#define FN_REMOVE_DIRECT_CHAR_FORMATS (FN_FORMAT2 + 159)
+#define FN_SAVE_GRAFIC (FN_FORMAT2 + 160) /* Grafik Save*/
+
/*--------------------------------------------------------------------
Bereich: Extras
--------------------------------------------------------------------*/
Index: inc/docsh.hxx
===================================================================
RCS file: /cvs/sw/sw/inc/docsh.hxx,v
retrieving revision 1.43
diff -u -r1.43 docsh.hxx
--- openoffice.org.orig/sw/inc/docsh.hxx 22 Oct 2007 15:04:33 -0000 1.43
+++ openoffice.org/sw/inc/docsh.hxx 4 Feb 2008 10:39:59 -0000
@@ -312,4 +312,7 @@
GetController();
};
+class Graphic;
+String ExportGraphic( const Graphic &rGraphic, const String &rGrfName, const String &rName );
+
#endif
Index: sdi/_grfsh.sdi
===================================================================
RCS file: /cvs/sw/sw/sdi/_grfsh.sdi,v
retrieving revision 1.7
diff -u -r1.7 _grfsh.sdi
--- openoffice.org.orig/sw/sdi/_grfsh.sdi 2 May 2006 15:14:44 -0000 1.7
+++ openoffice.org/sw/sdi/_grfsh.sdi 4 Feb 2008 10:40:25 -0000
@@ -59,6 +59,13 @@
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ FN_SAVE_GRAFIC // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
SID_INSERT_GRAPHIC // zeigt auf FN_FORMAT_GRAFIC_DLG
[
ExecMethod = Execute ;
Index: sdi/swriter.sdi
===================================================================
RCS file: /cvs/sw/sw/sdi/swriter.sdi,v
retrieving revision 1.67.48.1
diff -u -r1.67.48.1 swriter.sdi
--- openoffice.org.orig/sw/sdi/swriter.sdi 2 Jan 2008 15:13:56 -0000 1.67.48.1
+++ openoffice.org/sw/sdi/swriter.sdi 4 Feb 2008 10:40:50 -0000
@@ -3437,7 +3437,30 @@
ToolBoxConfig = TRUE,
GroupId = GID_GRAPHIC;
]
+//--------------------------------------------------------------------------
+SfxVoidItem SaveGraphic FN_SAVE_GRAFIC
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_GRAPHIC;
+]
//--------------------------------------------------------------------------
SfxVoidItem Grow FN_GROW_FONT_SIZE
()
Index: sdi/swslots.src
===================================================================
RCS file: /cvs/sw/sw/sdi/swslots.src,v
retrieving revision 1.131
diff -u -r1.131 swslots.src
--- openoffice.org.orig/sw/sdi/swslots.src 27 Jun 2007 13:16:20 -0000 1.131
+++ openoffice.org/sw/sdi/swslots.src 4 Feb 2008 10:40:54 -0000
@@ -295,6 +295,10 @@
{
Slotname [ en-US ] = "Frame Properties";
};
+SfxSlotInfo FN_SAVE_GRAFIC
+{
+ Slotname [ en-US ] = "Save Graphics";
+};
SfxSlotInfo FN_FORMAT_GRAFIC_DLG
{
Slotname [ en-US ] = "Edit Graphics";
Index: source/ui/app/mn.src
===================================================================
RCS file: /cvs/sw/sw/source/ui/app/mn.src,v
retrieving revision 1.48
diff -u -r1.48 mn.src
--- openoffice.org.orig/sw/source/ui/app/mn.src 27 Sep 2007 10:17:38 -0000 1.48
+++ openoffice.org/sw/source/ui/app/mn.src 4 Feb 2008 10:46:34 -0000
@@ -862,6 +927,12 @@
HelpID = FN_FORMAT_GRAFIC_DLG ;
Text [ en-US ] = "~Picture..." ;
};
+ MenuItem
+ {
+ Identifier = FN_SAVE_GRAFIC;
+ HelpID = FN_SAVE_GRAFIC;
+ Text [ en-US ] = "Save Graphics..." ;
+ };
MN_FRM_CAPTION_ITEM
MenuItem
{
Index: source/ui/docvw/romenu.cxx
===================================================================
RCS file: /cvs/sw/sw/source/ui/docvw/romenu.cxx,v
retrieving revision 1.21
diff -u -r1.21 romenu.cxx
--- openoffice.org.orig/sw/source/ui/docvw/romenu.cxx 27 Sep 2007 11:40:58 -0000 1.21
+++ openoffice.org/sw/source/ui/docvw/romenu.cxx 4 Feb 2008 10:47:25 -0000
@@ -461,12 +461,12 @@
//nicht const. kann bei naechster
//Aenderung dieses Files mit
//erledigt werden.
-static void lcl_GetPreferedExtension( String &rExt, /*const*/ Graphic &rGrf )
+static void lcl_GetPreferedExtension( String &rExt, const Graphic &rGrf )
{
// dann ggfs. ueber die native-Info der Grafik den "besten"
// Filter vorschlagen
const sal_Char* pExt = "png";
- switch( rGrf.GetLink().GetType() )
+ switch( const_cast<Graphic&>(rGrf).GetLink().GetType() )
{
case GFX_LINK_TYPE_NATIVE_GIF: pExt = "gif"; break;
case GFX_LINK_TYPE_NATIVE_TIF: pExt = "tif"; break;
@@ -479,19 +479,8 @@
rExt.AssignAscii( pExt );
}
-
String SwReadOnlyPopup::SaveGraphic( USHORT nId )
{
- SvtPathOptions aPathOpt;
- String sGrfPath( aPathOpt.GetGraphicPath() );
-
- FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
- Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
-
-// aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
- INetURLObject aPath;
- aPath.SetSmartURL( sGrfPath);
-
//Namen der Grafik herausfischen.
String aName;
if ( MN_READONLY_SAVEBACKGROUND == nId )
@@ -511,6 +500,24 @@
}
else
aName = sGrfName;
+
+ return ExportGraphic( aGraphic, sGrfName, aName );
+}
+
+String ExportGraphic( const Graphic &rGraphic, const String &rGrfName, const String &rName )
+{
+ SvtPathOptions aPathOpt;
+ String sGrfPath( aPathOpt.GetGraphicPath() );
+
+ FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
+ Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
+
+// aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
+ INetURLObject aPath;
+ aPath.SetSmartURL( rName );
+
+ //Namen der Grafik herausfischen.
+ String aName = rGrfName;
INetURLObject aURL;
aURL.SetSmartURL( aName );
aPath.Append( aURL.GetName() );
@@ -522,7 +529,7 @@
String aExt( aURL.GetExtension() );
if( !aExt.Len() )
- lcl_GetPreferedExtension( aExt, aGraphic );
+ lcl_GetPreferedExtension( aExt, rGraphic );
aExt.ToLowerAscii();
USHORT nDfltFilter = USHRT_MAX;
@@ -538,7 +545,7 @@
if ( USHRT_MAX == nDfltFilter )
{
//"falsche" Extension?
- lcl_GetPreferedExtension( aExt, aGraphic );
+ lcl_GetPreferedExtension( aExt, rGraphic );
for ( USHORT i = 0; i < nCount; ++i )
if ( aExt == rGF.GetExportFormatShortName( i ).ToLowerAscii() )
{
@@ -558,11 +565,11 @@
aPath.SetSmartURL( sPath);
sGrfPath = aPath.GetPath();
- if( sGrfName.Len() &&
+ if( rGrfName.Len() &&
nDfltFilter == rGF.GetExportFormatNumber( xFltMgr->getCurrentFilter()))
{
//Versuchen die Originalgrafik zu speichern.
- SfxMedium aIn( sGrfName, STREAM_READ | STREAM_NOCREATE,
+ SfxMedium aIn( rGrfName, STREAM_READ | STREAM_NOCREATE,
TRUE );
if( aIn.GetInStream() && !aIn.GetInStream()->GetError() )
{
@@ -588,13 +595,10 @@
else
nFilter = GRFILTER_FORMAT_DONTKNOW;
String aFilter( rGF.GetExportFormatShortName( nFilter ) );
- XOutBitmap::WriteGraphic( aGraphic, sPath, aFilter,
+ XOutBitmap::WriteGraphic( rGraphic, sPath, aFilter,
XOUTBMP_DONT_EXPAND_FILENAME );
return sPath;
}
}
return aEmptyStr;
}
-
-
-
Index: source/ui/shells/grfsh.cxx
===================================================================
RCS file: /cvs/sw/sw/source/ui/shells/grfsh.cxx,v
retrieving revision 1.28
diff -u -r1.28 grfsh.cxx
--- openoffice.org.orig/sw/source/ui/shells/grfsh.cxx 27 Sep 2007 12:28:24 -0000 1.28
+++ openoffice.org/sw/source/ui/shells/grfsh.cxx 4 Feb 2008 10:48:03 -0000
@@ -192,6 +192,14 @@
USHORT nSlot = rReq.GetSlot();
switch(nSlot)
{
+ case FN_SAVE_GRAFIC:
+ if (const Graphic *pGraphic = rSh.GetGraphic())
+ {
+ String sGrfNm, sFilterNm;
+ rSh.GetGrfNms( &sGrfNm, &sFilterNm );
+ ExportGraphic( *pGraphic, sGrfNm, sGrfNm );
+ }
+ break;
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
{
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1414
retrieving revision 1.1415
diff -u -r1.1414 -r1.1415
--- openoffice.org.spec 2 Feb 2008 11:26:27 -0000 1.1414
+++ openoffice.org.spec 4 Feb 2008 11:03:20 -0000 1.1415
@@ -1,6 +1,6 @@
%define oootag OOH680
-%define ooomilestone 5
-%define rh_rpm_release 2
+%define ooomilestone 6
+%define rh_rpm_release 1
# undef to get english only and no-langpacks for a faster smoketest build
%define langpacks 1
@@ -138,6 +138,7 @@
Patch64: openoffice.org-2.4.0.ooo85448.emptyrpath.patch
Patch65: workspace.cairotext01.patch
Patch66: workspace.gcc430two.patch
+Patch67: openoffice.org-2.4.0.ooo85854.sw.graphicsaveas.patch
%define instdir %{_libdir}/openoffice.org
@@ -1090,6 +1091,7 @@
%patch64 -p1 -b .ooo85448.emptyrpath.patch
%patch65 -p1 -b .workspace.cairotext01.patch
%patch66 -p1 -b .workspace.gcc430two.patch
+%patch67 -p1 -b .ooo85854.sw.graphicsaveas.patch
%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -2856,13 +2858,15 @@
%changelog
-* Fri Feb 01 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-5.2
+* Mon Feb 04 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-6.1
+- next milestone
- Resolves: rhbz#422661 support n-up printing of rotated landscape
slides in a human-expectation direction
- drop integrated openoffice.org-2.4.0.ooo84684.vcl.fixfontconfig.patch
- drop openoffice.org.2.0.3-ooo66018.cppuhelper.dangerousvisibility.patch
now that we have gcc 4.3.0
- add workspace.gcc430two.patch for some newly needed includes
+- add openoffice.org-2.4.0.ooo85854.sw.graphicsaveas.patch for riel
* Mon Jan 28 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-5.1
- next milestone
More information about the fedora-extras-commits
mailing list