[Libreoffice-commits] .: 4 commits - sc/inc sc/source

2013-01-04 Thread Libreoffice Gerrit user
 sc/inc/dpglobal.hxx  |2 
 sc/inc/dptabres.hxx  |   87 +-
 sc/inc/dptabsrc.hxx  |   14 -
 sc/source/core/data/dptabres.cxx |  200 +++-
 sc/source/core/data/dptabsrc.cxx |  325 ---
 5 files changed, 319 insertions(+), 309 deletions(-)

New commits:
commit b53d03f4c970f13f9849c01f1d0b6ad42185148d
Author: Kohei Yoshida 
Date:   Fri Jan 4 02:31:26 2013 -0500

Remove the last use of SC_DP_MAX_FIELDS.

Now the pivot table core no longer uses static array for result data
storage.

Change-Id: I70a44011e2c12a1739c0507b1723c21a4808758c

diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index 4096a57..fe94b32 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -20,8 +20,6 @@
 #ifndef _SC_DPGLOBAL_HXX
 #define _SC_DPGLOBAL_HXX
 
-#define SC_DP_MAX_FIELDS  256
-
 #define PIVOT_MAXFUNC   11
 #define PIVOT_FUNC_NONE 0x
 #define PIVOT_FUNC_SUM  0x0001
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index 11888dd..1aefebc 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -98,14 +98,12 @@ private:
 ScDPTableData*  pData;  // data source (ScDPObject 
manages its life time)
 ScDPDimensions* pDimensions;// api objects
 // settings:
-longnColDims[SC_DP_MAX_FIELDS];
-longnRowDims[SC_DP_MAX_FIELDS];
-longnDataDims[SC_DP_MAX_FIELDS];
-longnPageDims[SC_DP_MAX_FIELDS];
-longnColDimCount;
-longnRowDimCount;
-longnDataDimCount;
-longnPageDimCount;
+
+std::vector maColDims;
+std::vector maRowDims;
+std::vector maDataDims;
+std::vector maPageDims;
+
 boolbColumnGrand;
 boolbRowGrand;
 boolbIgnoreEmptyRows;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 6b46671..87800c3 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -109,10 +109,6 @@ static void lcl_SetBoolInAny( uno::Any& rAny, sal_Bool 
bValue )
 ScDPSource::ScDPSource( ScDPTableData* pD ) :
 pData( pD ),
 pDimensions( NULL ),
-nColDimCount( 0 ),
-nRowDimCount( 0 ),
-nDataDimCount( 0 ),
-nPageDimCount( 0 ),
 bColumnGrand( true ),   // default is true
 bRowGrand( true ),
 bIgnoreEmptyRows( false ),
@@ -152,33 +148,32 @@ const ::rtl::OUString* ScDPSource::GetGrandTotalName() 
const
 
 sal_uInt16 ScDPSource::GetOrientation(long nColumn)
 {
-long i;
-for (i=0; i= nDataDimCount)
+if (nIndex < 0 || static_cast(nIndex) >= maDataDims.size())
 return NULL;
 
-long nDimIndex = nDataDims[nIndex];
+long nDimIndex = maDataDims[nIndex];
 return GetDimensionsObject()->getByIndex(nDimIndex);
 }
 
@@ -193,92 +188,107 @@ rtl::OUString ScDPSource::GetDataDimName(long nIndex)
 
 long ScDPSource::GetPosition(long nColumn)
 {
-long i;
-for (i=0; i::const_iterator it, itBeg = maColDims.begin(), itEnd = 
maColDims.end();
+it = std::find(itBeg, itEnd, nColumn);
+if (it != itEnd)
+return std::distance(itBeg, it);
+
+itBeg = maRowDims.begin();
+itEnd = maRowDims.end();
+it = std::find(itBeg, itEnd, nColumn);
+if (it != itEnd)
+return std::distance(itBeg, it);
+
+itBeg = maDataDims.begin();
+itEnd = maDataDims.end();
+it = std::find(itBeg, itEnd, nColumn);
+if (it != itEnd)
+return std::distance(itBeg, it);
+
+itBeg = maPageDims.begin();
+itEnd = maPageDims.end();
+it = std::find(itBeg, itEnd, nColumn);
+if (it != itEnd)
+return std::distance(itBeg, it);
+
 return 0;
 }
 
-static sal_Bool lcl_TestSubTotal( sal_Bool& rAllowed, long nColumn, long* 
pArray, long nCount, ScDPSource* pSource )
+namespace {
+
+bool testSubTotal( bool& rAllowed, long nColumn, const std::vector& 
rDims, ScDPSource* pSource )
 {
-for (long i=0; i::const_iterator it = rDims.begin(), itEnd = rDims.end();
+for (; it != itEnd; ++it)
+{
+if (*it != nColumn)
+continue;
+
+if ( pSource->IsDataLayoutDimension(nColumn) )
 {
 //  no subtotals for data layout dim, no matter where
-if ( pSource->IsDataLayoutDimension(nColumn) )
-rAllowed = false;
-else
-{
-//  no subtotals if no other dim but data layout follows
-long nNextIndex = i+1;
-if ( nNextIndex < nCount && 
pSource->IsDataLayoutDimension(pArray[nNextIndex]) )
-++nNextIndex;
-if ( nNextIndex >= nCount )
-rAllowed = false;
-}
-
-return sal_True;   

[Libreoffice-commits] .: 4 commits - sc/inc sc/source sw/Module_sw.mk

2012-12-04 Thread Libreoffice Gerrit user
 sc/inc/orcusfilters.hxx   |1 -
 sc/inc/rangelst.hxx   |2 +-
 sc/source/core/data/conditio.cxx  |6 +-
 sc/source/core/tool/rangelst.cxx  |8 +++-
 sc/source/ui/condformat/condformatdlg.cxx |2 +-
 sw/Module_sw.mk   |1 -
 6 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 7c63d52506b66563eefcf29c803b23bb9b812491
Author: Markus Mohrhard 
Date:   Wed Dec 5 02:40:44 2012 +0100

remove unused parameter

Change-Id: Ica799b8a036a3055ea50ecc90ca85acc1ec51f21

diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index 4f23ee9..06cebec 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -41,7 +41,7 @@ public:
 sal_uInt16 Parse( const String&, ScDocument* = NULL,
   sal_uInt16 nMask = SCA_VALID,
   formula::FormulaGrammar::AddressConvention eConv = 
formula::FormulaGrammar::CONV_OOO,
-  SCTAB nDefaultTab = 0, sal_Unicode cDelimiter = 0 );
+  SCTAB nDefaultTab = 0 );
 
 voidFormat( String&, sal_uInt16 nFlags = 0, ScDocument* = NULL,
 formula::FormulaGrammar::AddressConvention eConv = 
formula::FormulaGrammar::CONV_OOO,
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index a631a1a..bd93b7c 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -185,12 +185,11 @@ ScRangeList::~ScRangeList()
 
 sal_uInt16 ScRangeList::Parse( const String& rStr, ScDocument* pDoc, 
sal_uInt16 nMask,
formula::FormulaGrammar::AddressConvention eConv,
-   SCTAB nDefaultTab, sal_Unicode cDelimiter )
+   SCTAB nDefaultTab )
 {
 if ( rStr.Len() )
 {
-if (!cDelimiter)
-cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
+sal_Unicode cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
 
 nMask |= SCA_VALID; // falls das jemand vergessen sollte
 sal_uInt16 nResult = (sal_uInt16)~0;// alle Bits setzen
commit 4b586bd622c94e617075f4e176087584ae5fe47d
Author: Markus Mohrhard 
Date:   Wed Dec 5 02:25:50 2012 +0100

correctly parse range in cond format dlg

Change-Id: I92d19cd71f7f1c9e90b2d3039a5c3c6a0143d1c7

diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index 73270bc..4f23ee9 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -41,7 +41,7 @@ public:
 sal_uInt16 Parse( const String&, ScDocument* = NULL,
   sal_uInt16 nMask = SCA_VALID,
   formula::FormulaGrammar::AddressConvention eConv = 
formula::FormulaGrammar::CONV_OOO,
-  sal_Unicode cDelimiter = 0 );
+  SCTAB nDefaultTab = 0, sal_Unicode cDelimiter = 0 );
 
 voidFormat( String&, sal_uInt16 nFlags = 0, ScDocument* = NULL,
 formula::FormulaGrammar::AddressConvention eConv = 
formula::FormulaGrammar::CONV_OOO,
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index c22a1e6..a631a1a 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -185,7 +185,7 @@ ScRangeList::~ScRangeList()
 
 sal_uInt16 ScRangeList::Parse( const String& rStr, ScDocument* pDoc, 
sal_uInt16 nMask,
formula::FormulaGrammar::AddressConvention eConv,
-   sal_Unicode cDelimiter )
+   SCTAB nDefaultTab, sal_Unicode cDelimiter )
 {
 if ( rStr.Len() )
 {
@@ -199,8 +199,7 @@ sal_uInt16 ScRangeList::Parse( const String& rStr, 
ScDocument* pDoc, sal_uInt16
 SCTAB nTab = 0;
 if ( pDoc )
 {
-//! erste markierte Tabelle gibts nicht mehr am Dokument
-//! -> uebergeben? oder spaeter an den Ranges setzen
+nTab = nDefaultTab;
 }
 else
 nTab = 0;
diff --git a/sc/source/ui/condformat/condformatdlg.cxx 
b/sc/source/ui/condformat/condformatdlg.cxx
index 15ffd57..3398188 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -456,7 +456,7 @@ ScConditionalFormat* 
ScCondFormatDlg::GetConditionalFormat() const
 {
 rtl::OUString aRangeStr = maEdRange.GetText();
 ScRangeList aRange;
-sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpDoc, SCA_VALID, 
mpDoc->GetAddressConvention());
+sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpDoc, SCA_VALID, 
mpDoc->GetAddressConvention(), maPos.Tab());
 ScConditionalFormat* pFormat = maCondFormList.GetConditionalFormat();
 
 if(nFlags & SCA_VALID && !aRange.empty() && pFormat)
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 6abd321..bec0bde 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -38,7 +38,6 @@ $(eval $(call gb_Module_add_targets,sw,\
 endif
 
 $(ev

Re: [Libreoffice-commits] .: 4 commits - sc/inc sc/source tools/inc vcl/inc vcl/source

2012-12-03 Thread Lubos Lunak
On Monday 03 of December 2012, Libreoffice Gerrit user wrote:
>--- commit c65e7ce3897fd9f9524e23039d39fad6d52fca28
> Author: Markus Mohrhard 
> Date:   Mon Dec 3 00:46:02 2012 +0100
>
> remove debug output

 Note that SAL_DEBUG in fact works fine even in non-debug builds, so there's 
no need for this.

>
> Change-Id: I48b549ab93dc3b937e00f6f35185a6c1c4327bcc
>
> diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
> index 0e05389..3e3319c 100644
> --- a/sc/source/ui/view/gridwin.cxx
> +++ b/sc/source/ui/view/gridwin.cxx
> @@ -1727,7 +1727,6 @@ bool ScGridWindow::TestMouse( const MouseEvent&
> rMEvt, bool bAction )
>
>  void ScGridWindow::MouseButtonDown( const MouseEvent& rMEvt )
>  {
> -std::cout << "MouseButtonDown" << std::endl;
>  nNestedButtonState = SC_NESTEDBUTTON_DOWN;
>
>  HandleMouseButtonDown( rMEvt );
> @@ -2043,7 +2042,6 @@ void ScGridWindow::HandleMouseButtonDown( const
> MouseEvent& rMEvt )
>
>  void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
>  {
> -std::cout << "MouseButtonUp" << std::endl;
>  aCurMousePos = rMEvt.GetPosPixel();
>  ScDocument* pDoc = pViewData->GetDocument();
>  ScMarkData& rMark = pViewData->GetMarkData();
> @@ -2472,14 +2470,8 @@ void ScGridWindow::FakeButtonUp()
>  }
>  }
>
> -#include 
> -
>  void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
>  {
> -fprintf( stderr, "MouseMove: %s %d %d %d\n",
> -rMEvt.IsSynthetic() ? "synthetic" : "real",
> -rMEvt.GetMode(), rMEvt.GetModifier(), rMEvt.GetButtons() );
> -
>  aCurMousePos = rMEvt.GetPosPixel();
>
>  if ( rMEvt.IsLeaveWindow() && pNoteMarker &&

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: 4 commits - sc/inc sc/source tools/inc vcl/inc vcl/source

2012-12-02 Thread Libreoffice Gerrit user
 sc/inc/scmod.hxx  |7 ++
 sc/source/ui/app/scdll.cxx|3 -
 sc/source/ui/app/scmod.cxx|   86 --
 sc/source/ui/condformat/condformatdlg.cxx |   26 ++---
 sc/source/ui/condformat/condformatmgr.cxx |5 +
 sc/source/ui/formdlg/formula.cxx  |4 -
 sc/source/ui/inc/IAnyRefDialog.hxx|2 
 sc/source/ui/inc/anyrefdg.hxx |   46 +---
 sc/source/ui/inc/condformatdlg.hxx|4 -
 sc/source/ui/inc/condformatmgr.hxx|2 
 sc/source/ui/inc/formula.hxx  |2 
 sc/source/ui/inc/gridwin.hxx  |2 
 sc/source/ui/inc/reffact.hxx  |3 -
 sc/source/ui/inc/tabview.hxx  |2 
 sc/source/ui/miscdlgs/anyrefdg.cxx|   43 ++-
 sc/source/ui/src/condformatdlg.src|2 
 sc/source/ui/view/cellsh1.cxx |   66 +--
 sc/source/ui/view/gridwin.cxx |   13 
 sc/source/ui/view/reffact.cxx |   21 ---
 sc/source/ui/view/tabview.cxx |   11 +++
 sc/source/ui/view/tabview3.cxx|2 
 sc/source/ui/view/tabvwsh.cxx |3 -
 sc/source/ui/view/tabvwsh4.cxx|2 
 sc/source/ui/view/tabvwshc.cxx|   53 --
 tools/inc/tools/wintypes.hxx  |1 
 vcl/inc/vcl/window.hxx|5 +
 vcl/source/window/window.cxx  |   11 +++
 vcl/source/window/winproc.cxx |4 -
 28 files changed, 268 insertions(+), 163 deletions(-)

New commits:
commit 61d43ea6953e2243548932e03649bb36f7b4
Author: Markus Mohrhard 
Date:   Sun Oct 21 12:12:33 2012 +0200

remove commented out methods and parameters in ScAnyRefDlg

Change-Id: Ie9e9baf42c93353a68ef35b456cd621bf42344c5

diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx 
b/sc/source/ui/inc/IAnyRefDialog.hxx
index afd90f5..eddecd8 100644
--- a/sc/source/ui/inc/IAnyRefDialog.hxx
+++ b/sc/source/ui/inc/IAnyRefDialog.hxx
@@ -53,7 +53,7 @@ public:
 virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const = 0;
 virtual void AddRefEntry() = 0;
 virtual void SetActive() = 0;
-virtual void ViewShellChanged( ScTabViewShell* pScViewShell ) = 0;
+virtual void ViewShellChanged() = 0;
 };
 
 #endif // SC_IANYREFDIALOG_HXX_INCLUDED
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index b95aa08..cd26719 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -98,7 +98,7 @@ public:
 boolDoClose( sal_uInt16 nId );
 voidSetDispatcherLock( bool bLock );
 voidEnableSpreadsheets( bool bFlag = true, bool bChildren 
= true );
-voidViewShellChanged( ScTabViewShell* pScViewShell );
+voidViewShellChanged();
 
 static  void enableInput(bool _bInput);
 
@@ -112,7 +112,7 @@ public:
 
 //
 
-class SC_DLLPUBLIC ScRefHandler : //public SfxModelessDialog,
+class SC_DLLPUBLIC ScRefHandler :
 public IAnyRefDialog
 {
 Window &m_rWindow;
@@ -141,9 +141,6 @@ protected:
 
 voidSetDispatcherLock( bool bLock );
 
-//Overwrite TWindow will implemented by ScRefHdlrImplBase
-//virtual longPreNotify( NotifyEvent& rNEvt );
-
 virtual voidRefInputStart( formula::RefEdit* pEdit, 
formula::RefButton* pButton = NULL );
 virtual voidRefInputDone( sal_Bool bForced = false );
 voidShowSimpleReference( const XubString& rStr );
@@ -155,8 +152,7 @@ protected:
 void stateChanged(const StateChangedType nStateChange, const bool 
bBindRef);
 
 public:
-ScRefHandler( Window &rWindow, SfxBindings* pB/*, 
SfxChildWindow* pCW,
- Window* pParent, sal_uInt16 nResId*/, 
bool bBindRef );
+ScRefHandler( Window &rWindow, SfxBindings* pB, bool 
bBindRef );
 virtual ~ScRefHandler();
 
 virtual voidSetReference( const ScRange& rRef, ScDocument* pDoc ) 
= 0;
@@ -172,14 +168,10 @@ public:
 virtual voidToggleCollapsed( formula::RefEdit* pEdit, 
formula::RefButton* pButton = NULL );
 virtual voidReleaseFocus( formula::RefEdit* pEdit, 
formula::RefButton* pButton = NULL );
 
-virtual voidViewShellChanged( ScTabViewShell* pScViewShell );
+virtual voidViewShellChanged();
 voidSwitchToDocument();
-//SfxBindings&GetBindings();
 
 virtual voidSetActive() = 0;
-//  virtual sal_BoolClose();
-//Overwrite TWindow will implemented by ScRefHdlrImplBase
-//virtual voidStateChanged( StateChangedType nStateChange );
 
 public:
 boolEnterRefMode();
@@ -207,7 +199

[Libreoffice-commits] .: 4 commits - sc/inc sc/source

2012-12-01 Thread Libreoffice Gerrit user
 sc/inc/colorscale.hxx  |2 
 sc/inc/sc.hrc  |7 -
 sc/source/core/data/colorscale.cxx |  129 ++
 sc/source/filter/inc/orcusinterface.hxx|   23 +++
 sc/source/filter/orcus/interface.cxx   |  101 +-
 sc/source/ui/condformat/condformatdlg.cxx  |9 +
 sc/source/ui/condformat/condformatdlgentry.cxx |  172 +
 sc/source/ui/inc/condformatdlg.hrc |7 +
 sc/source/ui/inc/condformatdlgentry.hxx|   40 +
 sc/source/ui/src/condformatdlg.src |   71 ++
 sc/source/ui/view/output.cxx   |  121 -
 11 files changed, 547 insertions(+), 135 deletions(-)

New commits:
commit 704fdf2b23d0e0480f29e0e56f631c2835eed02b
Author: Markus Mohrhard 
Date:   Sun Dec 2 05:57:33 2012 +0100

create icon sets in UI

Change-Id: I6c55cc1d1a1dbd4839b823df08f8c42a7b880132

diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx 
b/sc/source/ui/condformat/condformatdlgentry.cxx
index 3d41971..86dec0d 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -1259,6 +1259,40 @@ 
ScIconSetFrmtEntry::ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry( Window* pPar
 FreeResource();
 }
 
+ScColorScaleEntry* 
ScIconSetFrmtEntry::ScIconSetFrmtDataEntry::CreateEntry(ScDocument* pDoc, const 
ScAddress& rPos) const
+{
+sal_Int32 nPos = maLbEntryType.GetSelectEntryPos();
+rtl::OUString aText = maEdEntry.GetText();
+ScColorScaleEntry* pEntry = new ScColorScaleEntry();
+
+sal_uInt32 nIndex = 0;
+double nVal = 0;
+SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable();
+pNumberFormatter->IsNumberFormat(aText, nIndex, nVal);
+pEntry->SetValue(nVal);
+
+switch(nPos)
+{
+case 0:
+pEntry->SetType(COLORSCALE_VALUE);
+break;
+case 1:
+pEntry->SetType(COLORSCALE_PERCENT);
+break;
+case 2:
+pEntry->SetType(COLORSCALE_PERCENTILE);
+break;
+case 3:
+pEntry->SetType(COLORSCALE_FORMULA);
+pEntry->SetFormula(aText, pDoc, rPos, pDoc->GetGrammar());
+break;
+default:
+assert(false);
+}
+
+return pEntry;
+}
+
 ScIconSetFrmtEntry::ScIconSetFrmtEntry( Window* pParent, ScDocument* pDoc, 
const ScAddress& rPos, const ScIconSetFormat* pFormat ):
 ScCondFrmtEntry( pParent, pDoc, rPos ),
 maLbColorFormat( this, ScResId( LB_COLOR_FORMAT ) ),
@@ -1317,7 +1351,7 @@ IMPL_LINK_NOARG( ScIconSetFrmtEntry, IconSetTypeHdl )
 
 OUString ScIconSetFrmtEntry::GetExpressionString()
 {
-return OUString("");
+return ScCondFormatHelper::GetExpression(ICONSET, 0);
 }
 
 void ScIconSetFrmtEntry::SetActive()
@@ -1348,7 +1382,18 @@ void ScIconSetFrmtEntry::SetInactive()
 
 ScFormatEntry* ScIconSetFrmtEntry::GetEntry() const
 {
-return NULL;
+ScIconSetFormat* pFormat = new ScIconSetFormat(mpDoc);
+
+ScIconSetFormatData* pData = new ScIconSetFormatData;
+pData->eIconSetType = 
static_cast(maLbIconSetType.GetSelectEntryPos());
+for(ScIconSetFrmtDateEntriesType::const_iterator itr = maEntries.begin(),
+itrEnd = maEntries.end(); itr != itrEnd; ++itr)
+{
+pData->maEntries.push_back(itr->CreateEntry(mpDoc, maPos));
+}
+pFormat->SetIconSetData(pData);
+
+return pFormat;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/condformatdlgentry.hxx 
b/sc/source/ui/inc/condformatdlgentry.hxx
index 7017cd9..99d602c 100644
--- a/sc/source/ui/inc/condformatdlgentry.hxx
+++ b/sc/source/ui/inc/condformatdlgentry.hxx
@@ -258,6 +258,8 @@ class ScIconSetFrmtEntry : public ScCondFrmtEntry
 
 public:
 ScIconSetFrmtDataEntry( Window* pParent, ScIconSetType eType, 
sal_Int32 i, const ScColorScaleEntry* pEntry = NULL );
+
+ScColorScaleEntry* CreateEntry(ScDocument* pDoc, const ScAddress& 
rPos) const;
 };
 typedef boost::ptr_vector 
ScIconSetFrmtDateEntriesType;
 ScIconSetFrmtDateEntriesType maEntries;
commit f7cd8c619ef3db4b3a41b25eb9c4e5e798f2c155
Author: Markus Mohrhard 
Date:   Sun Dec 2 04:25:27 2012 +0100

correctly show existing icon sets in the UI

Change-Id: I8970d3b0cc3263f46cfda45ae3b919a441bc0228

diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx 
b/sc/source/ui/condformat/condformatdlgentry.cxx
index b039493..3d41971 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -1224,7 +1224,7 @@ IMPL_LINK_NOARG( ScDateFrmtEntry, StyleSelectHdl )
 return 0;
 }
 
-ScIconSetFrmtEntry::ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry( Window* 
pParent, ScIconSetType eType, sal_Int32 i ):
+ScIconSetFrmtEntry::ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry( Window* 
pParent, ScIconSetType eType, 

[Libreoffice-commits] .: 4 commits - sc/inc sc/source sfx2/source

2012-07-27 Thread Markus Mohrhard
 sc/inc/scerrors.hxx  |2 ++
 sc/source/core/data/fillinfo.cxx |2 +-
 sc/source/filter/xml/xmlwrap.cxx |6 +++---
 sfx2/source/doc/objembed.cxx |2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit c4c54573c6ae5e57fa7eb7d41e155997b829c2be
Author: Markus Mohrhard 
Date:   Fri Jul 27 14:03:09 2012 +0200

unify return type in this method

Change-Id: I8db70cff48ce900db0710b30f94090ebd7d77c0a

diff --git a/sc/inc/scerrors.hxx b/sc/inc/scerrors.hxx
index 83636dc..3115cc2 100644
--- a/sc/inc/scerrors.hxx
+++ b/sc/inc/scerrors.hxx
@@ -22,6 +22,8 @@
 
 #include 
 
+#define SCERR_NONE 0
+
 // ERRCODE_CLASS_READ - file related, displays "Read-Error" in MsgBox
 #define SCERR_IMPORT_CONNECT(   1 | ERRCODE_CLASS_READ | 
ERRCODE_AREA_SC )
 #define SCERR_IMPORT_OPEN   (   2 | ERRCODE_CLASS_READ | 
ERRCODE_AREA_SC )
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 22c4b64..acbc1fa 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -135,7 +135,7 @@ sal_uInt32 
ScXMLImportWrapper::ImportFromComponent(uno::ReferencegetInputStream();
 uno::Reference < beans::XPropertySet > xSet( xDocStream, 
uno::UNO_QUERY );
@@ -170,7 +170,7 @@ sal_uInt32 
ScXMLImportWrapper::ImportFromComponent(uno::ReferencesetPropertyValue( sPropName, uno::makeAny( sStream ) );
 }
 
-sal_uInt32 nReturn(0);
+sal_uInt32 nReturn = SCERR_NONE;
 rDoc.SetRangeOverflowType(0);   // is modified by the importer if limits 
are exceeded
 
 uno::Reference xDocHandler(
commit 49bf4745fdde38278e0cd8b8bc6288bfd3c80594
Author: Markus Mohrhard 
Date:   Fri Jul 27 13:58:56 2012 +0200

this explicit conversion is unnecessary, use the implicit one

Change-Id: I798a1cd56baa86c7ee08b5f47ec5149d8a4815de

diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 4aeb8b1..22c4b64 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -331,7 +331,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, 
ErrCode& nError)
 
 xml::sax::InputSource aParserInput;
 if (pMedium)
-aParserInput.sSystemId = OUString(pMedium->GetName());
+aParserInput.sSystemId = pMedium->GetName();
 
 if ( !xStorage.is() && pMedium )
 xStorage = pMedium->GetStorage();
commit 6baca4fcec1e2da240ac2e06bcb1fa1030c13d22
Author: Markus Mohrhard 
Date:   Fri Jul 27 00:45:56 2012 +0200

don't need to get this one for each cell

Change-Id: I9aab49c7604add1d574949909f0ab8b867341b27

diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index f3a01e9..743aa26 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -362,6 +362,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL 
nX1, SCROW nY1, SCCOL nX
 }
 }
 
+ScConditionalFormatList* pCondFormList = GetCondFormList(nTab);
 for (nArrX=0; nArrX<=nX2+2; nArrX++)// links & rechts 
+ 1
 {
 nX = (nArrX>0) ? nArrX-1 : MAXCOL+1;// negativ -> 
ungueltig
@@ -476,7 +477,6 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL 
nX1, SCROW nY1, SCCOL nX
 sal_uLong nConditional = ((const 
SfxUInt32Item&)pPattern->
 
GetItem(ATTR_CONDITIONAL)).GetValue();
 
-ScConditionalFormatList* pCondFormList = 
GetCondFormList(nTab);
 const ScConditionalFormat* pCondForm = NULL;
 if ( nConditional && pCondFormList )
 pCondForm = pCondFormList->GetFormat( nConditional 
);
commit e794e50723778d0c6725a9a03c37699db0606ad6
Author: Markus Mohrhard 
Date:   Fri Jul 27 00:36:34 2012 +0200

fix indentation

Change-Id: Ia01aacf400826be63ce2ada8d57fc99ebb4ad552

diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 5a57186..ede1a20 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -236,7 +236,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
 if( pMtf )
 pMtf->Record( pDev );
 
-Draw( pDev, rSetup, nAspect );
+Draw( pDev, rSetup, nAspect );
 
 // Restore Device settings
 pDev->Pop();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - sc/inc sc/source

2012-05-18 Thread Markus Mohrhard
 sc/inc/colorscale.hxx  |  127 +--
 sc/inc/document.hxx|   12 -
 sc/inc/fillinfo.hxx|   32 
 sc/source/core/data/colorscale.cxx |  189 ++---
 sc/source/core/data/documen2.cxx   |4 
 sc/source/core/data/documen4.cxx   |8 -
 sc/source/core/data/fillinfo.cxx   |   14 +-
 sc/source/core/data/table2.cxx |   10 -
 sc/source/filter/excel/xecontent.cxx   |   11 +
 sc/source/filter/inc/condformatbuffer.hxx  |   21 +++
 sc/source/filter/inc/condformatcontext.hxx |   13 +
 sc/source/filter/oox/condformatbuffer.cxx  |  142 -
 sc/source/filter/oox/condformatcontext.cxx |   37 +
 sc/source/ui/view/output.cxx   |   72 ++-
 14 files changed, 621 insertions(+), 71 deletions(-)

New commits:
commit d961b694348a0dd048761a6046de7393ac077f31
Author: Markus Mohrhard 
Date:   Fri May 18 10:33:16 2012 +0200

implement databar import from oox

Change-Id: Id510acbc7291b94610e0e2c769d8cee582baa9a7

diff --git a/sc/source/filter/inc/condformatbuffer.hxx 
b/sc/source/filter/inc/condformatbuffer.hxx
index b8b2d65..de2c906 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -39,6 +39,8 @@ namespace com { namespace sun { namespace star {
 namespace sheet { class XSheetConditionalEntries; }
 } } }
 class ScColorScaleFormat;
+class ScDataBarFormat;
+struct ScDataBarFormatData;
 
 namespace oox {
 namespace xls {
@@ -112,6 +114,23 @@ private:
 sal_uInt32 mnCol;
 };
 
+class DataBarRule : public WorksheetHelper
+{
+public:
+DataBarRule( const CondFormat& rFormat );
+void importCfvo( const AttributeList& rAttribs );
+void importColor( const AttributeList& rAttribs );
+
+void SetData( ScDataBarFormat* pFormat, ScDocument* pDoc, const ScAddress& 
rAddr );
+
+private:
+const CondFormat& mrCondFormat;
+ScDataBarFormatData* mpFormat;
+
+boost::scoped_ptr mpUpperLimit;
+boost::scoped_ptr mpLowerLimit;
+};
+
 
 // 
 
@@ -138,11 +157,13 @@ public:
 inline sal_Int32getPriority() const { return maModel.mnPriority; }
 
 ColorScaleRule* getColorScale();
+DataBarRule*getDataBar();
 
 private:
 const CondFormat&   mrCondFormat;
 CondFormatRuleModel maModel;
 boost::scoped_ptr mpColor;
+boost::scoped_ptr mpDataBar;
 };
 
 typedef ::boost::shared_ptr< CondFormatRule > CondFormatRuleRef;
diff --git a/sc/source/filter/inc/condformatcontext.hxx 
b/sc/source/filter/inc/condformatcontext.hxx
index 7af6258..08f5341 100644
--- a/sc/source/filter/inc/condformatcontext.hxx
+++ b/sc/source/filter/inc/condformatcontext.hxx
@@ -48,8 +48,17 @@ public:
 virtual voidonStartElement( const AttributeList& rAttribs );
 virtual voidonCharacters( const ::rtl::OUString& rChars );
 
-virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 
nRecId, SequenceInputStream& rStrm );
-virtual voidonStartRecord( SequenceInputStream& rStrm );
+private:
+CondFormatRuleRef mxRule;
+};
+
+class DataBarContext : public WorksheetContextBase
+{
+public:
+explicit DataBarContext( CondFormatContext& rFormat, CondFormatRuleRef 
xRule );
+
+virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 
nElement, const AttributeList& rAttribs );
+virtual voidonStartElement( const AttributeList& rAttribs );
 
 private:
 CondFormatRuleRef mxRule;
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 719f3a5..655b264 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -224,12 +224,11 @@ void ColorScaleRule::importColor( const AttributeList& 
rAttribs )
 ++mnCol;
 }
 
-void ColorScaleRule::AddEntries( ScColorScaleFormat* pFormat, ScDocument* 
pDoc, const ScAddress& rAddr )
+namespace {
+
+ScColorScaleEntry* ConvertToModel( const ColorScaleRuleModelEntry& rEntry, 
ScDocument* pDoc, const ScAddress& rAddr )
 {
-for(size_t i = 0; i < maColorScaleRuleEntries.size(); ++i)
-{
-ScColorScaleEntry* pEntry = new 
ScColorScaleEntry(maColorScaleRuleEntries[i].mnVal, 
maColorScaleRuleEntries[i].maColor);
-const ColorScaleRuleModelEntry& rEntry = maColorScaleRuleEntries[i];
+ScColorScaleEntry* pEntry = new ScColorScaleEntry(rEntry.mnVal, 
rEntry.maColor);
 
 if(rEntry.mbMin)
 pEntry->SetMin(true);
@@ -241,11 +240,105 @@ void ColorScaleRule::AddEntries( ScColorScaleFormat* 
pFormat, ScDocument* pDoc,
 if(!rEntry.maFormula.isEmpty())
 pEntry->SetFormula(rEntry.maFormula, pDoc, rAddr, 
formula::FormulaGrammar::GRAM_ENGLISH_XL_A1);
 
+return pEntry;
+}
+
+}
+
+void ColorScaleRule::AddEntries( ScColorScaleFormat* pFormat

[Libreoffice-commits] .: 4 commits - sc/inc sc/source

2012-05-13 Thread Markus Mohrhard
 sc/inc/document.hxx|1 
 sc/inc/table.hxx   |4 +
 sc/source/core/data/colorscale.cxx |8 +-
 sc/source/core/data/documen4.cxx   |5 +
 sc/source/core/data/table2.cxx |  116 ++---
 5 files changed, 125 insertions(+), 9 deletions(-)

New commits:
commit 5a5d80ce5483696e0b05c31a0c4134c8ae4b82eb
Author: Markus Mohrhard 
Date:   Mon May 14 07:43:02 2012 +0200

copy color scales correctly

Change-Id: I I I0f3ce313928ffa85f563e4162398816bf3ab2fdc

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 53adc39..0fecf8d 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1213,6 +1213,7 @@ public:
 voidSetCondFormList(ScConditionalFormatList* pNew);
 
 SC_DLLPUBLIC const ScColorScaleFormatList* GetColorScaleList() const;
+SC_DLLPUBLIC ScColorScaleFormatList* GetColorScaleList();
 
 ScValidationDataList* GetValidationList() const
 { return pValidationList; }
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 6393bfa..d684c8f 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -374,6 +374,10 @@ public:
 sal_uInt16 nFlags, bool bMarked, ScTable* pDestTab,
 const ScMarkData* pMarkData = NULL);
 
+voidCopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2,
+SCsCOL nDx, SCsROW nDy, ScTable* pTable);
+voidCopyColorScales( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW 
nRow2,
+SCsCOL nDx, SCsROW nDy, ScTable* pTable);
 voidTransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW 
nRow2,
 ScTable* pTransClip, sal_uInt16 nFlags, bool 
bAsLink );
 
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index cb7d887..cae9473 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -633,6 +633,11 @@ const ScColorScaleFormatList* 
ScDocument::GetColorScaleList() const
 return mpColorScaleList.get();
 }
 
+ScColorScaleFormatList* ScDocument::GetColorScaleList()
+{
+return mpColorScaleList.get();
+}
+
 //takes ownership
 // returns a 1-based index, 0 is reserved for no entry
 sal_uLong ScDocument::AddColorScaleFormat( ScColorScaleFormat* pNew )
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 4ad71ac..9674c2a 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -61,6 +61,7 @@
 #include "queryparam.hxx"
 #include "queryentry.hxx"
 #include "dbdata.hxx"
+#include "colorscale.hxx"
 
 // STATIC DATA ---
 
@@ -692,7 +693,54 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCRO
 ScMarkData aMarkData;
 aMarkData.MarkFromRangeList(itr->second, true);
 pDocument->ApplySelectionPattern( aPattern, aMarkData );
+}
+}
+
+void ScTable::CopyColorScales( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW 
nRow2,
+SCsCOL nDx, SCsROW nDy, ScTable* pTable)
+{
+std::map aOldIdToNewId;
+std::map aIdToRange;
+
+ScColorScaleFormatList* pColorScaleList = pDocument->GetColorScaleList();
+ScColorScaleFormatList* pOldColorScaleList = 
pTable->pDocument->GetColorScaleList();
+for(SCCOL i = nCol1; i <= nCol2; ++i)
+{
+ScAttrIterator* pIter = aCol[i-nDx].CreateAttrIterator( nRow1-nDy, 
nRow2-nDy );
+SCROW nStartRow = 0, nEndRow = 0;
+const ScPatternAttr* pPattern = pIter->Next( nStartRow, nEndRow );
+sal_uInt32 nId = 
((SfxUInt32Item&)pPattern->GetItem(ATTR_COLORSCALE)).GetValue();
+if ( nId != 0)
+{
+if (aOldIdToNewId.find(nId) == aOldIdToNewId.end())
+{
+ScColorScaleFormat* pFormat = 
pOldColorScaleList->GetFormat(nId);
+ScColorScaleFormat* pNewFormat = new 
ScColorScaleFormat(pDocument, *pFormat);
+sal_Int32 nNewId = pColorScaleList->size() + 1;
+//not in list => create entries in both maps and new format
+pColorScaleList->AddFormat(pNewFormat);
+aOldIdToNewId.insert( std::pair( nId, 
nNewId ) );
+aIdToRange.insert( std::pair( nId, 
ScRangeList() ) );
+}
+
+aIdToRange.find(nId)->second.Join( ScRange( i, nStartRow + nDy, 
nTab, i, nEndRow + nDy, nTab ) );
+}
+}
+
+for(std::map::const_iterator itr = 
aIdToRange.begin();
+itr != aIdToRange.end(); ++itr)
+{
+sal_uInt32 nNewKey = aOldIdToNewId.find(itr->first)->second;
+ScColorScaleFormat* pFormat = pColorScaleList->GetFormat( nNewKey );
+pFormat->UpdateReference(URM_MOVE, ScRange(nCol1 - nDx, nRow1 - nDy, 
pTable->nTab, nCol2 - nDx, nRow2 - nDy, pTable->nTab),
+nDx, nDy, pTable->nTab - nTab);
+pFormat

[Libreoffice-commits] .: 4 commits - sc/inc sc/source

2012-05-13 Thread Markus Mohrhard
 sc/inc/colorscale.hxx|5 -
 sc/inc/document.hxx  |2 
 sc/source/core/data/colorscale.cxx   |   15 +++
 sc/source/core/data/documen4.cxx |5 +
 sc/source/filter/excel/xecontent.cxx |  144 ++-
 sc/source/filter/inc/xecontent.hxx   |   42 ++
 6 files changed, 210 insertions(+), 3 deletions(-)

New commits:
commit 851a92bd022c48c5cc5e2f9943ce550167be124b
Author: Markus Mohrhard 
Date:   Sun May 13 08:30:17 2012 +0200

correctly export formulas in conditional formats to xlsx

Change-Id: I534fb55b735f47124cd9820ba0a986315e263112

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index d8a8391..9bf323e 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -821,6 +821,7 @@ const char* GetOperatorString(ScConditionMode eMode, bool& 
bFrmla2)
 pRet = "uniqueValues";
 break;
 case SC_COND_DIRECT:
+pRet = "expression";
 case SC_COND_NONE:
 default:
 pRet = "";
@@ -850,9 +851,13 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
 FSEND );
 rWorksheet->startElement( XML_formula, FSEND );
 rWorksheet->write(XclXmlUtils::ToOUString( GetRoot().GetDoc(), 
mrFormatEntry.GetValidSrcPos(), mrFormatEntry.CreateTokenArry( 0 ) ));
+rWorksheet->endElement( XML_formula );
 if (bFmla2)
+{
+rWorksheet->startElement( XML_formula, FSEND );
 rWorksheet->write(XclXmlUtils::ToOUString( GetRoot().GetDoc(), 
mrFormatEntry.GetValidSrcPos(), mrFormatEntry.CreateTokenArry( 1 ) ));
-rWorksheet->endElement( XML_formula );
+rWorksheet->endElement( XML_formula );
+}
 // OOXTODO: XML_extLst
 rWorksheet->endElement( XML_cfRule );
 }
commit 8f531a6cd796ce759e9d68ce577d0eaf058e1a75
Author: Markus Mohrhard 
Date:   Sun May 13 08:22:43 2012 +0200

save unique value conditional format to xlsx

Change-Id: Id126500d499e751c351d6ed499af96136039e1f1

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index 1b0bbf4..d8a8391 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -818,6 +818,8 @@ const char* GetOperatorString(ScConditionMode eMode, bool& 
bFrmla2)
 pRet = "duplicateValues";
 break;
 case SC_COND_NOTDUPLICATE:
+pRet = "uniqueValues";
+break;
 case SC_COND_DIRECT:
 case SC_COND_NONE:
 default:
commit 9e14712f8569ac2bde0eddf058ed0b0a99303c49
Author: Markus Mohrhard 
Date:   Sun May 13 08:19:53 2012 +0200

support export of duplicate values conditional format to xlsx

Change-Id: I35266eabcba5e063bf296fa1d4b356f247458ea1

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index c091c79..1b0bbf4 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -815,6 +815,8 @@ const char* GetOperatorString(ScConditionMode eMode, bool& 
bFrmla2)
 pRet = "notBetween";
 break;
 case SC_COND_DUPLICATE:
+pRet = "duplicateValues";
+break;
 case SC_COND_NOTDUPLICATE:
 case SC_COND_DIRECT:
 case SC_COND_NONE:
commit 8384032fb757d42bb93f03f70f589d493ea8ef2f
Author: Markus Mohrhard 
Date:   Sun May 13 06:11:35 2012 +0200

export color scales to xlsx

Change-Id: I251acbb66a4033f69515c1b078ed5a28d0f0cd76

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index e7d0944..61346b6 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -36,6 +36,7 @@
 
 class ScDocument;
 class ScFormulaCell;
+class ScTokenArray;
 
 class SC_DLLPUBLIC ScColorScaleEntry
 {
@@ -64,6 +65,7 @@ public:
 bool GetMax() const;
 bool GetPercent() const;
 bool HasFormula() const;
+const ScTokenArray* GetFormula() const;
 void SetMin(bool bMin);
 void SetMax(bool bMax);
 void SetPercent(bool bPercent);
@@ -89,6 +91,7 @@ public:
 Color* GetColor(const ScAddress& rAddr) const;
 void AddEntry(ScColorScaleEntry* pEntry);
 void SetRange(const ScRangeList& rList);
+const ScRangeList& GetRange() const;
 
 void DataChanged(const ScRange& rRange);
 void UpdateMoveTab(SCTAB nOldTab, SCTAB nNewTab);
@@ -103,7 +106,7 @@ public:
 const_iterator end() const;
 };
 
-class ScColorScaleFormatList
+class SC_DLLPUBLIC ScColorScaleFormatList
 {
 private:
 typedef boost::ptr_vector ColorScaleFormatContainer;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index c867461..53adc39 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1212,7 +1212,7 @@ public:
 { return pCondFormList; }
 voidSetCondFormList(ScConditionalFormatList* pNew);
 
-ScColorScaleFormatList* GetColorScaleList() const;
+SC_DLLPUBLIC const ScColorS