summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/chgtrack.hxx23
-rw-r--r--sc/inc/detfunc.hxx1
-rw-r--r--sc/inc/document.hxx14
-rw-r--r--sc/inc/drwlayer.hxx3
-rw-r--r--sc/inc/table.hxx3
-rw-r--r--sc/source/core/data/documen2.cxx161
-rw-r--r--sc/source/core/data/document.cxx1
-rw-r--r--sc/source/core/data/drwlayer.cxx20
-rw-r--r--sc/source/core/data/table2.cxx9
-rw-r--r--sc/source/core/tool/detfunc.cxx5
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx180
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx322
-rw-r--r--sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx115
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx488
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentBase.cxx5
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx27
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx202
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx1006
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx58
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx15
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx32
-rw-r--r--sc/source/ui/docshell/docsh.cxx16
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx12
-rw-r--r--sc/source/ui/inc/AccessibleCell.hxx15
-rw-r--r--sc/source/ui/inc/AccessibleCellBase.hxx13
-rw-r--r--sc/source/ui/inc/AccessibleDocument.hxx30
-rw-r--r--sc/source/ui/inc/AccessibleDocumentBase.hxx1
-rw-r--r--sc/source/ui/inc/AccessibleDocumentPagePreview.hxx2
-rw-r--r--sc/source/ui/inc/AccessibleEditObject.hxx51
-rw-r--r--sc/source/ui/inc/AccessibleSpreadsheet.hxx57
-rw-r--r--sc/source/ui/inc/AccessibleTableBase.hxx10
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx4
-rw-r--r--sc/source/ui/inc/content.hxx16
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx2
-rw-r--r--sc/source/ui/inc/docsh.hxx5
-rw-r--r--sc/source/ui/inc/drawview.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx3
-rw-r--r--sc/source/ui/inc/preview.hxx2
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx2
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx6
-rw-r--r--sc/source/ui/inc/tphfedit.hxx5
-rw-r--r--sc/source/ui/inc/viewfunc.hxx2
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx252
-rw-r--r--sc/source/ui/navipi/navipi.cxx7
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx10
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx10
-rw-r--r--sc/source/ui/view/drawview.cxx94
-rw-r--r--sc/source/ui/view/gridwin.cxx43
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/gridwin5.cxx24
-rw-r--r--sc/source/ui/view/output.cxx17
-rw-r--r--sc/source/ui/view/preview.cxx23
-rw-r--r--sc/source/ui/view/select.cxx1
-rw-r--r--sc/source/ui/view/tabview2.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh.cxx17
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx62
-rw-r--r--sc/source/ui/view/tabvwshe.cxx35
-rw-r--r--sc/source/ui/view/viewfun2.cxx3
60 files changed, 3350 insertions, 208 deletions
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 5fdb50b8109c..8f83d0650f51 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -25,9 +25,10 @@
#include <set>
#include <stack>
+#include <tools/color.hxx>
#include <tools/datetime.hxx>
+#include <tools/link.hxx>
#include <tools/mempool.hxx>
-#include "tools/link.hxx"
#include <unotools/options.hxx>
#include "global.hxx"
#include "bigrange.hxx"
@@ -37,6 +38,26 @@
class ScDocument;
class ScFormulaCell;
+class ScChangeAction;
+class ScChangeTrack;
+class ScAppOptions;
+
+class ScActionColorChanger
+{
+private:
+ const ScAppOptions& rOpt;
+ const std::set<OUString>& rUsers;
+ OUString aLastUserName;
+ sal_uInt16 nLastUserIndex;
+ ColorData nColor;
+
+
+public:
+ ScActionColorChanger( const ScChangeTrack& rTrack );
+ ~ScActionColorChanger() {}
+ void Update( const ScChangeAction& rAction );
+ ColorData GetColor() const { return nColor; }
+};
enum ScChangeActionType
{
diff --git a/sc/inc/detfunc.hxx b/sc/inc/detfunc.hxx
index 7b6f75c8fdf1..4091162b93b0 100644
--- a/sc/inc/detfunc.hxx
+++ b/sc/inc/detfunc.hxx
@@ -153,6 +153,7 @@ public:
static ColorData GetCommentColor();
static void InitializeColors();
static sal_Bool IsColorsInitialized();
+ static void AppendChangTrackNoteSeparator(OUString &str);
};
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index e283b3d2f8c3..7a00c1d358a9 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -237,6 +237,7 @@ friend class ScQueryCellIterator;
friend class ScHorizontalCellIterator;
friend class ScHorizontalAttrIterator;
friend class ScDocAttrIterator;
+friend class ScAccessibleTableBase;
friend class ScAttrRectIterator;
friend class ScDocShell;
friend class ScDocRowHeightUpdater;
@@ -438,7 +439,20 @@ private:
bool mbUseEmbedFonts;
+ OUString msDocAccTitle;
+
+public:
+ void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; }
+ const OUString getDocAccTitle() const { return msDocAccTitle; }
+
+private:
+ bool mbReadOnly;
+
public:
+ void setDocReadOnly(bool b){ mbReadOnly = b; }
+ bool getDocReadOnly() const { return mbReadOnly; }
+ sal_Bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder);
+ void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, sal_Bool &pbLeftEdge);
bool IsUsingEmbededFonts() { return mbUseEmbedFonts; }
void SetIsUsingEmbededFonts( bool bUse ) { mbUseEmbedFonts = bUse; }
SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index a7cda389b015..095a27b4f851 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -197,6 +197,9 @@ public:
static ScMacroInfo* GetMacroInfo( SdrObject* pObj, sal_Bool bCreate = false );
+ virtual ImageMap* GetImageMapForObject(SdrObject* pObj);
+ virtual sal_Int32 GetHyperlinkCount(SdrObject* pObj);
+
private:
static SfxObjectShell* pGlobalDrawPersist; // for AllocModel
public:
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index e273da83e4c3..f29e7f9aa94f 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -1067,6 +1067,9 @@ private:
SCROW mnCurRow;
SCROW mnUBound;
};
+
+public :
+ ScColumn* GetColumnByIndex(sal_Int32 index);
};
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 6c112d5803c3..2ee3828f30a0 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -82,6 +82,9 @@
#include "recursionhelper.hxx"
#include "lookupcache.hxx"
#include "externalrefmgr.hxx"
+#include "appoptio.hxx"
+#include "scmod.hxx"
+#include "../../ui/inc/viewutil.hxx"
#include "tabprotection.hxx"
#include "formulaparserpool.hxx"
#include "clipparam.hxx"
@@ -216,7 +219,8 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
mbStreamValidLocked( false ),
mbUserInteractionEnabled(true),
mnNamedRangesLockCount(0),
- mbUseEmbedFonts(false)
+ mbUseEmbedFonts(false),
+ mbReadOnly(false)
{
SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT);
@@ -1215,6 +1219,161 @@ void ScDocument::ClearLookupCaches()
pLookupCacheMapImpl->clear();
}
+sal_Bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder)
+{
+ ScChangeTrack* pTrack = GetChangeTrack();
+ ScChangeViewSettings* pSettings = GetChangeViewSettings();
+ if ( !pTrack || !pTrack->GetFirst() || !pSettings || !pSettings->ShowChanges() )
+ return sal_False; // nix da oder abgeschaltet
+ ScActionColorChanger aColorChanger(*pTrack);
+ // Clipping passiert von aussen
+ //! ohne Clipping, nur betroffene Zeilen painten ??!??!?
+ const ScChangeAction* pAction = pTrack->GetFirst();
+ while (pAction)
+ {
+ ScChangeActionType eType;
+ if ( pAction->IsVisible() )
+ {
+ eType = pAction->GetType();
+ const ScBigRange& rBig = pAction->GetBigRange();
+ if ( rBig.aStart.Tab() == cell.Tab())
+ {
+ ScRange aRange = rBig.MakeRange();
+ if ( eType == SC_CAT_DELETE_ROWS )
+ aRange.aEnd.SetRow( aRange.aStart.Row() );
+ else if ( eType == SC_CAT_DELETE_COLS )
+ aRange.aEnd.SetCol( aRange.aStart.Col() );
+ if (ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ if (aRange.In(cell))
+ {
+ if (pColCellBoder != NULL)
+ {
+ aColorChanger.Update( *pAction );
+ Color aColor( aColorChanger.GetColor() );
+ *pColCellBoder = aColor;
+ }
+ return sal_True;
+ }
+ }
+ }
+ if ( eType == SC_CAT_MOVE &&
+ ((const ScChangeActionMove*)pAction)->
+ GetFromRange().aStart.Tab() == cell.Col() )
+ {
+ ScRange aRange = ((const ScChangeActionMove*)pAction)->
+ GetFromRange().MakeRange();
+ if (ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ if (aRange.In(cell))
+ {
+ if (pColCellBoder != NULL)
+ {
+ aColorChanger.Update( *pAction );
+ Color aColor( aColorChanger.GetColor() );
+ *pColCellBoder = aColor;
+ }
+ return sal_True;
+ }
+ }
+ }
+ }
+ pAction = pAction->GetNext();
+ }
+ return sal_False;
+}
+
+void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aTrackText,sal_Bool &bLeftEdge)
+{
+ aTrackText = OUString();
+ // Change-Tracking
+ ScChangeTrack* pTrack = GetChangeTrack();
+ ScChangeViewSettings* pSettings = GetChangeViewSettings();
+ if ( pTrack && pTrack->GetFirst() && pSettings && pSettings->ShowChanges())
+ {
+ const ScChangeAction* pFound = NULL;
+ const ScChangeAction* pFoundContent = NULL;
+ const ScChangeAction* pFoundMove = NULL;
+ long nModified = 0;
+ const ScChangeAction* pAction = pTrack->GetFirst();
+ while (pAction)
+ {
+ if ( pAction->IsVisible() &&
+ ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ ScChangeActionType eType = pAction->GetType();
+ const ScBigRange& rBig = pAction->GetBigRange();
+ if ( rBig.aStart.Tab() == aCellPos.Tab())
+ {
+ ScRange aRange = rBig.MakeRange();
+ if ( eType == SC_CAT_DELETE_ROWS )
+ aRange.aEnd.SetRow( aRange.aStart.Row() );
+ else if ( eType == SC_CAT_DELETE_COLS )
+ aRange.aEnd.SetCol( aRange.aStart.Col() );
+ if ( aRange.In( aCellPos ) )
+ {
+ pFound = pAction; // der letzte gewinnt
+ switch ( eType )
+ {
+ case SC_CAT_CONTENT :
+ pFoundContent = pAction;
+ break;
+ case SC_CAT_MOVE :
+ pFoundMove = pAction;
+ break;
+ default:
+ break;
+ }
+ ++nModified;
+ }
+ }
+ if ( eType == SC_CAT_MOVE )
+ {
+ ScRange aRange =
+ ((const ScChangeActionMove*)pAction)->
+ GetFromRange().MakeRange();
+ if ( aRange.In( aCellPos ) )
+ {
+ pFound = pAction;
+ ++nModified;
+ }
+ }
+ }
+ pAction = pAction->GetNext();
+ }
+ if ( pFound )
+ {
+ if ( pFoundContent && pFound->GetType() != SC_CAT_CONTENT )
+ pFound = pFoundContent; // Content gewinnt
+ if ( pFoundMove && pFound->GetType() != SC_CAT_MOVE &&
+ pFoundMove->GetActionNumber() >
+ pFound->GetActionNumber() )
+ pFound = pFoundMove; // Move gewinnt
+ // bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle
+ if ( pFound->GetType() == SC_CAT_DELETE_COLS )
+ bLeftEdge = sal_True;
+ DateTime aDT = pFound->GetDateTime();
+ aTrackText = pFound->GetUser();
+ aTrackText += ", ";
+ aTrackText += ScGlobal::pLocaleData->getDate(aDT);
+ aTrackText += " ";
+ aTrackText += ScGlobal::pLocaleData->getTime(aDT);
+ aTrackText += ":\n";
+ OUString aComStr = pFound->GetComment();
+ if(!aComStr.isEmpty())
+ {
+ aTrackText += aComStr;
+ aTrackText += "\n( ";
+ }
+ pFound->GetDescription( aTrackText, this );
+ if (!aComStr.isEmpty())
+ {
+ aTrackText += ")";
+ }
+ }
+ }
+}
+
void ScDocument::SetPreviewFont( SfxItemSet* pFont )
{
delete pPreviewFont;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 8048d0265344..a24889be64f3 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -178,7 +178,6 @@ void ScDocument::MakeTable( SCTAB nTab,bool _bNeedsNameCheck )
}
}
-
bool ScDocument::HasTable( SCTAB nTab ) const
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 5d52b0c1c9c7..4f3ba5b67564 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -2030,6 +2030,26 @@ ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, sal_Bool bCreate )
return 0;
}
+ImageMap* ScDrawLayer::GetImageMapForObject(SdrObject* pObj)
+{
+ ScIMapInfo* pIMapInfo = const_cast<ScIMapInfo*>( GetIMapInfo( pObj ) );
+ if ( pIMapInfo )
+ {
+ return const_cast<ImageMap*>( &(pIMapInfo->GetImageMap()) );
+ }
+ return NULL;
+}
+
+sal_Int32 ScDrawLayer::GetHyperlinkCount(SdrObject* pObj)
+{
+ sal_Int32 nHLCount = 0;
+ ScMacroInfo* pMacroInfo = GetMacroInfo(pObj, sal_False);
+ if (pMacroInfo)
+ // MT IA2: GetHlink*( doesn|t exist in DEV300 anymore...
+ nHLCount = 0; // pMacroInfo->GetHlink().getLength() > 0 ? 1 : 0;
+ return nHLCount;
+}
+
void ScDrawLayer::SetGlobalDrawPersist(SfxObjectShell* pPersist)
{
OSL_ENSURE(!pGlobalDrawPersist,"Multiple SetGlobalDrawPersist");
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 30771ab49090..87e4832cdee0 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3654,4 +3654,13 @@ sal_uLong ScTable::GetColOffset( SCCOL nCol, bool bHiddenAsZero ) const
return n;
}
+ScColumn* ScTable::GetColumnByIndex(sal_Int32 index)
+{
+ if( index <= MAXCOL && index >= 0 )
+ {
+ return &(aCol[index]);
+ }
+ return NULL;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index d69ba93a98ec..e1448a00e000 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -1691,4 +1691,9 @@ sal_Bool ScDetectiveFunc::IsColorsInitialized()
return bColorsInitialized;
}
+void ScDetectiveFunc::AppendChangTrackNoteSeparator(OUString &rDisplay)
+{
+ rDisplay += "\n--------\n";
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 199ec69295d7..c768f8a63eff 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -33,6 +33,7 @@
#include "markdata.hxx"
#include "cellvalue.hxx"
#include "formulaiter.hxx"
+#include "validat.hxx"
#include <unotools/accessiblestatesethelper.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
@@ -44,6 +45,8 @@
#include <float.h>
#include <vcl/svapp.hxx>
+#include "AccessibleSpreadsheet.hxx"
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -103,11 +106,11 @@ void SAL_CALL ScAccessibleCell::disposing()
//===== XInterface =====================================================
-IMPLEMENT_FORWARD_XINTERFACE2( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase )
+IMPLEMENT_FORWARD_XINTERFACE3( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase, ScAccessibleCellAttributeImpl )
//===== XTypeProvider ===================================================
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase )
+IMPLEMENT_FORWARD_XTYPEPROVIDER3( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase, ScAccessibleCellAttributeImpl )
//===== XAccessibleComponent ============================================
@@ -226,6 +229,23 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
pStateSet->AddState(AccessibleStateType::DEFUNC);
else
{
+ if (IsFormulaMode())
+ {
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::MULTI_LINE);
+ pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
+ if (IsOpaque(xParentStates))
+ pStateSet->AddState(AccessibleStateType::OPAQUE);
+ pStateSet->AddState(AccessibleStateType::SELECTABLE);
+ if (IsSelected())
+ pStateSet->AddState(AccessibleStateType::SELECTED);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ pStateSet->AddState(AccessibleStateType::TRANSIENT);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ return pStateSet;
+ }
if (IsEditable(xParentStates))
{
pStateSet->AddState(AccessibleStateType::EDITABLE);
@@ -234,6 +254,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
pStateSet->AddState(AccessibleStateType::ENABLED);
pStateSet->AddState(AccessibleStateType::MULTI_LINE);
pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
+ pStateSet->AddState(AccessibleStateType::FOCUSABLE);
if (IsOpaque(xParentStates))
pStateSet->AddState(AccessibleStateType::OPAQUE);
pStateSet->AddState(AccessibleStateType::SELECTABLE);
@@ -329,6 +350,16 @@ sal_Bool ScAccessibleCell::IsOpaque(
sal_Bool ScAccessibleCell::IsSelected()
{
+ if (IsFormulaMode())
+ {
+ const ScAccessibleSpreadsheet *pSheet =static_cast<const ScAccessibleSpreadsheet*>(mxParent.get());
+ if (pSheet)
+ {
+ return pSheet->IsScAddrFormulaSel(maCellAddress);
+ }
+ return sal_False;
+ }
+
sal_Bool bResult(false);
if (mpViewShell && mpViewShell->GetViewData())
{
@@ -349,6 +380,10 @@ ScDocument* ScAccessibleCell::GetDocument(ScTabViewShell* pViewShell)
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
{
+ if (IsFormulaMode())
+ {
+ return ::std::auto_ptr< SvxEditSource >();
+ }
::std::auto_ptr < ScAccessibleTextData > pAccessibleCellTextData
( new ScAccessibleCellTextData( pViewShell, aCell, eSplitPos, this ) );
::std::auto_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessibleCellTextData));
@@ -435,4 +470,145 @@ void ScAccessibleCell::AddRelation(const ScRange& rRange,
}
}
+OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, OUString replaceStr)
+{
+ int iReplace = -1;
+ iReplace = oldOUString.lastIndexOf(replacedChar);
+ if (iReplace > -1)
+ {
+ for(;iReplace>-1;)
+ {
+ oldOUString = oldOUString.replaceAt(iReplace,1, replaceStr);
+ iReplace=oldOUString.lastIndexOf(replacedChar,iReplace);
+ }
+ }
+ return oldOUString;
+}
+
+OUString ReplaceFourChar(OUString oldOUString)
+{
+ oldOUString = ReplaceOneChar(oldOUString, "\\", "\\\\");
+ oldOUString = ReplaceOneChar(oldOUString, ";", "\\;");
+ oldOUString = ReplaceOneChar(oldOUString, "=", "\\=");
+ oldOUString = ReplaceOneChar(oldOUString, ",", "\\,");
+ oldOUString = ReplaceOneChar(oldOUString, ":", "\\:");
+ return oldOUString;
+}
+
+uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Any strRet;
+ if (mpViewShell)
+ {
+ const OUString strAttr(":");
+ const OUString strSplit(";");
+ OUString strFor = mpViewShell->GetFormula(maCellAddress) ;
+ strFor = strFor.replaceAt(0,1,"");
+ strFor = ReplaceFourChar(strFor);
+ strFor = "Formula:" + strFor;
+ strFor += strSplit;
+ strFor += "Note:";
+ strFor += ReplaceFourChar(GetAllDisplayNote());
+ strFor += strSplit;
+ strFor += getShadowAttrs();//the string returned contains the spliter ";"
+ strFor += getBorderAttrs();//the string returned contains the spliter ";"
+ //end of cell attributes
+ if( mpDoc )
+ {
+ strFor += "isdropdown:";
+ if( IsDropdown() )
+ strFor += "true";
+ else
+ strFor += "false";
+ strFor += ";";
+ }
+ strRet <<= strFor ;
+ }
+ return strRet;
+}
+
+// cell has its own ParaIndent property, so when calling character attributes on cell, the ParaIndent should replace the ParaLeftMargin if its value is not zero.
+uno::Sequence< beans::PropertyValue > SAL_CALL ScAccessibleCell::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ uno::Sequence< beans::PropertyValue > aAttribs = AccessibleStaticTextBase::getCharacterAttributes( nIndex, aRequestedAttributes );
+ beans::PropertyValue *pAttribs = aAttribs.getArray();
+
+ sal_uInt16 nParaIndent = static_cast< const SfxUInt16Item* >( mpDoc->GetAttr( maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), ATTR_INDENT ) )->GetValue();
+ if (nParaIndent > 0)
+ {
+ OUString sLeftMarginName ("ParaLeftMargin");
+ for (int i = 0; i < aAttribs.getLength(); ++i)
+ {
+ if (sLeftMarginName == pAttribs[i].Name)
+ {
+ pAttribs[i].Value = uno::makeAny( nParaIndent );
+ break;
+ }
+ }
+ }
+ return aAttribs;
+}
+
+sal_Bool ScAccessibleCell::IsFormulaMode()
+{
+ ScAccessibleSpreadsheet* pSheet =static_cast<ScAccessibleSpreadsheet*>(mxParent.get());
+ if (pSheet)
+ {
+ return pSheet->IsFormulaMode();
+ }
+ return sal_False;
+}
+sal_Bool ScAccessibleCell::IsDropdown()
+{
+ sal_uInt16 nPosX = maCellAddress.Col();
+ sal_uInt16 nPosY = sal_uInt16(maCellAddress.Row());
+ sal_uInt16 nTab = maCellAddress.Tab();
+ sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_VALIDDATA ) )->GetValue();
+ if( nValidation )
+ {
+ const ScValidationData* pData = mpDoc->GetValidationEntry( nValidation );
+ if( pData && pData->HasSelectionList() )
+ return sal_True;
+ }
+ ScMergeFlagAttr* pAttr;
+ pAttr = (ScMergeFlagAttr*)mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG );
+ if( pAttr->HasAutoFilter() )
+ {
+ return sal_True;
+ }
+ else
+ {
+ sal_uInt16 nTabCount = mpDoc->GetTableCount();
+ if ( nTab+1<nTabCount && mpDoc->IsScenario(nTab+1) && !mpDoc->IsScenario(nTab) )
+ {
+ SCTAB i;
+ ScMarkData aMarks;
+ for (i=nTab+1; i<nTabCount && mpDoc->IsScenario(i); i++)
+ mpDoc->MarkScenario( i, nTab, aMarks, sal_False, SC_SCENARIO_SHOWFRAME );
+ ScRangeList aRanges;
+ aMarks.FillRangeListWithMarks( &aRanges, sal_False );
+ sal_Bool bHasScenario;
+ SCTAB nRangeCount = aRanges.size();
+ for (i=0; i<nRangeCount; i++)
+ {
+ ScRange aRange = *aRanges[i];
+ mpDoc->ExtendTotalMerge( aRange );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
+ // MT IA2: Not used: sal_Bool bIsInScen = sal_False;
+ if ( bTextBelow )
+ {
+ bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aEnd.Row() == nPosY-1);
+ }
+ else
+ {
+ bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aStart.Row() == nPosY+1);
+ }
+ if( bHasScenario ) return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 84635248af11..d021dbd90ccb 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -28,11 +28,16 @@
#include "scresid.hxx"
#include "sc.hrc"
#include "unonames.hxx"
+#include "detfunc.hxx"
+#include "chgtrack.hxx"
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
+#include <com/sun/star/sheet/XSheetAnnotation.hpp>
+#include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
+#include <com/sun/star/text/XSimpleText.hpp>
#include <editeng/brushitem.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
@@ -212,15 +217,9 @@ OUString SAL_CALL
ScAccessibleCellBase::createAccessibleName(void)
throw (uno::RuntimeException)
{
- OUString sName( SC_RESSTR(STR_ACC_CELL_NAME) );
// Document not needed, because only the cell address, but not the tablename is needed
// always us OOO notation
- OUString sAddress(maCellAddress.Format(SCA_VALID, NULL));
- /* #i65103# ZoomText merges cell address and contents, e.g. if value 2 is
- contained in cell A1, ZT reads "cell A twelve" instead of "cell A1 - 2".
- Simple solution: Append a space character to the cell address. */
- sName = sName.replaceFirst("%1", sAddress) + " ";
- return OUString(sName);
+ return maCellAddress.Format(SCA_VALID, NULL);
}
//===== XAccessibleValue ================================================
@@ -229,12 +228,14 @@ uno::Any SAL_CALL
ScAccessibleCellBase::getCurrentValue( )
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Any aAny;
if (mpDoc)
- aAny <<= mpDoc->GetValue(maCellAddress);
-
+ {
+ OUString valStr(mpDoc->GetString(maCellAddress.Col(),maCellAddress.Row(),maCellAddress.Tab()));
+ aAny <<= valStr;
+ }
return aAny;
}
@@ -320,4 +321,305 @@ sal_Bool ScAccessibleCellBase::IsEditable(
return bEditable;
}
+OUString SAL_CALL ScAccessibleCellBase::GetNote(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ IsObjectValid();
+ OUString msNote;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference <sheet::XSheetAnnotationAnchor> xAnnotationAnchor ( xCell, uno::UNO_QUERY);
+ if(xAnnotationAnchor.is())
+ {
+ uno::Reference <sheet::XSheetAnnotation> xSheetAnnotation = xAnnotationAnchor->getAnnotation();
+ if (xSheetAnnotation.is())
+ {
+ uno::Reference <text::XSimpleText> xText (xSheetAnnotation, uno::UNO_QUERY);
+ if (xText.is())
+ {
+ msNote = xText->getString();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return msNote;
+}
+
+#include <com/sun/star/table/ShadowFormat.hpp>
+
+OUString SAL_CALL ScAccessibleCellBase::getShadowAttrs(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ IsObjectValid();
+ table::ShadowFormat aShadowFmt;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference<beans::XPropertySet> xCellProps(xCell, uno::UNO_QUERY);
+ if (xCellProps.is())
+ {
+ uno::Any aAny = xCellProps->getPropertyValue(OUString(SC_UNONAME_SHADOW));
+ aAny >>= aShadowFmt;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ //construct shadow attributes string
+ OUString sShadowAttrs("Shadow:");
+ OUString sInnerSplit(",");
+ OUString sOuterSplit(";");
+ sal_Int32 nLocationVal = 0;
+ switch( aShadowFmt.Location )
+ {
+ case table::ShadowLocation_TOP_LEFT:
+ nLocationVal = 1;
+ break;
+ case table::ShadowLocation_TOP_RIGHT:
+ nLocationVal = 2;
+ break;
+ case table::ShadowLocation_BOTTOM_LEFT:
+ nLocationVal = 3;
+ break;
+ case table::ShadowLocation_BOTTOM_RIGHT:
+ nLocationVal = 4;
+ break;
+ default:
+ break;
+ }
+ //if there is no shadow property for the cell
+ if ( nLocationVal == 0 )
+ {
+ sShadowAttrs += sOuterSplit;
+ return sShadowAttrs;
+ }
+ //else return all the shadow properties
+ sShadowAttrs += "Location=";
+ sShadowAttrs += OUString::number( (sal_Int32)nLocationVal );
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += "ShadowWidth=";
+ sShadowAttrs += OUString::number( (sal_Int32)aShadowFmt.ShadowWidth ) ;
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += "IsTransparent=";
+ sShadowAttrs += OUString::number( (sal_Bool)aShadowFmt.IsTransparent ) ;
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += "Color=";
+ sShadowAttrs += OUString::number( (sal_Int32)aShadowFmt.Color );
+ sShadowAttrs += sOuterSplit;
+ return sShadowAttrs;
+}
+
+#include <com/sun/star/table/BorderLine.hpp>
+
+OUString SAL_CALL ScAccessibleCellBase::getBorderAttrs(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ IsObjectValid();
+ table::BorderLine aTopBorder;
+ table::BorderLine aBottomBorder;
+ table::BorderLine aLeftBorder;
+ table::BorderLine aRightBorder;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference<beans::XPropertySet> xCellProps(xCell, uno::UNO_QUERY);
+ if (xCellProps.is())
+ {
+ uno::Any aAny = xCellProps->getPropertyValue(OUString(SC_UNONAME_TOPBORDER));
+ aAny >>= aTopBorder;
+ aAny = xCellProps->getPropertyValue(OUString(SC_UNONAME_BOTTBORDER));
+ aAny >>= aBottomBorder;
+ aAny = xCellProps->getPropertyValue(OUString(SC_UNONAME_LEFTBORDER));
+ aAny >>= aLeftBorder;
+ aAny = xCellProps->getPropertyValue(OUString(SC_UNONAME_RIGHTBORDER));
+ aAny >>= aRightBorder;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ Color aColor;
+ sal_Bool bIn = mpDoc ? mpDoc->IsCellInChangeTrack(maCellAddress,&aColor) : sal_False;
+ if (bIn)
+ {
+ aTopBorder.Color = aColor.GetColor();
+ aBottomBorder.Color = aColor.GetColor();
+ aLeftBorder.Color = aColor.GetColor();
+ aRightBorder.Color = aColor.GetColor();
+ aTopBorder.OuterLineWidth =2;
+ aBottomBorder.OuterLineWidth =2;
+ aLeftBorder.OuterLineWidth =2;
+ aRightBorder.OuterLineWidth =2;
+ }
+
+ //construct border attributes string
+ OUString sBorderAttrs;
+ OUString sInnerSplit(",");
+ OUString sOuterSplit(";");
+ //top border
+ //if top of the cell has no border
+ if ( aTopBorder.InnerLineWidth == 0 && aTopBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += "TopBorder:;";
+ }
+ else//add all the border properties to the return string.
+ {
+ sBorderAttrs += "TopBorder:Color=";
+ sBorderAttrs += OUString::number( (sal_Int32)aTopBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "InnerLineWidth=";
+ sBorderAttrs += OUString::number( (sal_Int32)aTopBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "OuterLineWidth=";
+ sBorderAttrs += OUString::number( (sal_Int32)aTopBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "LineDistance=";
+ sBorderAttrs += OUString::number( (sal_Int32)aTopBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //bottom border
+ if ( aBottomBorder.InnerLineWidth == 0 && aBottomBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += "BottomBorde:;";
+ }
+ else
+ {
+ sBorderAttrs += "BottomBorder:Color=";
+ sBorderAttrs += OUString::number( (sal_Int32)aBottomBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "InnerLineWidth=";
+ sBorderAttrs += OUString::number( (sal_Int32)aBottomBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "OuterLineWidth=";
+ sBorderAttrs += OUString::number( (sal_Int32)aBottomBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "LineDistance=";
+ sBorderAttrs += OUString::number( (sal_Int32)aBottomBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //left border
+ if ( aLeftBorder.InnerLineWidth == 0 && aLeftBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += "LeftBorder:;";
+ }
+ else
+ {
+ sBorderAttrs += "LeftBorder:Color=";
+ sBorderAttrs += OUString::number( (sal_Int32)aLeftBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "InnerLineWidth=";
+ sBorderAttrs += OUString::number( (sal_Int32)aLeftBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "OuterLineWidth=";
+ sBorderAttrs += OUString::number( (sal_Int32)aLeftBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "LineDistance=";
+ sBorderAttrs += OUString::number( (sal_Int32)aLeftBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //right border
+ if ( aRightBorder.InnerLineWidth == 0 && aRightBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += "RightBorder:;";
+ }
+ else
+ {
+ sBorderAttrs += "RightBorder:Color=";
+ sBorderAttrs += OUString::number( (sal_Int32)aRightBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "InnerLineWidth=";
+ sBorderAttrs += OUString::number( (sal_Int32)aRightBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "OuterLineWidth=";
+ sBorderAttrs += OUString::number( (sal_Int32)aRightBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += "LineDistance=";
+ sBorderAttrs += OUString::number( (sal_Int32)aRightBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ return sBorderAttrs;
+}
+//end of cell attributes
+
+OUString SAL_CALL ScAccessibleCellBase::GetAllDisplayNote(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ OUString strNote;
+ OUString strTrackText;
+ if (mpDoc)
+ {
+ sal_Bool bLeftedge=sal_False;
+ mpDoc->GetCellChangeTrackNote(maCellAddress,strTrackText,bLeftedge);
+ }
+ if (!strTrackText.isEmpty())
+ {
+ ScDetectiveFunc::AppendChangTrackNoteSeparator(strTrackText);
+ strNote = strTrackText;
+ }
+ strNote += GetNote();
+ return strNote;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index 20f18bc2ac33..073682b7c3a0 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -21,9 +21,15 @@
#include "fieldwnd.hxx"
#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-
+#include <com/sun/star/accessibility/XAccessibleKeyBinding.hpp>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <comphelper/accessiblekeybindinghelper.hxx>
+#include <com/sun/star/awt/KeyModifier.hpp>
+#include <vcl/keycodes.hxx>
+#include <unotools/accessiblerelationsethelper.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/servicehelper.hxx>
#include <tools/gen.hxx>
@@ -35,6 +41,7 @@ using namespace ::com::sun::star::accessibility;
class ScAccessibleDataPilotButton
: public ScAccessibleContextBase
+ , public ::com::sun::star::accessibility::XAccessibleAction
{
public:
//===== internal ========================================================
@@ -56,6 +63,17 @@ public:
protected:
virtual ~ScAccessibleDataPilotButton(void);
public:
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ ///===== XInterface =====================================================
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
///===== XAccessibleComponent ============================================
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
@@ -97,7 +115,8 @@ public:
::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
getAccessibleStateSet(void)
throw (::com::sun::star::uno::RuntimeException);
-
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet >
+ SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
///===== XServiceInfo ====================================================
/** Returns an identifier for the implementation of this object.
@@ -313,6 +332,9 @@ void ScAccessibleDataPilotControl::GotFocus()
{
OSL_ENSURE(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
+ if(maChildren.size()==0)
+ return ;
+
sal_Int32 nIndex(mpFieldWindow->GetSelectedField());
if (0 <= nIndex && static_cast<size_t>(nIndex) < maChildren.size())
{
@@ -333,6 +355,9 @@ void ScAccessibleDataPilotControl::LostFocus()
{
OSL_ENSURE(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
+ if(maChildren.size()==0)
+ return ;
+
sal_Int32 nIndex(mpFieldWindow->GetSelectedField());
if (0 <= nIndex && static_cast<size_t>(nIndex) < maChildren.size())
{
@@ -553,7 +578,7 @@ ScAccessibleDataPilotButton::ScAccessibleDataPilotButton(
::com::sun::star::accessibility::XAccessible>& rxParent,
ScDPFieldControlBase* pFieldWindow,
sal_Int32 nIndex)
- : ScAccessibleContextBase(rxParent, AccessibleRole::PUSH_BUTTON),
+ : ScAccessibleContextBase(rxParent, AccessibleRole::BUTTON_MENU),
mpFieldWindow(pFieldWindow),
mnIndex(nIndex)
{
@@ -693,7 +718,23 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotButton::getAcc
return pStateSet;
}
- ///===== XServiceInfo ====================================================
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet >
+ SAL_CALL ScAccessibleDataPilotButton::getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+ if(mxParent.is())
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = mxParent;
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+
+ return xSet;
+
+}
+
+///===== XServiceInfo ====================================================
OUString SAL_CALL ScAccessibleDataPilotButton::getImplementationName(void)
throw (::com::sun::star::uno::RuntimeException)
@@ -717,6 +758,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotButton::getImplementationI
OUString SAL_CALL ScAccessibleDataPilotButton::createAccessibleDescription(void)
throw (::com::sun::star::uno::RuntimeException)
{
+ if (mpFieldWindow)
+ return mpFieldWindow->GetHelpText();
return OUString();
}
@@ -754,4 +797,68 @@ Rectangle ScAccessibleDataPilotButton::GetBoundingBox(void) const
return Rectangle();
}
+// -----------------------------------------------------------------------------
+// XAccessibleAction
+// -----------------------------------------------------------------------------
+sal_Int32 ScAccessibleDataPilotButton::getAccessibleActionCount( ) throw (uno::RuntimeException)
+{
+ return 1;
+}
+
+sal_Bool ScAccessibleDataPilotButton::doAccessibleAction ( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ return sal_True;
+}
+
+OUString ScAccessibleDataPilotButton::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ return OUString("press");
+}
+
+::com::sun::star::uno::Reference< XAccessibleKeyBinding > ScAccessibleDataPilotButton::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper = new comphelper::OAccessibleKeyBindingHelper();
+ ::com::sun::star::uno::Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper;
+ ScDPFieldControlBase* pWindow = mpFieldWindow;
+ if ( pWindow )
+ {
+ awt::KeyStroke aKeyStroke;
+ aKeyStroke.Modifiers = 0;
+ aKeyStroke.KeyCode = KEY_SPACE;
+ pKeyBindingHelper->AddKeyBinding( aKeyStroke );
+ }
+ return xKeyBinding;
+}
+
+uno::Any SAL_CALL ScAccessibleDataPilotButton::queryInterface( uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Any aAny (ScAccessibleContextBase::queryInterface(rType));
+ if(!aAny.hasValue())
+ {
+ aAny = ::cppu::queryInterface (rType,
+ static_cast<XAccessibleAction*>(this)
+ );
+ }
+ return aAny;
+}
+
+void SAL_CALL ScAccessibleDataPilotButton::acquire()
+ throw ()
+{
+ ScAccessibleContextBase::acquire();
+}
+
+void SAL_CALL ScAccessibleDataPilotButton::release()
+ throw ()
+{
+ ScAccessibleContextBase::release();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 6d3b7f8c1957..7a4a765ee6be 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -48,6 +48,7 @@
#include "userdat.hxx"
#include "scresid.hxx"
#include "sc.hrc"
+#include "table.hxx"
#include "markdata.hxx"
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
@@ -74,9 +75,22 @@
#include <toolkit/helper/convert.hxx>
#include <vcl/svapp.hxx>
+#include <svx/AccessibleControlShape.hxx>
+#include <svx/AccessibleShape.hxx>
+#include <svx/ShapeTypeHandler.hxx>
+#include <svx/SvxShapeTypes.hxx>
+#include <sfx2/objsh.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/editeng.hxx>
+
#include <list>
#include <algorithm>
+#include "AccessibleCell.hxx"
+
+#include "svx/unoapi.hxx"
+#include "scmod.hxx"
+
#ifdef indices
#undef indices
#endif
@@ -256,6 +270,14 @@ public:
const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::accessibility::AccessibleControlShape* GetAccControlShapeFromModel
+ (::com::sun::star::beans::XPropertySet* pSet)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ GetAccessibleCaption (const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape>& xShape)
+ throw (::com::sun::star::uno::RuntimeException);
///===== Internal ========================================================
void SetDrawBroadcaster();
@@ -476,6 +498,44 @@ sal_Bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurr
return bResult;
}
+::accessibility::AccessibleControlShape * ScChildrenShapes::GetAccControlShapeFromModel(::com::sun::star::beans::XPropertySet* pSet) throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 count = GetCount();
+ for (sal_Int32 index=0;index<count;index++)
+ {
+ ScAccessibleShapeData* pShape = maZOrderedShapes[index];
+ if (pShape)
+ {
+ ::accessibility::AccessibleShape* pAccShape = pShape->pAccShape;
+ if (pAccShape && ::accessibility::ShapeTypeHandler::Instance().GetTypeId (pAccShape->GetXShape()) == ::accessibility::DRAWING_CONTROL)
+ {
+ ::accessibility::AccessibleControlShape *pCtlAccShape = static_cast < ::accessibility::AccessibleControlShape* >(pAccShape);
+ if (pCtlAccShape && pCtlAccShape->GetControlModel() == pSet)
+ return pCtlAccShape;
+ }
+ }
+ }
+ return NULL;
+}
+
+::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible >
+ScChildrenShapes::GetAccessibleCaption (const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape>& xShape)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 count = GetCount();
+ for (sal_Int32 index=0;index<count;index++)
+ {
+ ScAccessibleShapeData* pShape = maZOrderedShapes[index];
+ if (pShape && pShape->xShape == xShape )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xNewChild( pShape->pAccShape );
+ if(xNewChild.get())
+ return xNewChild;
+ }
+ }
+ return NULL;
+}
+
sal_Int32 ScChildrenShapes::GetCount() const
{
SdrPage* pDrawPage = GetDrawPage();
@@ -754,6 +814,8 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC
std::vector < uno::Reference < drawing::XShape > > aShapes;
FillShapes(aShapes);
+ if(aShapes.size()<=0)
+ return xAccessible;
SortedShapes::iterator aItr;
if (FindShape(aShapes[nSelectedChildIndex], aItr))
xAccessible = Get(aItr - maZOrderedShapes.begin());
@@ -898,9 +960,16 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
}
else
mnShapesSelected = 0;
+ SdrObject *pFocusedObj = NULL;
+ if( mnShapesSelected == 1 && aShapesList.size() == 1)
+ {
+ pFocusedObj = GetSdrObjectFromXShape(aShapesList[0]->xShape);
+ }
ScShapeDataLess aLess;
std::sort(aShapesList.begin(), aShapesList.end(), aLess);
-
+ SortedShapes vecSelectedShapeAdd;
+ SortedShapes vecSelectedShapeRemove;
+ sal_Bool bHasSelect=sal_False;
SortedShapes::iterator aXShapesItr(aShapesList.begin());
SortedShapes::const_iterator aXShapesEndItr(aShapesList.end());
SortedShapes::iterator aDataItr(maZOrderedShapes.begin());
@@ -925,9 +994,14 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
(*aDataItr)->pAccShape->SetState(AccessibleStateType::SELECTED);
(*aDataItr)->pAccShape->ResetState(AccessibleStateType::FOCUSED);
bResult = sal_True;
+ vecSelectedShapeAdd.push_back((*aDataItr));
}
aFocusedItr = aDataItr;
}
+ else
+ {
+ bHasSelect = sal_True;
+ }
++aDataItr;
++aXShapesItr;
}
@@ -941,6 +1015,7 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
(*aDataItr)->pAccShape->ResetState(AccessibleStateType::SELECTED);
(*aDataItr)->pAccShape->ResetState(AccessibleStateType::FOCUSED);
bResult = sal_True;
+ vecSelectedShapeRemove.push_back(*aDataItr);
}
}
++aDataItr;
@@ -955,9 +1030,120 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
else
++aDataItr;
}
- if ((aFocusedItr != aDataEndItr) && (*aFocusedItr)->pAccShape && (mnShapesSelected == 1))
+ bool bWinFocus=false;
+ ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
+ if (pWin)
+ {
+ bWinFocus = pWin->HasFocus();
+ }
+ const SdrMarkList* pMarkList = NULL;
+ SdrObject* pMarkedObj = NULL;
+ SdrObject* pUpObj = NULL;
+ sal_Bool bIsFocuseMarked = sal_True;
+ if( mpViewShell && mnShapesSelected == 1 && bWinFocus)
+ {
+ ScDrawView* pScDrawView = mpViewShell->GetViewData()->GetScDrawView();
+ if( pScDrawView )
+ {
+ if( pScDrawView->GetMarkedObjectList().GetMarkCount() == 1 )
+ {
+ pMarkList = &(pScDrawView->GetMarkedObjectList());
+ pMarkedObj = pMarkList->GetMark(0)->GetMarkedSdrObj();
+ uno::Reference< drawing::XShape > xMarkedXShape (pMarkedObj->getUnoShape(), uno::UNO_QUERY);
+ if( aFocusedItr != aDataEndItr &&
+ (*aFocusedItr)->xShape.is() &&
+ xMarkedXShape.is() &&
+ (*aFocusedItr)->xShape != xMarkedXShape )
+ bIsFocuseMarked = sal_False;
+ }
+ }
+ }
+ //if ((aFocusedItr != aDataEndItr) && (*aFocusedItr)->pAccShape && (mnShapesSelected == 1))
+ if ( bIsFocuseMarked && (aFocusedItr != aDataEndItr) && (*aFocusedItr)->pAccShape && (mnShapesSelected == 1) && bWinFocus)
+ {
(*aFocusedItr)->pAccShape->SetState(AccessibleStateType::FOCUSED);
+ }
+ else if( pFocusedObj && bWinFocus && pMarkList && pMarkList->GetMarkCount() == 1 && mnShapesSelected == 1 )
+ {
+ if( pMarkedObj )
+ {
+ uno::Reference< drawing::XShape > xMarkedXShape (pMarkedObj->getUnoShape(), uno::UNO_QUERY);
+ pUpObj = pMarkedObj->GetUpGroup();
+ if( pMarkedObj == pFocusedObj )
+ {
+ if( pUpObj )
+ {
+ uno::Reference< drawing::XShape > xUpGroupXShape (pUpObj->getUnoShape(), uno::UNO_QUERY);
+ uno::Reference < XAccessible > xAccGroupShape =
+ const_cast<ScChildrenShapes*>(this)->GetAccessibleCaption( xUpGroupXShape );
+ if( xAccGroupShape.is() )
+ {
+ ::accessibility::AccessibleShape* pAccGroupShape =
+ static_cast< ::accessibility::AccessibleShape* >(xAccGroupShape.get());
+ if( pAccGroupShape )
+ {
+ sal_Int32 nCount = pAccGroupShape->getAccessibleChildCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ uno::Reference<XAccessible> xAccShape = pAccGroupShape->getAccessibleChild(i);
+ if (xAccShape.is())
+ {
+ ::accessibility::AccessibleShape* pChildAccShape = static_cast< ::accessibility::AccessibleShape* >(xAccShape.get());
+ uno::Reference< drawing::XShape > xChildShape = pChildAccShape->GetXShape();
+ if (xChildShape == xMarkedXShape)
+ {
+ pChildAccShape->SetState(AccessibleStateType::FOCUSED);
+ }
+ else
+ {
+ pChildAccShape->ResetState(AccessibleStateType::FOCUSED);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if (vecSeth: 0.5%;'/>
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx2
-rw-r--r--sc/source/ui/cctrl/tbinsert.cxx2
-rw-r--r--sc/source/ui/condformat/colorformat.cxx2
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx2
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx2
-rw-r--r--sc/source/ui/vba/vbachart.cxx2
-rw-r--r--sc/source/ui/vba/vbahelper.cxx16
-rw-r--r--sc/source/ui/vba/vbainterior.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx4
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx2
-rw-r--r--scaddins/source/analysis/analysishelper.cxx2
-rw-r--r--sd/source/core/stlsheet.cxx2
-rw-r--r--sd/source/filter/eppt/epptso.cxx4
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx16
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx4
-rw-r--r--sd/source/filter/html/htmlex.cxx4
-rw-r--r--sd/source/filter/html/pubdlg.cxx2
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx4
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx2
-rw-r--r--sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx6
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx2
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx2
-rw-r--r--sd/source/ui/app/tbxww.cxx2
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx2
-rw-r--r--sd/source/ui/dlg/animobjs.cxx6
-rw-r--r--sd/source/ui/dlg/brkdlg.cxx12
-rw-r--r--sd/source/ui/dlg/copydlg.cxx4
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx6
-rw-r--r--sd/source/ui/dlg/prltempl.cxx2
-rw-r--r--sd/source/ui/dlg/tpaction.cxx2
-rw-r--r--sd/source/ui/dlg/tpoption.cxx4
-rw-r--r--sd/source/ui/remotecontrol/ImagePreparer.cxx4
-rw-r--r--sd/source/ui/remotecontrol/Listener.cxx6
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx2
-rw-r--r--sd/source/ui/slideshow/SlideShowRestarter.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlideSorterView.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx2
-rw-r--r--sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx2
-rw-r--r--sd/source/ui/unoidl/unolayer.cxx2
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx4
-rw-r--r--sd/source/ui/view/drviewsa.cxx6
-rw-r--r--sdext/source/minimizer/informationdialog.cxx2
-rw-r--r--sdext/source/minimizer/optimizerdialogcontrols.cxx16
-rw-r--r--sdext/source/minimizer/pppoptimizerdialog.cxx4
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx6
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx4
-rw-r--r--sdext/source/pdfimport/tree/writertreevisiting.cxx6
-rw-r--r--sdext/source/presenter/PresenterAccessibility.cxx2
-rw-r--r--sdext/source/presenter/PresenterController.cxx6
-rw-r--r--sdext/source/presenter/PresenterScreen.cxx2
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx2
-rw-r--r--sdext/source/presenter/PresenterToolBar.cxx8
-rw-r--r--sfx2/source/appl/fileobj.cxx2
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx4
-rw-r--r--sfx2/source/dialog/dockwin.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/doc/Metadatable.cxx2
-rw-r--r--sfx2/source/doc/docinf.cxx2
-rw-r--r--sfx2/source/doc/doctemplates.cxx4
-rw-r--r--sfx2/source/doc/graphhelp.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx6
-rw-r--r--sfx2/source/menu/virtmenu.cxx8
-rw-r--r--shell/source/backends/gconfbe/gconfaccess.cxx2
-rw-r--r--shell/source/backends/kde4be/kde4access.cxx2
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx2
-rw-r--r--starmath/source/cfgitem.cxx10
-rw-r--r--starmath/source/dialog.cxx2
-rw-r--r--stoc/source/javavm/javavm.cxx12
-rw-r--r--stoc/source/typeconv/convert.cxx14
-rw-r--r--svl/source/items/ptitem.cxx2
-rw-r--r--svl/source/items/stylepool.cxx2
-rw-r--r--svl/source/items/szitem.cxx2
-rw-r--r--svl/source/numbers/zforlist.cxx22
-rw-r--r--svl/source/numbers/zformat.cxx14
-rw-r--r--svl/source/numbers/zforscan.cxx2
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx10
-rw-r--r--svtools/source/config/fontsubstconfig.cxx2
-rw-r--r--svtools/source/control/calendar.cxx6
-rw-r--r--svtools/source/control/roadmap.cxx2
-rw-r--r--svtools/source/control/ruler.cxx4
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx2
-rw-r--r--svtools/source/filter/GraphicExportOptionsDialog.cxx2
-rw-r--r--svtools/source/filter/exportdialog.cxx2
-rw-r--r--svtools/source/misc/transfer.cxx8
-rw-r--r--svtools/source/svrtf/rtfout.cxx4
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx10
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx4
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx6
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx10
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx2
-rw-r--r--svx/source/form/fmsrccfg.cxx2
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx14
-rw-r--r--svx/source/form/formcontroller.cxx2
-rw-r--r--svx/source/form/navigatortree.cxx2
-rw-r--r--svx/source/form/tbxform.cxx2
-rw-r--r--svx/source/items/rotmodit.cxx2
-rw-r--r--svx/source/stbctrls/pszctrl.cxx4
-rw-r--r--svx/source/svdraw/svdattr.cxx10
-rw-r--r--svx/source/svdraw/svdibrow.cxx6
-rw-r--r--svx/source/svdraw/svdmodel.cxx2
-rw-r--r--svx/source/svdraw/svdtrans.cxx2
-rw-r--r--svx/source/svdraw/svdview.cxx8
-rw-r--r--svx/source/table/cell.cxx2
-rw-r--r--svx/source/table/tablertfexporter.cxx4
-rw-r--r--sw/source/core/access/accfootnote.cxx2
-rw-r--r--sw/source/core/access/accheaderfooter.cxx4
-rw-r--r--sw/source/core/access/accpage.cxx5
-rw-r--r--sw/source/core/doc/doc.cxx12
-rw-r--r--sw/source/core/doc/docnum.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx2
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/fields/cellfml.cxx12
-rw-r--r--sw/source/core/unocore/unochart.cxx6
-rw-r--r--sw/source/core/view/printdata.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx6
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx208
-rw-r--r--sw/source/filter/ww8/docxexport.cxx10
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx42
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx2
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx2
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx4
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx2
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx24
-rw-r--r--sw/source/ui/misc/outline.cxx2
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx4
-rw-r--r--sw/source/ui/shells/textsh.cxx2
-rw-r--r--sw/source/ui/table/chartins.cxx2
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx10
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx90
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx2
-rw-r--r--toolkit/source/controls/tabpagecontainer.cxx2
-rw-r--r--toolkit/source/controls/unocontrolcontainer.cxx2
-rw-r--r--tools/source/debug/debug.cxx2
-rw-r--r--tools/source/fsys/urlobj.cxx32
-rw-r--r--ucb/source/core/ucbcmds.cxx2
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx2
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.cxx2
-rw-r--r--ucb/source/ucp/file/shell.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx4
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx4
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx4
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/NeonUri.cxx4
-rw-r--r--ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx16
-rw-r--r--ucbhelper/source/client/proxydecider.cxx2
-rw-r--r--unotools/source/config/configitem.cxx2
-rw-r--r--unotools/source/config/dynamicmenuoptions.cxx2
-rw-r--r--unotools/source/config/historyoptions.cxx24
-rw-r--r--unotools/source/config/xmlaccelcfg.cxx4
-rw-r--r--unotools/source/misc/fontcvt.cxx4
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx2
-rw-r--r--uui/source/iahndl.cxx2
-rw-r--r--vbahelper/source/msforms/vbacontrols.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx16
-rw-r--r--vbahelper/source/vbahelper/vbashapes.cxx2
-rw-r--r--vcl/generic/print/glyphset.cxx4
-rw-r--r--vcl/generic/print/printerjob.cxx4
-rw-r--r--vcl/headless/svpdummies.cxx2
-rw-r--r--vcl/source/control/field.cxx4
-rw-r--r--vcl/source/gdi/graph.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx8
-rw-r--r--vcl/source/window/builder.cxx8
-rw-r--r--vcl/source/window/printdlg.cxx10
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx2
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx10
-rw-r--r--vcl/unx/gtk/gdi/salprn-gtk.cxx8
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx12
-rw-r--r--writerfilter/source/dmapper/FormControlHelper.cxx4
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx4
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx12
-rw-r--r--writerfilter/source/dmapper/OLEHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx4
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx8
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfvalue.cxx2
-rw-r--r--xmlhelp/source/treeview/tvread.cxx2
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx8
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx8
-rw-r--r--xmloff/source/core/RDFaExportHelper.cxx2
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx2
-rw-r--r--xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx2
-rw-r--r--xmloff/source/draw/animationexport.cxx2
-rw-r--r--xmloff/source/draw/animexp.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx10
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rw-r--r--xmloff/source/draw/shapeexport2.cxx6
-rw-r--r--xmloff/source/draw/shapeexport3.cxx2
-rw-r--r--xmloff/source/draw/shapeexport4.cxx14
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx2
-rw-r--r--xmloff/source/forms/elementimport.cxx2
-rw-r--r--xmloff/source/forms/layerexport.cxx2
-rw-r--r--xmloff/source/meta/xmlmetae.cxx6
-rw-r--r--xmloff/source/style/DashStyle.cxx4
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx6
-rw-r--r--xmloff/source/style/cdouthdl.cxx2
-rw-r--r--xmloff/source/style/impastp2.cxx2
-rw-r--r--xmloff/source/style/xmlnumfe.cxx24
-rw-r--r--xmloff/source/style/xmlnumfi.cxx4
-rw-r--r--xmloff/source/table/XMLTableExport.cxx4
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx4
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx2
-rw-r--r--xmloff/source/text/txtflde.cxx2
-rw-r--r--xmloff/source/text/txtlists.cxx4
-rw-r--r--xmloff/source/text/txtparae.cxx4
-rw-r--r--xmloff/source/text/txtvfldi.cxx2
-rw-r--r--xmloff/source/transform/Oasis2OOo.cxx4
-rw-r--r--xmloff/source/transform/StyleOASISTContext.cxx8
-rw-r--r--xmloff/source/transform/StyleOOoTContext.cxx10
-rw-r--r--xmloff/source/transform/TransformerBase.cxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/exp_share.hxx31
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx24
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx2
-rw-r--r--xmlsecurity/source/framework/buffernode.cxx4
-rw-r--r--xmlsecurity/source/framework/saxeventkeeperimpl.cxx6
-rw-r--r--xmlsecurity/source/helper/xsecsign.cxx4
-rw-r--r--xmlsecurity/source/helper/xsecverify.cxx4
490 files changed, 1733 insertions, 1572 deletions
diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index 244bb553f673..8f6b0670b1ea 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -406,7 +406,7 @@ lcl_CreateStream(uno::Reference<embed::XStorage> const& xStorage,
do
{
++count;
- filename = basename + OUString::valueOf(count) + suffix;
+ filename = basename + OUString::number(count) + suffix;
}
while (xStorage->hasByName(filename));
}
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 0593c12c867e..386a3ab72875 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -135,7 +135,7 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage,
if( bOutput )
{
- OUString aPageStr = " [" + IDE_RESSTR(RID_STR_PAGE) + " " + OUString::valueOf( nCurPage ) + "]";
+ OUString aPageStr = " [" + IDE_RESSTR(RID_STR_PAGE) + " " + OUString::number( nCurPage ) + "]";
pPrinter->DrawText( aPos, aPageStr );
}
}
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 1ccc4ada2ea7..578940f2ce96 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -113,7 +113,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
nFound = pCurWin->StartSearchAndReplace(rSearchItem);
OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES));
- aReplStr = aReplStr.replaceAll("XX", OUString::valueOf(nFound));
+ aReplStr = aReplStr.replaceAll("XX", OUString::number(nFound));
InfoBox( pCurWin, aReplStr ).Execute();
}
else
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index f0aa0bac3b6b..89f9f450eaf9 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -96,7 +96,7 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
while ( !bValid )
{
aMacroName = aStdMacroText;
- aMacroName += OUString::valueOf( nMacro );
+ aMacroName += OUString::number( nMacro );
// test whether existing...
bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) ? false : true;
nMacro++;
diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx
index 8baa2fe31bd0..3ee023b6149c 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -73,7 +73,7 @@ void LineNumberWindow::Paint( const Rectangle& )
sal_Int64 y = (nStartLine - 1) * (sal_Int64)nLineHeight;
for(sal_Int32 n = nStartLine; n <= nEndLine; ++n, y += nLineHeight)
- DrawText(Point(0, y - m_nCurYOffset), OUString::valueOf(n));
+ DrawText(Point(0, y - m_nCurYOffset), OUString::number(n));
}
void LineNumberWindow::DataChanged(DataChangedEvent const & rDCEvt)
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 996767f34e2b..fe87f4c04883 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -171,7 +171,7 @@ OUString implCreatePureResourceId
Reference< XStringResourceManager > xStringResourceManager )
{
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
- OUString aPureIdStr = OUString::valueOf( nUniqueId );
+ OUString aPureIdStr = OUString::number( nUniqueId );
aPureIdStr += aDot;
aPureIdStr += aDialogName;
aPureIdStr += aDot;
@@ -433,7 +433,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
}
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
- OUString aPureIdStr = OUString::valueOf( nUniqueId );
+ OUString aPureIdStr = OUString::number( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
@@ -527,7 +527,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
- OUString aPureIdStr = OUString::valueOf( nUniqueId );
+ OUString aPureIdStr = OUString::number( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
@@ -576,7 +576,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
- OUString aPureIdStr = OUString::valueOf( nUniqueId );
+ OUString aPureIdStr = OUString::number( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 3224c7129a80..17cc60798a33 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -1296,7 +1296,7 @@ namespace basctl
while ( !bValid )
{
aObjectName = aBaseName;
- aObjectName += OUString::valueOf( i );
+ aObjectName += OUString::number( i );
if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() )
bValid = true;
diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx
index 1396e22bbc99..2b331ce72e32 100644
--- a/basctl/source/basicide/tbxctl.cxx
+++ b/basctl/source/basicide/tbxctl.cxx
@@ -108,7 +108,7 @@ void TbxControls::StateChanged( sal_uInt16 nSID, SfxItemState eState,
if( nTemp )
{
OUString aSlotURL( "slot:" );
- aSlotURL += OUString::valueOf( sal_Int32( nTemp ));
+ aSlotURL += OUString::number( nTemp);
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages()
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index ba07117a26d2..d166e928331f 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -804,7 +804,7 @@ OUString DlgEdObj::GetUniqueName() const
do
{
- aUniqueName = aDefaultName + OUString::valueOf(++n);
+ aUniqueName = aDefaultName + OUString::number(++n);
} while (xNameAcc->hasByName(aUniqueName));
}
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 3ef3255a3030..298712372ccd 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1734,7 +1734,7 @@ sal_Bool StarBASIC::RTError( SbError code, const OUString& rMsg, sal_Int32 l, sa
// like vba ( adds an error number etc )
if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) )
{
- OUString aTmp = "\'" + OUString::valueOf(SbxErrObject::getUnoErrObject()->getNumber()) +
+ OUString aTmp = "\'" + OUString::number(SbxErrObject::getUnoErrObject()->getNumber()) +
"\'\n" + OUString(!GetSbData()->aErrMsg.isEmpty() ? GetSbData()->aErrMsg : rMsg);
code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp );
}
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index f3d27eddbcd1..57614271c857 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -280,7 +280,7 @@ const OUString& SbiTokenizer::Symbol( SbiToken t )
// character token?
if( t < FIRSTKWD )
{
- aSym = OUString::valueOf(sal::static_int_cast<sal_Unicode>(t));
+ aSym = OUString(sal::static_int_cast<sal_Unicode>(t));
return aSym;
}
switch( t )
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 3ae89cb80f7c..fb01bdbfb989 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -886,7 +886,7 @@ RTLFUNC(Hex)
sal_uInt32 nVal = pArg->IsInteger() ?
static_cast<sal_uInt16>(pArg->GetInteger()) :
static_cast<sal_uInt32>(pArg->GetLong());
- OUString aStr(OUString::valueOf( sal_Int64(nVal), 16 ));
+ OUString aStr(OUString::number( nVal, 16 ));
aStr = aStr.toAsciiUpperCase();
rPar.Get(0)->PutString( aStr );
}
@@ -4649,8 +4649,8 @@ RTLFUNC(Partition)
// will be handled properly during any subsequent sort operation.
// calculate the maximun number of characters before lowervalue and uppervalue
- OUString aBeforeStart = OUString::valueOf( nStart - 1 );
- OUString aAfterStop = OUString::valueOf( nStop + 1 );
+ OUString aBeforeStart = OUString::number( nStart - 1 );
+ OUString aAfterStop = OUString::number( nStop + 1 );
sal_Int32 nLen1 = aBeforeStart.getLength();
sal_Int32 nLen2 = aAfterStop.getLength();
sal_Int32 nLen = nLen1 >= nLen2 ? nLen1:nLen2;
@@ -4675,8 +4675,8 @@ RTLFUNC(Partition)
nLowerValue = ((( nNumber - nStart ) / nInterval ) * nInterval ) + nStart;
nUpperValue = nLowerValue + nInterval - 1;
}
- aLowerValue = OUString::valueOf( nLowerValue );
- aUpperValue = OUString::valueOf( nUpperValue );
+ aLowerValue = OUString::number( nLowerValue );
+ aUpperValue = OUString::number( nUpperValue );
}
nLen1 = aLowerValue.getLength();
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 422c0dde799c..851c6a8caa93 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -37,7 +37,7 @@ static OUString ImpCurrencyToString( const sal_Int64 &rVal )
ImpGetIntntlSep( cDecimalSep, cThousandSep );
#endif
- OUString aAbsStr = OUString::valueOf( absVal );
+ OUString aAbsStr = OUString::number( absVal );
OUStringBuffer aBuf;
sal_Int32 initialLen = aAbsStr.getLength();
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 6642789c58b1..649bb46f11c6 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -543,7 +543,7 @@ start:
if( !p->pOUString )
p->pOUString = new OUString;
- ::OString aOStr = ::OString::valueOf( n );
+ ::OString aOStr = OString::number( n );
(*p->pOUString) = ::OStringToOUString
( aOStr, RTL_TEXTENCODING_ASCII_US );
break;
@@ -821,7 +821,7 @@ start:
SbxBase::SetError( SbxERR_CONVERSION );
else
{
- ::OString aOStr = ::OString::valueOf( (sal_Int64)n );
+ ::OString aOStr = OString::number( n );
(*p->pOUString) = ::OStringToOUString
( aOStr, RTL_TEXTENCODING_ASCII_US );
}
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index ac609287bf74..ea82ec7a0c7c 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -827,7 +827,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
OString aNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
OString aClassNameStr(OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US));
rStrm << "Object( "
- << OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr()<< "=='"
+ << OString::number(reinterpret_cast<sal_Int64>(this)).getStr()<< "=='"
<< ( aNameStr.isEmpty() ? "<unnamed>" : aNameStr.getStr() ) << "', "
<< "of class '" << aClassNameStr.getStr() << "', "
<< "counts "
@@ -837,7 +837,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
{
OString aParentNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
rStrm << "in parent "
- << OString::valueOf(reinterpret_cast<sal_Int64>(GetParent())).getStr()
+ << OString::number(reinterpret_cast<sal_Int64>(GetParent())).getStr()
<< "=='" << ( aParentNameStr.isEmpty() ? "<unnamed>" : aParentNameStr.getStr() ) << "'";
}
else
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 180de7ed0ac6..e3545ef1a130 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -471,12 +471,12 @@ bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType )
{
if( rSrc.equalsIgnoreAsciiCase("true") )
{
- aNewString = OUString::valueOf( (sal_Int32)SbxTRUE );
+ aNewString = OUString::number( SbxTRUE );
bChanged = true;
}
else if( rSrc.equalsIgnoreAsciiCase("false") )
{
- aNewString = OUString::valueOf( (sal_Int32)SbxFALSE );
+ aNewString = OUString::number( SbxFALSE );
bChanged = true;
}
break;
@@ -825,13 +825,13 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
}
else
{
- rRes = OUString::valueOf(nMin);
+ rRes = OUString::number(nMin);
}
}
else if( aFmtStr.equalsIgnoreAsciiCase( VBAFORMAT_W ))
{
sal_Int32 nWeekDay = implGetWeekDay( nNumber );
- rRes = OUString::valueOf(nWeekDay);
+ rRes = OUString::number(nWeekDay);
}
else if( aFmtStr.equalsIgnoreAsciiCase( VBAFORMAT_Y ))
{
@@ -839,7 +839,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
double dBaseDate;
implDateSerial( nYear, 1, 1, dBaseDate );
sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate );
- rRes = OUString::valueOf(nYear32);
+ rRes = OUString::number(nYear32);
}
else
{
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 6c4c09b72e6d..8fb9e0897da2 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -737,7 +737,7 @@ void SbxVariable::Dump( SvStream& rStrm, sal_Bool bFill )
{
OString aBNameStr(OUStringToOString(GetName( SbxNAME_SHORT_TYPES ), RTL_TEXTENCODING_ASCII_US));
rStrm << "Variable( "
- << OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr() << "=="
+ << OString::number(reinterpret_cast<sal_Int64>(this)).getStr() << "=="
<< aBNameStr.getStr();
OString aBParentNameStr(OUStringToOString(GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US));
if ( GetParent() )
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index ce14003f9f84..3973836e797c 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -254,7 +254,7 @@ namespace cairocanvas
if( mpRefDevice )
{
OUString aFilename("dbg_frontbuffer");
- aFilename += OUString::valueOf(nFilePostfixCount);
+ aFilename += OUString::number(nFilePostfixCount);
aFilename += ".bmp";
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
diff --git a/canvas/source/tools/verifyinput.cxx b/canvas/source/tools/verifyinput.cxx
index b682caf20929..48fdad5f6456 100644
--- a/canvas/source/tools/verifyinput.cxx
+++ b/canvas/source/tools/verifyinput.cxx
@@ -227,7 +227,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): AffineMatrix2D contains infinite or NAN value(s) at the following positions (m00-m12): " +
- OUString::valueOf(nBinaryState),
+ OUString::number(nBinaryState),
xIf, nArgPos );
}
#else
@@ -262,7 +262,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): Matrix2D contains infinite or NAN value(s) at the following positions (m00-m11): " +
- OUString::valueOf(nBinaryState),
+ OUString::number(nBinaryState),
xIf, nArgPos );
}
#else
@@ -300,9 +300,9 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): render state's device color has too few components (" +
- OUString::valueOf(nMinColorComponents) +
+ OUString::number(nMinColorComponents) +
" expected, " +
- OUString::valueOf(renderState.DeviceColor.getLength()) +
+ OUString::number(renderState.DeviceColor.getLength()) +
" provided)",
xIf, nArgPos );
#else
@@ -317,7 +317,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): render state's CompositeOperation value out of range (" +
- OUString::valueOf(sal::static_int_cast<sal_Int32>(renderState.CompositeOperation)) +
+ OUString::number(sal::static_int_cast<sal_Int32>(renderState.CompositeOperation)) +
" not known)",
xIf, nArgPos );
#else
@@ -342,7 +342,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): textures' alpha value out of range (is " +
- OUString::valueOf(texture.Alpha) + ")",
+ OUString::number(texture.Alpha) + ")",
xIf, nArgPos );
#else
throw lang::IllegalArgumentException();
@@ -368,7 +368,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): textures' RepeatModeX value is out of range (" +
- OUString::valueOf(sal::static_int_cast<sal_Int32>(texture.RepeatModeX)) +
+ OUString::number(sal::static_int_cast<sal_Int32>(texture.RepeatModeX)) +
" not known)",
xIf, nArgPos );
#else
@@ -383,7 +383,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): textures' RepeatModeY value is out of range (" +
- OUString::valueOf(sal::static_int_cast<sal_Int32>(texture.RepeatModeY)) +
+ OUString::number(sal::static_int_cast<sal_Int32>(texture.RepeatModeY)) +
" not known)",
xIf, nArgPos );
#else
@@ -413,7 +413,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(mpStr) +
": verifyInput(): one of stroke attributes' DashArray value out of range (is " +
- OUString::valueOf(rVal) + ")",
+ OUString::number(rVal) + ")",
mrIf, mnArgPos );
#else
throw lang::IllegalArgumentException();
@@ -439,7 +439,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): stroke attributes' StrokeWidth value out of range (is " +
- OUString::valueOf(strokeAttributes.StrokeWidth) +
+ OUString::number(strokeAttributes.StrokeWidth) +
")",
xIf, nArgPos );
#else
@@ -454,7 +454,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): stroke attributes' MiterLimit value out of range (is " +
- OUString::valueOf(strokeAttributes.MiterLimit) + ")",
+ OUString::number(strokeAttributes.MiterLimit) + ")",
xIf, nArgPos );
#else
throw lang::IllegalArgumentException();
@@ -476,7 +476,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): stroke attributes' StartCapType value is out of range (" +
- OUString::valueOf(sal::static_int_cast<sal_Int32>(strokeAttributes.StartCapType)) +
+ OUString::number(sal::static_int_cast<sal_Int32>(strokeAttributes.StartCapType)) +
" not known)",
xIf, nArgPos );
#else
@@ -491,7 +491,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): stroke attributes' StartCapType value is out of range (" +
- OUString::valueOf(sal::static_int_cast<sal_Int32>(strokeAttributes.EndCapType)) +
+ OUString::number(sal::static_int_cast<sal_Int32>(strokeAttributes.EndCapType)) +
" not known)",
xIf, nArgPos );
#else
@@ -506,7 +506,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): stroke attributes' JoinType value is out of range (" +
- OUString::valueOf(sal::static_int_cast<sal_Int32>(strokeAttributes.JoinType)) +
+ OUString::number(sal::static_int_cast<sal_Int32>(strokeAttributes.JoinType)) +
" not known)",
xIf, nArgPos );
#else
@@ -578,7 +578,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyInput(): bitmap layout's ColorSpace getEndianness() value is out of range (" +
- OUString::valueOf(sal::static_int_cast<sal_Int32>(bitmapLayout.ColorSpace->getEndianness())) +
+ OUString::number(sal::static_int_cast<sal_Int32>(bitmapLayout.ColorSpace->getEndianness())) +
" not known)",
xIf, nArgPos );
#else
@@ -683,7 +683,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyBitmapSize(): size has 0 or negative width (value: " +
- OUString::valueOf(size.Width) + ")",
+ OUString::number(size.Width) + ")",
xIf, 0 );
#else
throw lang::IllegalArgumentException();
@@ -696,7 +696,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifyBitmapSize(): size has 0 or negative height (value: " +
- OUString::valueOf(size.Height) +
+ OUString::number(size.Height) +
")",
xIf, 0 );
#else
@@ -717,7 +717,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifySpriteSize(): size has 0 or negative width (value: " +
- OUString::valueOf(size.Width) + ")",
+ OUString::number(size.Width) + ")",
xIf, 0 );
#else
throw lang::IllegalArgumentException();
@@ -730,7 +730,7 @@ namespace canvas
throw lang::IllegalArgumentException(
OUString::createFromAscii(pStr) +
": verifySpriteSize(): size has 0 or negative height (value: " +
- OUString::valueOf(size.Height) + ")",
+ OUString::number(size.Height) + ")",
xIf, 0 );
#else
throw lang::IllegalArgumentException();
diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx
index dc568749ee75..b874bd1a5ff3 100644
--- a/canvas/source/vcl/devicehelper.cxx
+++ b/canvas/source/vcl/devicehelper.cxx
@@ -212,7 +212,7 @@ namespace vclcanvas
if( mpOutDev )
{
OUString aFilename("dbg_frontbuffer");
- aFilename += OUString::valueOf(nFilePostfixCount);
+ aFilename += OUString::number(nFilePostfixCount);
aFilename += OUString(".bmp");
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index 185d440d76a5..88a297025158 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -645,9 +645,9 @@ namespace vclcanvas
mpRedrawManager->forEachSprite( makeAdder(nCount,sal_Int32(1)) );
OUString text(
- OUString::valueOf(
+ OUString::number(
// disambiguate overload...
- static_cast<sal_Int64>(nCount) ) );
+ nCount ) );
// pad with leading space
while( text.getLength() < 3 )
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index 0a0e4b578f0f..2e1063c5f8b6 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -129,7 +129,7 @@ namespace vclcanvas
if( mpBackBuffer )
{
OUString aFilename("dbg_backbuffer");
- aFilename += OUString::valueOf(nFilePostfixCount);
+ aFilename += OUString::number(nFilePostfixCount);
aFilename += OUString(".bmp");
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 21474063a36b..74cf3cc32045 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -566,8 +566,8 @@ Reference< XAccessible > AccessibleBase::ImplGetAccessibleChildById( sal_Int32 i
i < 0 ||
static_cast< ChildListVectorType::size_type >( i ) >= m_aChildList.size() )
{
- OUString aBuf = "Index " + OUString::valueOf( i ) + " is invalid for range [ 0, " +
- OUString::valueOf( static_cast< sal_Int32 >( m_aChildList.size() - 1 ) ) +
+ OUString aBuf = "Index " + OUString::number( i ) + " is invalid for range [ 0, " +
+ OUString::number( m_aChildList.size() - 1 ) +
" ]";
lang::IndexOutOfBoundsException aEx( aBuf,
const_cast< ::cppu::OWeakObject * >(
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 2ea1cf0babae..c86b10eec542 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -574,7 +574,7 @@ void DataBrowser::RenewTable()
GetDataWindow().LogicToPixel( Size( 42, 0 )).getWidth() ));
OUString aDefaultSeriesName(SCH_RESSTR(STR_COLUMN_LABEL));
- replaceParamterInString( aDefaultSeriesName, "%COLUMNNUMBER", OUString::valueOf( sal_Int32(24) ) );
+ replaceParamterInString( aDefaultSeriesName, "%COLUMNNUMBER", OUString::number( 24 ) );
sal_Int32 nColumnWidth = GetDataWindow().GetTextWidth( aDefaultSeriesName )
+ GetDataWindow().LogicToPixel( Point( 4 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0 ), MAP_APPFONT ).X();
sal_Int32 nColumnCount = m_apDataBrowserModel->getColumnCount();
@@ -640,7 +640,7 @@ OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
OUString DataBrowser::GetRowString( sal_Int32 nRow ) const
{
- return OUString::valueOf(nRow + 1);
+ return OUString::number(nRow + 1);
}
OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 5a63bad5c77d..6e2c6576b269 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -382,7 +382,7 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
// values
Reference< chart2::data::XDataSequence > xNewSeq(
xDataProvider->createDataSequenceByRangeRepresentation(
- OUString::valueOf( nIndex )));
+ OUString::number( nIndex )));
lcl_copyDataSequenceProperties(
aLSequences[nSeqIdx]->getValues(), xNewSeq );
aLSequences[nSeqIdx]->setValues( xNewSeq );
@@ -391,7 +391,7 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
Reference< chart2::data::XDataSequence > xNewLabelSeq(
xDataProvider->createDataSequenceByRangeRepresentation(
"label " +
- OUString::valueOf( nIndex )));
+ OUString::number( nIndex )));
lcl_copyDataSequenceProperties(
aLSequences[nSeqIdx]->getLabel(), xNewLabelSeq );
aLSequences[nSeqIdx]->setLabel( xNewLabelSeq );
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index ef63d909ad2c..943081c9d5d1 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -507,7 +507,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
sal_Int32 nIndex = aRet.indexOf( aWildcard );
if( nIndex != -1 )
{
- aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), OUString::valueOf(nPointIndex+1) );
+ aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), OUString::number(nPointIndex+1) );
}
//replace data series index
@@ -526,7 +526,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
}
}
- OUString aReplacement( OUString::valueOf(nSeriesIndex+1) );
+ OUString aReplacement( OUString::number(nSeriesIndex+1) );
aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), aReplacement );
}
@@ -673,7 +673,7 @@ OUString ObjectNameProvider::getSelectedObjectText( const OUString & rObjectCID,
sal_Int32 nPointIndex( ObjectIdentifier::getParticleID(rObjectCID).toInt32() );
// replace data point index
- replaceParamterInString( aRet, "%POINTNUMBER", OUString::valueOf( nPointIndex + 1 ));
+ replaceParamterInString( aRet, "%POINTNUMBER", OUString::number( nPointIndex + 1 ));
// replace data series index
{
@@ -685,7 +685,7 @@ OUString ObjectNameProvider::getSelectedObjectText( const OUString & rObjectCID,
if( aSeriesVector[nSeriesIndex] == xSeries )
break;
}
- replaceParamterInString( aRet, "%SERIESNUMBER", OUString::valueOf( nSeriesIndex + 1 ) );
+ replaceParamterInString( aRet, "%SERIESNUMBER", OUString::number( nSeriesIndex + 1 ) );
}
// replace point value
@@ -743,7 +743,7 @@ OUString ObjectNameProvider::getNameForCID(
aRet += getName( OBJECTTYPE_DATA_POINT );
sal_Int32 nPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( rObjectCID );
aRet += " ";
- aRet += OUString::valueOf(nPointIndex+1);
+ aRet += OUString::number(nPointIndex+1);
if( eType == OBJECTTYPE_DATA_LABEL )
{
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index fb8b8fd59a04..6cfa45dc978d 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -58,7 +58,7 @@ LightButton::LightButton( Window* pParent, const ResId& rResId, sal_Int32 nLight
if( nIndex != -1 )
{
aTipHelp = aTipHelp.replaceAt(nIndex, aReplacementStr.getLength(),
- OUString::valueOf( nLightNumber ) );
+ OUString::number( nLightNumber ) );
}
this->SetQuickHelpText( String( aTipHelp ) );
}
@@ -143,13 +143,13 @@ namespace
OUString lcl_makeColorName( Color rColor )
{
OUString aStr = SVX_RESSTR(RID_SVXFLOAT3D_FIX_R) +
- OUString::valueOf((sal_Int32)rColor.GetRed()) +
+ OUString::number(rColor.GetRed()) +
" " +
SVX_RESSTR(RID_SVXFLOAT3D_FIX_G) +
- OUString::valueOf((sal_Int32)rColor.GetGreen()) +
+ OUString::number(rColor.GetGreen()) +
" " +
SVX_RESSTR(RID_SVXFLOAT3D_FIX_B) +
- OUString::valueOf((sal_Int32)rColor.GetBlue());
+ OUString::number(rColor.GetBlue());
return aStr;
}
void lcl_selectColor( ColorListBox& rListBox, const Color& rColor )
@@ -173,7 +173,7 @@ namespace
OUString aColorPropertyPrefix("D3DSceneLightColor");
OUString aDirectionPropertyPrefix("D3DSceneLightDirection");
OUString aEnabledPropertyPrefix("D3DSceneLightOn");
- OUString aIndex( OUString::valueOf( nIndex + 1 ));
+ OUString aIndex( OUString::number( nIndex + 1 ));
try
{
@@ -201,7 +201,7 @@ namespace
OUString aColorPropertyPrefix("D3DSceneLightColor");
OUString aDirectionPropertyPrefix("D3DSceneLightDirection");
OUString aEnabledPropertyPrefix("D3DSceneLightOn");
- OUString aIndex( OUString::valueOf( nIndex + 1 ));
+ OUString aIndex( OUString::number( nIndex + 1 ));
try
{
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index ffbd7bcb69b1..91d6ca4e65a2 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -475,7 +475,7 @@ void DataSourceTabPage::fillSeriesListBox()
if( nIndex != -1 )
aLabel = OUString( aResString.replaceAt(
nIndex, aReplacementStr.getLength(),
- OUString::valueOf(nUnnamedSeriesIndex)));
+ OUString::number(nUnnamedSeriesIndex)));
}
if( aLabel.isEmpty() )
aLabel = ::chart::SchResId( STR_DATA_UNNAMED_SERIES ).toString();
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index 3aa1f2a84df5..99923f212779 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -72,7 +72,7 @@ DragMethod_PieSegment::~DragMethod_PieSegment()
void DragMethod_PieSegment::TakeSdrDragComment(String& rStr) const
{
rStr = SCH_RESSTR(STR_STATUS_PIE_SEGMENT_EXPLODED);
- rStr.SearchAndReplaceAscii( "%PERCENTVALUE", OUString::valueOf( static_cast<sal_Int32>((m_fAdditionalOffset+m_fInitialOffset)*100.0) ));
+ rStr.SearchAndReplaceAscii( "%PERCENTVALUE", OUString::number( static_cast<sal_Int32>((m_fAdditionalOffset+m_fInitialOffset)*100.0) ));
}
bool DragMethod_PieSegment::BeginSdrDrag()
{
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 4e118ee37360..cb264ea022dc 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -262,7 +262,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper*
}
//check whether the diagram was hit but not selected (e.g. because it has no filling):
- OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::valueOf( sal_Int32(0) ) );
+ OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) );
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model
bool bBackGroundHit = m_aSelectedOID.getObjectCID().equals( aPageCID ) || m_aSelectedOID.getObjectCID().equals( aWallCID ) || !m_aSelectedOID.isAutoGeneratedObject();
if( bBackGroundHit )
@@ -431,7 +431,7 @@ OUString SelectionHelper::getHitObjectCID(
{
if( aRet.equals( aPageCID ) )
{
- OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::valueOf( sal_Int32(0) ) );
+ OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) );
//todo: if more than one diagram is available in future do chack the list of all diagrams here
SdrObject* pDiagram = rDrawViewWrapper.getNamedSdrObject( aDiagramCID );
if( pDiagram )
@@ -448,7 +448,7 @@ OUString SelectionHelper::getHitObjectCID(
if( aRet.equals( aWallCID ) )
{
- OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::valueOf( sal_Int32(0) ) );
+ OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) );
aRet = aDiagramCID;
}
}
diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx
index 66424a9a0f7a..0cc7038fcb88 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -47,7 +47,7 @@ struct lcl_NumberedStringGenerator
vector< uno::Any > operator()()
{
vector< uno::Any > aRet(1);
- aRet[0] = uno::makeAny( m_aStub.replaceAt( m_nStubStartIndex, m_nWildcardLength, OUString::valueOf( ++m_nCounter )) );
+ aRet[0] = uno::makeAny( m_aStub.replaceAt( m_nStubStartIndex, m_nWildcardLength, OUString::number( ++m_nCounter )) );
return aRet;
}
private:
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 8168c266db91..597e2be1e706 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -125,7 +125,7 @@ struct lcl_internalizeSeries : public ::std::unary_function< Reference< chart2::
for( sal_Int32 i=0; i<aOldSeriesData.getLength(); ++i )
{
sal_Int32 nNewIndex( m_bDataInColumns ? m_rInternalData.appendColumn() : m_rInternalData.appendRow() );
- OUString aIdentifier( OUString::valueOf( nNewIndex ));
+ OUString aIdentifier( OUString::number( nNewIndex ));
//@todo: deal also with genericXDataSequence
Reference< chart2::data::XNumericalDataSequence > xValues( aOldSeriesData[i]->getValues(), uno::UNO_QUERY );
Reference< chart2::data::XTextualDataSequence > xLabel( aOldSeriesData[i]->getLabel(), uno::UNO_QUERY );
@@ -468,10 +468,10 @@ void InternalDataProvider::lcl_increaseMapReferences(
{
for( sal_Int32 nIndex = nEnd - 1; nIndex >= nBegin; --nIndex )
{
- lcl_adaptMapReferences( OUString::valueOf( nIndex ),
- OUString::valueOf( nIndex + 1 ));
- lcl_adaptMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ),
- lcl_aLabelRangePrefix + OUString::valueOf( nIndex + 1 ));
+ lcl_adaptMapReferences( OUString::number( nIndex ),
+ OUString::number( nIndex + 1 ));
+ lcl_adaptMapReferences( lcl_aLabelRangePrefix + OUString::number( nIndex ),
+ lcl_aLabelRangePrefix + OUString::number( nIndex + 1 ));
}
}
@@ -480,10 +480,10 @@ void InternalDataProvider::lcl_decreaseMapReferences(
{
for( sal_Int32 nIndex = nBegin; nIndex < nEnd; ++nIndex )
{
- lcl_adaptMapReferences( OUString::valueOf( nIndex ),
- OUString::valueOf( nIndex - 1 ));
- lcl_adaptMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ),
- lcl_aLabelRangePrefix + OUString::valueOf( nIndex - 1 ));
+ lcl_adaptMapReferences( OUString::number( nIndex ),
+ OUString::number( nIndex - 1 ));
+ lcl_adaptMapReferences( lcl_aLabelRangePrefix + OUString::number( nIndex ),
+ lcl_aLabelRangePrefix + OUString::number( nIndex - 1 ));
}
}
@@ -548,7 +548,7 @@ Reference< chart2::data::XDataSequence > InternalDataProvider::lcl_createDataSeq
{
m_aInternalData.insertColumn( n );
m_aInternalData.setColumnValues( n, aNewData );
- aRangeRepresentation = OUString::valueOf( n );
+ aRangeRepresentation = OUString::number( n );
}
else if( nCategories > 1 )
{
@@ -556,7 +556,7 @@ Reference< chart2::data::XDataSequence > InternalDataProvider::lcl_createDataSeq
}
else
{
- aRangeRepresentation = lcl_aLabelRangePrefix+OUString::valueOf( n );
+ aRangeRepresentation = lcl_aLabelRangePrefix+OUString::number( n );
}
}
@@ -629,7 +629,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
for( sal_Int32 nL=0; nL<nLevelCount; nL++ )
aComplexCategories.push_back( new LabeledDataSequence(
new UncachedDataSequence( this
- , lcl_aCategoriesLevelRangeNamePrefix + OUString::valueOf( nL )
+ , lcl_aCategoriesLevelRangeNamePrefix + OUString::number( nL )
, lcl_aCategoriesRoleName ) ) );
}
else
@@ -638,7 +638,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
for( sal_Int32 nP=0; nP<nPointCount; nP++ )
aComplexCategories.push_back( new LabeledDataSequence(
new UncachedDataSequence( this
- , lcl_aCategoriesPointRangeNamePrefix + OUString::valueOf( nP )
+ , lcl_aCategoriesPointRangeNamePrefix + OUString::number( nP )
, lcl_aCategoriesRoleName ) ) );
}
//don't add the created sequences to the map as they are used temporarily only ...
@@ -661,8 +661,8 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
{
aDataVec.push_back(
new LabeledDataSequence(
- lcl_createDataSequenceAndAddToMap( OUString::valueOf( nIdx )),
- lcl_createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::valueOf( nIdx ))));
+ lcl_createDataSequenceAndAddToMap( OUString::number( nIdx )),
+ lcl_createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::number( nIdx ))));
}
// attention: this data provider has the limitation that it stores
@@ -745,14 +745,14 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa
{
// label
sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
- return lcl_createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ));
+ return lcl_createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::number( nIndex ));
}
else if ( aRangeRepresentation == "last" )
{
sal_Int32 nIndex = (m_bDataInColumns
? m_aInternalData.getColumnCount()
: m_aInternalData.getRowCount()) - 1;
- return lcl_createDataSequenceAndAddToMap( OUString::valueOf( nIndex ));
+ return lcl_createDataSequenceAndAddToMap( OUString::number( nIndex ));
}
else if( !aRangeRepresentation.isEmpty())
{
@@ -836,7 +836,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
if( nLevelCount == 1 )
{
sal_Int32 nL=0;
- aResult = this->getDataByRangeRepresentation( lcl_aCategoriesLevelRangeNamePrefix + OUString::valueOf( nL ) );
+ aResult = this->getDataByRangeRepresentation( lcl_aCategoriesLevelRangeNamePrefix + OUString::number( nL ) );
}
else
{
@@ -953,8 +953,8 @@ void SAL_CALL InternalDataProvider::insertSequence( ::sal_Int32 nAfterIndex )
void SAL_CALL InternalDataProvider::deleteSequence( ::sal_Int32 nAtIndex )
throw (uno::RuntimeException)
{
- lcl_deleteMapReferences( OUString::valueOf( nAtIndex ));
- lcl_deleteMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nAtIndex ));
+ lcl_deleteMapReferences( OUString::number( nAtIndex ));
+ lcl_deleteMapReferences( lcl_aLabelRangePrefix + OUString::number( nAtIndex ));
if( m_bDataInColumns )
{
lcl_decreaseMapReferences( nAtIndex + 1, m_aInternalData.getColumnCount());
@@ -1028,7 +1028,7 @@ void SAL_CALL InternalDataProvider::insertDataPointForAllSequences( ::sal_Int32
// notify change to all affected ranges
tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( "0"));
- tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep )));
+ tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::number( nMaxRep )));
::std::for_each( aBegin, aEnd, lcl_setModified());
tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
@@ -1052,7 +1052,7 @@ void SAL_CALL InternalDataProvider::deleteDataPointForAllSequences( ::sal_Int32
// notify change to all affected ranges
tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( "0"));
- tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep )));
+ tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::number( nMaxRep )));
::std::for_each( aBegin, aEnd, lcl_setModified());
tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
@@ -1072,7 +1072,7 @@ void SAL_CALL InternalDataProvider::swapDataPointWithNextOneForAllSequences( ::s
// notify change to all affected ranges
tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( "0"));
- tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep )));
+ tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::number( nMaxRep )));
::std::for_each( aBegin, aEnd, lcl_setModified());
tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
@@ -1193,18 +1193,18 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
if( aRange.aUpperLeft.nColumn == 0 )
return lcl_aCategoriesRangeName;
if( aRange.aUpperLeft.nRow == 0 )
- return lcl_aLabelRangePrefix + OUString::valueOf( aRange.aUpperLeft.nColumn - 1 );
+ return lcl_aLabelRangePrefix + OUString::number( aRange.aUpperLeft.nColumn - 1 );
- return OUString::valueOf( aRange.aUpperLeft.nColumn - 1 );
+ return OUString::number( aRange.aUpperLeft.nColumn - 1 );
}
// data in rows
if( aRange.aUpperLeft.nRow == 0 )
return lcl_aCategoriesRangeName;
if( aRange.aUpperLeft.nColumn == 0 )
- return lcl_aLabelRangePrefix + OUString::valueOf( aRange.aUpperLeft.nRow - 1 );
+ return lcl_aLabelRangePrefix + OUString::number( aRange.aUpperLeft.nRow - 1 );
- return OUString::valueOf( aRange.aUpperLeft.nRow - 1 );
+ return OUString::number( aRange.aUpperLeft.nRow - 1 );
}
namespace
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 9c09aab49727..b6da8e8e8720 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -467,7 +467,7 @@ OUString ObjectIdentifier::createParticleForCoordinateSystem(
{
aRet = ObjectIdentifier::createParticleForDiagram( xDiagram, xChartModel );
aRet.appendAscii(":CS=");
- aRet.append( OUString::valueOf( nCooSysIndex ) );
+ aRet.append( OUString::number( nCooSysIndex ) );
break;
}
}
@@ -482,9 +482,9 @@ OUString ObjectIdentifier::createParticleForAxis(
{
OUStringBuffer aRet("Axis=");
- aRet.append( OUString::valueOf( nDimensionIndex ) );
+ aRet.append( OUString::number( nDimensionIndex ) );
aRet.appendAscii(",");
- aRet.append( OUString::valueOf( nAxisIndex ) );
+ aRet.append( OUString::number( nAxisIndex ) );
return aRet.makeStringAndClear();
}
@@ -494,9 +494,9 @@ OUString ObjectIdentifier::createParticleForGrid(
, sal_Int32 nAxisIndex )
{
OUStringBuffer aRet("Axis=");
- aRet.append( OUString::valueOf( nDimensionIndex ) );
+ aRet.append( OUString::number( nDimensionIndex ) );
aRet.appendAscii(",");
- aRet.append( OUString::valueOf( nAxisIndex ) );
+ aRet.append( OUString::number( nAxisIndex ) );
aRet.append( ":Grid=0" );
return aRet.makeStringAndClear();
@@ -527,15 +527,15 @@ OUString ObjectIdentifier::createParticleForSeries(
OUStringBuffer aRet;
aRet.appendAscii("D=");
- aRet.append( OUString::valueOf( nDiagramIndex ) );
+ aRet.append( OUString::number( nDiagramIndex ) );
aRet.appendAscii(":CS=");
- aRet.append( OUString::valueOf( nCooSysIndex ) );
+ aRet.append( OUString::number( nCooSysIndex ) );
aRet.appendAscii(":CT=");
- aRet.append( OUString::valueOf( nChartTypeIndex ) );
+ aRet.append( OUString::number( nChartTypeIndex ) );
aRet.appendAscii(":");
aRet.append(getStringForType( OBJECTTYPE_DATA_SERIES ));
aRet.appendAscii("=");
- aRet.append( OUString::valueOf( nSeriesIndex ) );
+ aRet.append( OUString::number( nSeriesIndex ) );
return aRet.makeStringAndClear();
}
@@ -601,15 +601,15 @@ OUString ObjectIdentifier::createPieSegmentDragParameterString(
, const awt::Point& rMinimumPosition
, const awt::Point& rMaximumPosition )
{
- OUStringBuffer aRet( OUString::valueOf( nOffsetPercent ) );
+ OUStringBuffer aRet( OUString::number( nOffsetPercent ) );
aRet.append( sal_Unicode( ',' ));
- aRet.append( OUString::valueOf( rMinimumPosition.X ) );
+ aRet.append( OUString::number( rMinimumPosition.X ) );
aRet.append( sal_Unicode( ',' ));
- aRet.append( OUString::valueOf( rMinimumPosition.Y ) );
+ aRet.append( OUString::number( rMinimumPosition.Y ) );
aRet.append( sal_Unicode( ',' ));
- aRet.append( OUString::valueOf( rMaximumPosition.X ) );
+ aRet.append( OUString::number( rMaximumPosition.X ) );
aRet.append( sal_Unicode( ',' ));
- aRet.append( OUString::valueOf( rMaximumPosition.Y ) );
+ aRet.append( OUString::number( rMaximumPosition.Y ) );
return aRet.makeStringAndClear();
}
@@ -984,7 +984,7 @@ OUString ObjectIdentifier::createDataCurveCID(
, sal_Int32 nCurveIndex
, bool bAverageLine )
{
- OUString aParticleID( OUString::valueOf( nCurveIndex ) );
+ OUString aParticleID( OUString::number( nCurveIndex ) );
ObjectType eType = bAverageLine ? OBJECTTYPE_DATA_AVERAGE_LINE : OBJECTTYPE_DATA_CURVE;
return createClassifiedIdentifierWithParent( eType, aParticleID, rSeriesParticle );
}
@@ -993,7 +993,7 @@ OUString ObjectIdentifier::createDataCurveEquationCID(
const OUString& rSeriesParticle
, sal_Int32 nCurveIndex )
{
- OUString aParticleID( OUString::valueOf( nCurveIndex ) );
+ OUString aParticleID( OUString::number( nCurveIndex ) );
return createClassifiedIdentifierWithParent( OBJECTTYPE_DATA_CURVE_EQUATION, aParticleID, rSeriesParticle );
}
@@ -1015,7 +1015,7 @@ OUString ObjectIdentifier::createChildParticleWithIndex( ObjectType eObjectType,
if( !aRet.isEmpty() )
{
aRet.appendAscii("=");
- aRet.append(OUString::valueOf(nIndex));
+ aRet.append(OUString::number(nIndex));
}
return aRet.makeStringAndClear();
}
@@ -1045,7 +1045,7 @@ OUString ObjectIdentifier::createSeriesSubObjectStub( ObjectType eSubObjectType
OUString ObjectIdentifier::createPointCID( const OUString& rPointCID_Stub, sal_Int32 nIndex )
{
OUString aRet(rPointCID_Stub);
- return aRet+=OUString::valueOf( nIndex );
+ return aRet+=OUString::number( nIndex );
}
OUString ObjectIdentifier::getParticleID( const OUString& rCID )
diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx
index 96990b881bac..2ca570a2da7f 100644
--- a/chart2/source/tools/PropertyHelper.cxx
+++ b/chart2/source/tools/PropertyHelper.cxx
@@ -152,7 +152,7 @@ OUString lcl_addNamedPropertyUniqueNameToTable(
if( aMaxIt != aNumbers.end())
nIndex = (*aMaxIt) + 1;
- aUniqueName = rPrefix + OUString::valueOf( nIndex );
+ aUniqueName = rPrefix + OUString::number( nIndex );
}
OSL_ASSERT( !aUniqueName.isEmpty());
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index f783e2444473..5dda2a20b0f4 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2451,7 +2451,7 @@ void ChartView::createShapes()
//create the group shape for diagram and axes first to have title and legends on top of it
uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) );
- OUString aDiagramCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::valueOf( sal_Int32(0) ) ) );//todo: other index if more than one diagram is possible
+ OUString aDiagramCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) ) );//todo: other index if more than one diagram is possible
uno::Reference< drawing::XShapes > xDiagramPlusAxesPlusMarkHandlesGroup_Shapes( ShapeFactory(m_xShapeFactory).createGroup2D(xPageShapes,aDiagramCID) );
uno::Reference< drawing::XShape > xDiagram_MarkHandles( ShapeFactory(m_xShapeFactory).createInvisibleRectangle(
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index 645fd06b8398..6516b175da8e 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -355,7 +355,7 @@ bool FileStream::write(void const * buffer, sal_uInt64 size) {
FileStream &operator<<(FileStream& o, sal_uInt32 i) {
sal_uInt64 writtenBytes;
- OString s = OString::valueOf((sal_Int32)i);
+ OString s = OString::number(i);
osl_writeFile(o.m_file, s.getStr(), s.getLength() * sizeof(sal_Char), &writtenBytes);
return o;
}
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 94c9348da5b1..2d7df99a0e25 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -237,7 +237,7 @@ OUString EmbeddedObjectContainer::CreateUniqueObjectName()
do
{
aStr = aPersistName;
- aStr += OUString::valueOf( i++ );
+ aStr += OUString::number( i++ );
}
while( HasEmbeddedObject( aStr ) );
// TODO/LATER: should we consider deleted objects?
diff --git a/comphelper/source/misc/anytostring.cxx b/comphelper/source/misc/anytostring.cxx
index c9ddbeea5487..9cf551a965f3 100644
--- a/comphelper/source/misc/anytostring.cxx
+++ b/comphelper/source/misc/anytostring.cxx
@@ -42,7 +42,7 @@ inline void appendChar( OUStringBuffer & buf, sal_Unicode c )
if (c < ' ' || c > '~') {
buf.append( "\\X" );
OUString const s(
- OUString::valueOf( static_cast< sal_Int32 >(c), 16 ) );
+ OUString::number( static_cast< sal_Int32 >(c), 16 ) );
for ( sal_Int32 f = 4 - s.getLength(); f > 0; --f )
buf.append( static_cast< sal_Unicode >('0') );
buf.append( s );
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index 68ef68ceda5f..4fd527462083 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -55,8 +55,8 @@ OUString MimeConfigurationHelper::GetStringClassIDRepresentation( const uno::Seq
sal_Int32 nDigit1 = (sal_Int32)( (sal_uInt8)aClassID[nInd] / 16 );
sal_Int32 nDigit2 = (sal_uInt8)aClassID[nInd] % 16;
- aResult += OUString::valueOf( nDigit1, 16 );
- aResult += OUString::valueOf( nDigit2, 16 );
+ aResult += OUString::number( nDigit1, 16 );
+ aResult += OUString::number( nDigit2, 16 );
}
}
diff --git a/compilerplugins/clang/valueof.cxx b/compilerplugins/clang/valueof.cxx
new file mode 100644
index 000000000000..7f00ff676cb8
--- /dev/null
+++ b/compilerplugins/clang/valueof.cxx
@@ -0,0 +1,148 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * Based on LLVM/Clang.
+ *
+ * This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ *
+ */
+
+/*
+This is a rewriter.
+
+Replaces all calls to the deprecated O(U)String::valueOf() .
+
+*/
+
+#include "plugin.hxx"
+
+namespace loplugin
+{
+
+class ConvertValueOf
+ : public RecursiveASTVisitor< ConvertValueOf >
+ , public RewritePlugin
+ {
+ public:
+ explicit ConvertValueOf( CompilerInstance& compiler, Rewriter& rewriter );
+ virtual void run() override;
+ bool VisitCallExpr( const CallExpr* call );
+ private:
+ void removeCast( const Expr* arg );
+ };
+
+ConvertValueOf::ConvertValueOf( CompilerInstance& compiler, Rewriter& rewriter )
+ : RewritePlugin( compiler, rewriter )
+ {
+ }
+
+void ConvertValueOf::run()
+ {
+ TraverseDecl( compiler.getASTContext().getTranslationUnitDecl());
+ }
+
+bool ConvertValueOf::VisitCallExpr( const CallExpr* call )
+ {
+ if( ignoreLocation( call ))
+ return true;
+ // Using getDirectCallee() here means that we find only calls
+ // that call the function directly (i.e. not using a pointer, for example).
+ // Use getCallee() to include also those :
+ // if( const FunctionDecl* func = dyn_cast_or_null< FunctionDecl >( call->getCalleeDecl()))
+ if( const FunctionDecl* func = call->getDirectCallee())
+ {
+ // Optimize, getQualifiedNameAsString() is reportedly expensive,
+ // so first check fast details like number of arguments or the (unqualified)
+ // name before checking the fully qualified name.
+ // See FunctionDecl for all the API about the function.
+ if( func->getIdentifier() != NULL
+ && ( func->getName() == "valueOf" ))
+ {
+ string qualifiedName = func->getQualifiedNameAsString();
+ if( qualifiedName == "rtl::OString::valueOf" )
+ {
+ // Further checks about arguments. Check mainly ParmVarDecl, VarDecl,
+ // ValueDecl and QualType for Clang API details.
+ string arg0 = func->getParamDecl( 0 )->getType().getAsString();
+ if( arg0 == "sal_Bool" )
+ replaceText( call->getCallee()->getSourceRange(), "OString::boolean" );
+ else if( arg0 == "sal_Char" )
+ replaceText( call->getCallee()->getSourceRange(), "OString" );
+ else
+ {
+ replaceText( call->getCallee()->getSourceRange(), "OString::number" );
+ removeCast( call->getArg( 0 ));
+ }
+ }
+ if( qualifiedName == "rtl::OUString::valueOf" )
+ {
+ // Further checks about arguments. Check mainly ParmVarDecl, VarDecl,
+ // ValueDecl and QualType for Clang API details.
+ string arg0 = func->getParamDecl( 0 )->getType().getAsString();
+ if( arg0 == "sal_Bool" )
+ replaceText( call->getCallee()->getSourceRange(), "OUString::boolean" );
+ else if( arg0 == "sal_Unicode" )
+ replaceText( call->getCallee()->getSourceRange(), "OUString" );
+ else
+ {
+ replaceText( call->getCallee()->getSourceRange(), "OUString::number" );
+ removeCast( call->getArg( 0 ));
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+void ConvertValueOf::removeCast( const Expr* arg )
+ {
+ arg = arg->IgnoreImpCasts();
+ if( const ExplicitCastExpr* cast = dyn_cast< ExplicitCastExpr >( arg ))
+ {
+// Explicit casts don't seem to actually always change the type (integer promotion
+// takes place first?), so remove also preceding implicit casts:
+// void f( int );
+// char a;
+// f( int( a ));
+// |-CallExpr 0x1a84f20 <line:6:5, col:16> 'void'
+// | |-ImplicitCastExpr 0x1a84f08 <col:5> 'void (*)(int)' <FunctionToPointerDecay>
+// | | `-DeclRefExpr 0x1a84eb8 <col:5> 'void (int)' lvalue Function 0x1a58900 'f' 'void (int)'
+// | `-CXXFunctionalCastExpr 0x1a84e90 <col:8, col:15> 'int' functional cast to int <NoOp>
+// | `-ImplicitCastExpr 0x1a84e78 <col:13> 'int' <IntegralCast>
+// | `-ImplicitCastExpr 0x1a84e60 <col:13> 'char' <LValueToRValue>
+// | `-DeclRefExpr 0x1a58b88 <col:13> 'char' lvalue Var 0x1a58ab0 'a' 'char'
+ const Expr* castFrom = cast->getSubExpr()->IgnoreImpCasts();
+ if( cast->getType()->isIntegerType() && castFrom->getType()->isIntegerType())
+ {
+ string fromType = castFrom->getType().getAsString();
+ if( fromType != "sal_Bool" && fromType != "bool" && fromType != "sal_Char" && fromType != "sal_Unicode" )
+ {
+ if( const CXXFunctionalCastExpr* funcCast = dyn_cast< CXXFunctionalCastExpr >( cast ))
+ {
+ removeText( CharSourceRange::getCharRange( funcCast->getLocStart(),
+ compiler.getSourceManager().getExpansionLoc( funcCast->getSubExpr()->getLocStart())));
+ removeText( CharSourceRange::getCharRange( locationAfterToken(
+ compiler.getSourceManager().getExpansionLoc( funcCast->getSubExpr()->getLocEnd())),
+ locationAfterToken( funcCast->getLocEnd())));
+ }
+ else if( const CXXNamedCastExpr* namedCast = dyn_cast< CXXNamedCastExpr >( cast ))
+ {
+ removeText( CharSourceRange::getCharRange( namedCast->getLocStart(),
+ compiler.getSourceManager().getExpansionLoc( namedCast->getSubExpr()->getLocStart())));
+ removeText( CharSourceRange::getCharRange( locationAfterToken(
+ compiler.getSourceManager().getExpansionLoc( namedCast->getSubExpr()->getLocEnd())),
+ locationAfterToken( namedCast->getLocEnd())));
+ }
+ else if( const CStyleCastExpr* cCast = dyn_cast< CStyleCastExpr >( cast ))
+ removeText( SourceRange( cCast->getLocStart(), cCast->getRParenLoc()));
+ else
+ abort();
+ }
+ }
+ }
+ }
+
+static Plugin::Registration< ConvertValueOf > X( "convertvalueof" );
+
+} // namespace
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index 1ab181cb08c9..f099acfc7fd9 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -176,15 +176,15 @@ void writeValueContent(oslFileHandle handle, sal_Int16 value) {
}
void writeValueContent(oslFileHandle handle, sal_Int32 value) {
- writeData(handle, OString::valueOf(value));
+ writeData(handle, OString::number(value));
}
void writeValueContent(oslFileHandle handle, sal_Int64 value) {
- writeData(handle, OString::valueOf(value));
+ writeData(handle, OString::number(value));
}
void writeValueContent(oslFileHandle handle, double value) {
- writeData(handle, OString::valueOf(value));
+ writeData(handle, OString::number(value));
}
void writeValueContent(oslFileHandle handle, OUString const & value) {
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index 8506fef0b7dd..4b9f62019c51 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -225,7 +225,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL
{
sal_Int32 nValue = 0;
if ( pBegin->Value >>= nValue )
- sValue = OUString::valueOf(nValue);
+ sValue = OUString::number(nValue);
else
{
Sequence< OUString> aSeq;
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index fd51bfde1f06..a4880d4416f2 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1454,12 +1454,12 @@ OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString&
OUString sName( _rBaseName );
sal_Int32 nPos = 1;
if ( _bStartWithNumber )
- sName += OUString::valueOf( nPos );
+ sName += OUString::number( nPos );
while ( aUsedNames.find( sName ) != aUsedNames.end() )
{
sName = _rBaseName;
- sName += OUString::valueOf( ++nPos );
+ sName += OUString::number( ++nPos );
}
return sName;
}
@@ -1976,7 +1976,7 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams,
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceStringWithSubstitution(
STR_UNKNOWN_PARA_TYPE,
- "$position$", OUString::valueOf(parameterIndex)
+ "$position$", OUString::number(parameterIndex)
) );
::dbtools::throwGenericSQLException(sError,NULL);
}
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index bfa07500824c..233d249e111f 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -955,7 +955,7 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSour
SharedResources aResources;
OUString sMessage = aResources.getResourceStringWithSubstitution( STR_STRING_LENGTH_EXCEEDED,
"$string$", _rSource,
- "$maxlen$", OUString::valueOf( _nMaxLen ),
+ "$maxlen$", OUString::number( _nMaxLen ),
"$charset$", lcl_getEncodingName( _eEncoding )
);
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index b21a4765da23..9f05e883dff7 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -434,7 +434,7 @@ static OUString lcl_GetColumnStr( sal_Int32 nColumn )
{
//SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::lcl_GetColumnStr" );
if ( nColumn < 26 )
- return OUString::valueOf( (sal_Unicode) ( 'A' + nColumn ) );
+ return OUString( (sal_Unicode) ( 'A' + nColumn ) );
else
{
OUStringBuffer aBuffer(2);
@@ -504,7 +504,7 @@ void OCalcTable::fillColumns()
sal_Int32 nExprCnt = 0;
while(aFind != m_aColumns->get().end())
{
- (aAlias = aColumnName) += OUString::valueOf((sal_Int32)++nExprCnt);
+ (aAlias = aColumnName) += OUString::number(++nExprCnt);
aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
}
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index b4f445f7189e..7f0c00c46a15 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -976,13 +976,13 @@ OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, Runti
OUString SAL_CALL ODatabaseMetaData::getDriverVersion( ) throw(SQLException, RuntimeException)
{
SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDriverVersion" );
- return OUString::valueOf((sal_Int32)1);
+ return OUString::number(1);
}
// -------------------------------------------------------------------------
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException)
{
SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDatabaseProductVersion" );
- return OUString::valueOf((sal_Int32)0);
+ return OUString::number(0);
}
// -------------------------------------------------------------------------
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException)
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 175fd48a3dca..d34c5266c99f 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -350,7 +350,7 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
{
const OUString sError( m_pConnection->getResources().getResourceStringWithSubstitution(
STR_UNKNOWN_PARA_TYPE,
- "$position$", OUString::valueOf(parameterIndex)
+ "$position$", OUString::number(parameterIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
}
diff --git a/connectivity/source/drivers/file/FStringFunctions.cxx b/connectivity/source/drivers/file/FStringFunctions.cxx
index 15e49ff4323b..acac9ac82a93 100644
--- a/connectivity/source/drivers/file/FStringFunctions.cxx
+++ b/connectivity/source/drivers/file/FStringFunctions.cxx
@@ -114,7 +114,7 @@ ORowSetValue OOp_Locate::operate(const ::std::vector<ORowSetValue>& lhs) const
return ORowSetValue();
}
if ( lhs.size() == 2 )
- return OUString::valueOf(lhs[0].getString().indexOf(lhs[1].getString())+1);
+ return OUString::number(lhs[0].getString().indexOf(lhs[1].getString())+1);
else if ( lhs.size() != 3 )
return ORowSetValue();
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 75f804e93df6..899ad14cec74 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -110,7 +110,7 @@ namespace connectivity
OUString lcl_getNextCount()
{
static sal_Int32 s_nCount = 0;
- return OUString::valueOf(s_nCount++);
+ return OUString::number(s_nCount++);
}
// -----------------------------------------------------------------------------
OUString StorageContainer::removeURLPrefix(const OUString& _sURL,const OUString& _sFileURL)
@@ -295,7 +295,7 @@ namespace connectivity
sMessage += "\nMode: 0x";
if ( _nMode < 16 )
sMessage += "0";
- sMessage += OString::valueOf( _nMode, 16 ).toAsciiUpperCase();
+ sMessage += OString::number( _nMode, 16 ).toAsciiUpperCase();
OSL_FAIL( sMessage.getStr() );
#endif
StorageContainer::throwJavaException(e,env);
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 0458ad7d5af4..59a4b29b46f3 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -389,7 +389,7 @@ void SAL_CALL java_sql_PreparedStatement::setObject( sal_Int32 parameterIndex, c
{
const OUString sError( m_pConnection->getResources().getResourceStringWithSubstitution(
STR_UNKNOWN_PARA_TYPE,
- "$position$", OUString::valueOf(parameterIndex)
+ "$position$", OUString::number(parameterIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
}
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 6664ee0e21d8..34526cacdbde 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -842,7 +842,7 @@ void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::c
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceStringWithSubstitution(
STR_UNKNOWN_COLUMN_TYPE,
- "$position$", OUString::valueOf(columnIndex)
+ "$position$", OUString::number(columnIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
}
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
index 1f7e8798e40f..a850bdec26dd 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
@@ -654,13 +654,13 @@ OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, Runti
// -------------------------------------------------------------------------
OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException)
{
- OUString aValue = OUString::valueOf((sal_Int32)1);
+ OUString aValue = OUString::number(1);
return aValue;
}
// -------------------------------------------------------------------------
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException)
{
- OUString aValue = OUString::valueOf((sal_Int32)0);
+ OUString aValue = OUString::number(0);
return aValue;
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 7486f3f3c54a..c439d05d5c9d 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -936,7 +936,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
// Determine where '%' character is...
- if ( matchString.equals( OUString::valueOf( WILDCARD ) ) )
+ if ( matchString.equals( OUString( WILDCARD ) ) )
{
// String containing only a '%' and nothing else
op = MQueryOp::Exists;
@@ -1787,7 +1787,7 @@ void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) th
{
const OUString sError( m_pStatement->getOwnConnection()->getResources().getResourceStringWithSubstitution(
STR_COLUMN_NOT_UPDATEABLE,
- "$position$", OUString::valueOf(columnIndex)
+ "$position$", OUString::number(columnIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
} // if (!::dbtools::implUpdateObject(this, columnIndex, x))
@@ -1800,7 +1800,7 @@ void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any&
{
const OUString sError( m_pStatement->getOwnConnection()->getResources().getResourceStringWithSubstitution(
STR_COLUMN_NOT_UPDATEABLE,
- "$position$", OUString::valueOf(columnIndex)
+ "$position$", OUString::number(columnIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
}
diff --git a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
index 5d234c445ea4..c0e4f0dfc9cb 100644
--- a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
@@ -932,8 +932,8 @@ void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex)
{
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceStringWithSubstitution(STR_WRONG_PARAM_INDEX,
- "$pos$", OUString::valueOf(_parameterIndex),
- "$count$", OUString::valueOf((sal_Int32)numParams)
+ "$pos$", OUString::number(_parameterIndex),
+ "$count$", OUString::number(numParams)
));
SQLException aNext(sError,*this, OUString(),0,Any());
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index 365f9205bbcb..8e442f2e4c42 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -209,7 +209,7 @@ void OTools::bindValue( OConnection* _pConnection,
case SQL_DECIMAL:
case SQL_NUMERIC:
{
- OString aString = OString::valueOf(*(double*)_pValue);
+ OString aString = OString::number(*(double*)_pValue);
_nMaxLen = (SQLSMALLINT)aString.getLength();
*pLen = _nMaxLen;
*((OString*)_pData) = aString;
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 2442bbaab290..8ec5b6beec61 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1635,12 +1635,12 @@ static void columnMetaData2DatabaseTypeDescription(
// row[9] RADIX TODO
if( xRow->getBoolean( 6 ) && ! isSystemColumn(xRow->getInt( 12 )) )
{
- row[10] <<= OUString::valueOf(com::sun::star::sdbc::ColumnValue::NO_NULLS);
+ row[10] <<= OUString::number(com::sun::star::sdbc::ColumnValue::NO_NULLS);
row[17] <<= statics.NO;
}
else
{
- row[10] <<= OUString::valueOf(com::sun::star::sdbc::ColumnValue::NULLABLE);
+ row[10] <<= OUString::number(com::sun::star::sdbc::ColumnValue::NULLABLE);
row[17] <<= statics.YES;
}
@@ -1865,7 +1865,7 @@ static void columnMetaData2DatabaseTypeDescription(
if( tableOid != lastTableOid )
index = 1;
lastTableOid = tableOid;
- row[4] <<= OUString::valueOf( index );
+ row[4] <<= OUString::number( index );
index ++;
}
{
@@ -2305,14 +2305,14 @@ static void pgTypeInfo2ResultSet(
}
row[TYPE_NAME] <<= xRow->getString(1);
- row[DATA_TYPE] <<= OUString::valueOf(dataType);
- row[PRECISION] <<= OUString::valueOf( precision );
+ row[DATA_TYPE] <<= OUString::number(dataType);
+ row[PRECISION] <<= OUString::number( precision );
sal_Int32 nullable = xRow->getBoolean(4) ?
com::sun::star::sdbc::ColumnValue::NO_NULLS :
com::sun::star::sdbc::ColumnValue::NULLABLE;
- row[NULLABLE] <<= OUString::valueOf(nullable);
- row[CASE_SENSITIVE] <<= OUString::valueOf((sal_Int32)1);
- row[SEARCHABLE] <<= OUString::valueOf( calcSearchable( dataType ) );
+ row[NULLABLE] <<= OUString::number(nullable);
+ row[CASE_SENSITIVE] <<= OUString::number(1);
+ row[SEARCHABLE] <<= OUString::number( calcSearchable( dataType ) );
row[UNSIGNED_ATTRIBUTE] <<= OUString("0"); //
if( com::sun::star::sdbc::DataType::INTEGER == dataType ||
com::sun::star::sdbc::DataType::BIGINT == dataType )
@@ -2320,7 +2320,7 @@ static void pgTypeInfo2ResultSet(
else
row[AUTO_INCREMENT] <<= OUString("0"); // TODO
row[MINIMUM_SCALE] <<= OUString("0"); // TODO: what is this ?
- row[MAXIMUM_SCALE] <<= OUString::valueOf( getMaxScale( dataType ) );
+ row[MAXIMUM_SCALE] <<= OUString::number( getMaxScale( dataType ) );
row[NUM_PREC_RADIX] <<= OUString("10"); // TODO: what is this ?
(void)FIXED_PREC_SCALE;
vec.push_back( row );
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index fb82b9907089..23ef836b16ac 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -668,7 +668,7 @@ void PreparedStatement::setObjectWithInfo(
OUString myString;
if( x >>= myDouble )
{
- myString = OUString::valueOf( myDouble );
+ myString = OUString::number( myDouble );
}
else
{
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index ec000a54e354..b0d1c74a5629 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -462,7 +462,7 @@ void UpdateableResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw
// buf.append( "'" );
// buf.append( (sal_Int64) x );
// buf.append( "'" );
- m_updateableField[columnIndex-1].value <<= OUString::valueOf( x );
+ m_updateableField[columnIndex-1].value <<= OUString::number( x );
}
void UpdateableResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw (SQLException, RuntimeException)
@@ -472,7 +472,7 @@ void UpdateableResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw (S
checkClosed();
checkUpdate( columnIndex );
- m_updateableField[columnIndex-1].value <<= OUString::valueOf( x );
+ m_updateableField[columnIndex-1].value <<= OUString::number( x );
}
void UpdateableResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw (SQLException, RuntimeException)
@@ -481,7 +481,7 @@ void UpdateableResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw
checkClosed();
checkUpdate( columnIndex );
- m_updateableField[columnIndex-1].value <<= OUString::valueOf( x );
+ m_updateableField[columnIndex-1].value <<= OUString::number( x );
}
void UpdateableResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw (SQLException, RuntimeException)
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 60ed5b0658ae..d687b6913bbb 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -138,7 +138,7 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe
sal_Int32 searchIndex=1;
while(_rColumns.find(sAlias) != _rColumns.end())
{
- (sAlias = sLabel) += OUString::valueOf(searchIndex++);
+ (sAlias = sLabel) += OUString::number(searchIndex++);
}
sLabel = sAlias;
}
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 12b44805f22e..1237120d07ed 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -1141,7 +1141,7 @@ namespace
{
if ( _rParentNode.getChild(i) == &_rParamNode )
{
- sColumnName += OUString::valueOf( i+1 );
+ sColumnName += OUString::number( i+1 );
break;
}
}
@@ -1854,7 +1854,7 @@ OUString OSQLParseTreeIterator::getUniqueColumnName(const OUString & rColumnName
sal_Int32 i=1;
while(aIter != m_aSelectColumns->get().end())
{
- (aAlias = rColumnName) += OUString::valueOf(i++);
+ (aAlias = rColumnName) += OUString::number(i++);
aIter = find(
m_aSelectColumns->get().begin(),
m_aSelectColumns->get().end(),
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 1c748abae7b2..db004873a733 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1150,7 +1150,7 @@ OUString OSQLParser::stringToDouble(const OUString& _rValue,sal_Int16 _nScale)
ParseResult aResult = m_xCharClass->parsePredefinedToken(KParseType::ANY_NUMBER,_rValue,0,m_pData->aLocale,0,OUString(),KParseType::ANY_NUMBER,OUString());
if((aResult.TokenType & KParseType::IDENTNAME) && aResult.EndPos == _rValue.getLength())
{
- aValue = OUString::valueOf(aResult.Value);
+ aValue = OUString::number(aResult.Value);
sal_Int32 nPos = aValue.lastIndexOf('.');
if((nPos+_nScale) < aValue.getLength())
aValue = aValue.replaceAt(nPos+_nScale,aValue.getLength()-nPos-_nScale,OUString());
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index 2bf53267d2b7..bbed1713d2ca 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -310,7 +310,7 @@ Any SAL_CALL OCollection::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsEx
{
::osl::MutexGuard aGuard(m_rMutex);
if (Index < 0 || Index >= m_pElements->size() )
- throw IndexOutOfBoundsException(OUString::valueOf(Index),static_cast<XTypeProvider*>(this));
+ throw IndexOutOfBoundsException(OUString::number(Index),static_cast<XTypeProvider*>(this));
return makeAny(getObject(Index));
}
@@ -413,7 +413,7 @@ void SAL_CALL OCollection::dropByIndex( sal_Int32 index ) throw(SQLException, In
{
::osl::MutexGuard aGuard(m_rMutex);
if(index <0 || index >= getCount())
- throw IndexOutOfBoundsException(OUString::valueOf(index),static_cast<XTypeProvider*>(this));
+ throw IndexOutOfBoundsException(OUString::number(index),static_cast<XTypeProvider*>(this));
dropImpl(index);
}