ooo-build r13455 - in trunk: . patches/dev300



Author: kyoshida
Date: Fri Aug  1 03:49:32 2008
New Revision: 13455
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13455&view=rev

Log:
2008-07-31  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/chart-subtitle-xls-export.diff: preserve the subtitle
	of a chart when exporting to an xls file (n#411855, i#92357).

	* patches/dev300/apply: apply the new file, and added issue numbers to
	several of my patches.


Added:
   trunk/patches/dev300/chart-subtitle-xls-export.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Aug  1 03:49:32 2008
@@ -17,7 +17,7 @@
 	 Layout, VBABits, VBAObjects, CalcErrors, Store, CJK, GCJ, Lwp, \
 	 OOXML, SVGImport, AutoCorrectCapsLock, UnitTesting, \
 	 CalcDataPilotDrillDown, PopupRemoval, LinkWarningDlg, RadioButtons, InternalCairo, \
-	 FedoraCommonFixes, InternalMesaHeaders, LayoutDialogs
+	 FedoraCommonFixes, InternalMesaHeaders
 
 LinuxCommon : Common, Defaults, TangoIcons, FontConfigTemporaryHacks, \
 	      FedoraLinuxOnlyFixes, LinuxOnly, SystemBits, \
@@ -1790,7 +1790,7 @@
 # Support several different formula syntax, and add a formula syntax
 # configuration option in the Options page.
 
-sc-formula-syntax-ui.diff, n#358558, kohei
+sc-formula-syntax-ui.diff, n#358558, i#72191, kohei
 
 [ CalcFixes < dev300-m24 ]
 # allow special characters in a sheet name.
@@ -1812,7 +1812,7 @@
 sc-sort-cell-note-position.diff, i#59745, kohei
 
 # Make the formula separators changeable per locale setting.
-calc-formula-variable-separators-sc.diff, kohei
+calc-formula-variable-separators-sc.diff, i#92056, kohei
 
 # Fix parse failure on non-ASCII sheet names in Excel A1 and R1C1 modes.
 calc-xls-parser-sheet-name-fix-sc.diff, n#407807, kohei
@@ -1820,6 +1820,10 @@
 # Keep the datapilot dialog open when table insertion fails.
 calc-datapilot-cells-not-empty.diff, n#408934, kohei
 
+# Squeeze chart's subtitle into the 2nd line of the main title when exporting
+# to xls.
+chart-subtitle-xls-export.diff, i#92357, kohei
+
 #[ OOXSTLport5 ]
 #
 ## oox devs, please reconsider operator[] use,
@@ -2153,7 +2157,7 @@
 cws-layoutdialogs-sw.diff
 cws-layoutdialogs-toolkit.diff
 cws-layoutdialogs-toolkit-remove-paragraph.diff
-cws-layoutdialogs-transex3.diff
+#cws-layoutdialogs-transex3.diff
 
 [ LayoutDialogs ]
 # make it build with dev300-m19 - Janneke, please check :-)

Added: trunk/patches/dev300/chart-subtitle-xls-export.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/chart-subtitle-xls-export.diff	Fri Aug  1 03:49:32 2008
@@ -0,0 +1,126 @@
+diff --git sc/source/filter/excel/xechart.cxx sc/source/filter/excel/xechart.cxx
+index 368627f..f04d57a 100644
+--- sc/source/filter/excel/xechart.cxx
++++ sc/source/filter/excel/xechart.cxx
+@@ -35,6 +35,7 @@
+ 
+ #include <com/sun/star/i18n/XBreakIterator.hpp>
+ #include <com/sun/star/i18n/ScriptType.hpp>
++#include <com/sun/star/chart/XChartDocument.hpp>
+ #include <com/sun/star/chart2/XChartDocument.hpp>
+ #include <com/sun/star/chart2/XDiagram.hpp>
+ #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+@@ -784,6 +785,13 @@ void XclExpChSourceLink::ConvertNumFmt( const ScfPropertySet& rPropSet, bool bPe
+     }
+ }
+ 
++void XclExpChSourceLink::AppendString( const String& rStr )
++{
++    if (!mxString.is())
++        return;
++    XclExpStringHelper::AppendString( *mxString, GetRoot(), rStr );
++}
++
+ void XclExpChSourceLink::Save( XclExpStream& rStrm )
+ {
+     // CHFORMATRUNS record
+@@ -885,7 +893,7 @@ void XclExpChText::SetRotation( sal_uInt16 nRotation )
+     ::insert_value( maData.mnFlags, XclTools::GetXclOrientFromRot( nRotation ), 8, 3 );
+ }
+ 
+-void XclExpChText::ConvertTitle( Reference< XTitle > xTitle, sal_uInt16 nTarget )
++void XclExpChText::ConvertTitle( Reference< XTitle > xTitle, sal_uInt16 nTarget, const String* pSubTitle )
+ {
+     mxSrcLink.reset();
+     mxObjLink.reset( new XclExpChObjectLink( nTarget, XclChDataPointPos( 0, 0 ) ) );
+@@ -899,6 +907,14 @@ void XclExpChText::ConvertTitle( Reference< XTitle > xTitle, sal_uInt16 nTarget
+         // string sequence
+         mxSrcLink.reset( new XclExpChSourceLink( GetChRoot(), EXC_CHSRCLINK_TITLE ) );
+         sal_uInt16 nFontIdx = mxSrcLink->ConvertStringSequence( xTitle->getText() );
++        if (pSubTitle)
++        {
++            // append subtitle as the 2nd line of the title.
++            String aSubTitle = String::CreateFromAscii("\n");
++            aSubTitle.Append(*pSubTitle);
++            mxSrcLink->AppendString(aSubTitle);
++        }
++
+         ConvertFontBase( GetChRoot(), nFontIdx );
+ 
+         // rotation
+@@ -1048,14 +1064,15 @@ void XclExpChText::WriteBody( XclExpStream& rStrm )
+ namespace {
+ 
+ /** Creates and returns an Excel text object from the passed title. */
+-XclExpChTextRef lclCreateTitle( const XclExpChRoot& rRoot, Reference< XTitled > xTitled, sal_uInt16 nTarget )
++XclExpChTextRef lclCreateTitle( const XclExpChRoot& rRoot, Reference< XTitled > xTitled, sal_uInt16 nTarget,
++                                const String* pSubTitle = NULL )
+ {
+     Reference< XTitle > xTitle;
+     if( xTitled.is() )
+         xTitle = xTitled->getTitleObject();
+ 
+     XclExpChTextRef xText( new XclExpChText( rRoot ) );
+-    xText->ConvertTitle( xTitle, nTarget );
++    xText->ConvertTitle( xTitle, nTarget, pSubTitle );
+     /*  Do not delete the CHTEXT group for the main title. A missing CHTEXT
+         will be interpreted as auto-generated title showing the series title in
+         charts that contain exactly one data series. */
+@@ -2614,6 +2631,23 @@ void XclExpChAxesSet::WriteBody( XclExpStream& rStrm )
+ 
+ // The chart object ===========================================================
+ 
++static void lcl_getChartSubTitle(const Reference<XChartDocument>& xChartDoc, 
++                                 String& rSubTitle)
++{
++    Reference< ::com::sun::star::chart::XChartDocument > xChartDoc1(xChartDoc, UNO_QUERY);
++    if (!xChartDoc1.is())
++        return;
++
++    Reference< XPropertySet > xProp(xChartDoc1->getSubTitle(), UNO_QUERY);
++    if (!xProp.is())
++        return;
++
++    OUString aTitle;
++    Any any = xProp->getPropertyValue( OUString::createFromAscii("String") );
++    if (any >>= aTitle)
++        rSubTitle = aTitle;
++}
++
+ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
+         Reference< XChartDocument > xChartDoc, const Size& rSize ) :
+     XclExpChGroupBase( EXC_ID_CHCHART, 16 ),
+@@ -2645,7 +2679,10 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
+ 
+         // chart title
+         Reference< XTitled > xTitled( xChartDoc, UNO_QUERY );
+-        mxTitle = lclCreateTitle( GetChRoot(), xTitled, EXC_CHOBJLINK_TITLE );
++        String aSubTitle;
++        lcl_getChartSubTitle(xChartDoc, aSubTitle);
++        mxTitle = lclCreateTitle( GetChRoot(), xTitled, EXC_CHOBJLINK_TITLE, 
++                                  aSubTitle.Len() ? &aSubTitle : NULL );
+ 
+         // diagrams (axes sets)
+         Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
+diff --git sc/source/filter/inc/xechart.hxx sc/source/filter/inc/xechart.hxx
+index 7e4b4df..6ad5595 100644
+--- sc/source/filter/inc/xechart.hxx
++++ sc/source/filter/inc/xechart.hxx
+@@ -348,6 +348,8 @@ public:
+     /** Converts the number format from the passed property set. */
+     void                ConvertNumFmt( const ScfPropertySet& rPropSet, bool bPercent );
+ 
++    void                AppendString( const String& rStr );
++
+     /** Returns true, if this source link contains explicit string data. */
+     inline bool         HasString() const { return mxString.is() && !mxString->IsEmpty(); }
+ 
+@@ -436,7 +438,7 @@ public:
+     virtual void        SetRotation( sal_uInt16 nRotation );
+ 
+     /** Converts all text settings of the passed title text object. */
+-    void                ConvertTitle( XTitleRef xTitle, sal_uInt16 nTarget );
++    void                ConvertTitle( XTitleRef xTitle, sal_uInt16 nTarget, const String* pSubTitle = NULL );
+     /** Converts all text settings of the passed legend. */
+     void                ConvertLegend( const ScfPropertySet& rPropSet );
+     /** Converts all settings of the passed data point caption text object. */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]