[Libreoffice-commits] core.git: sal/osl

2013-08-25 Thread Tor Lillqvist
 sal/osl/unx/file.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5a684a041f10fe20512dd5aef6552531165dfa44
Author: Tor Lillqvist 
Date:   Sun Aug 25 10:27:05 2013 +0300

Typo

Change-Id: Icfb6c58d8a73e45d7d9c5629ac0d808f7afcf9ff

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index a0ef50e..4ae6ef6 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -293,7 +293,7 @@ sal_uInt64 FileHandle_Impl::getPos() const
 
 oslFileError FileHandle_Impl::setPos (sal_uInt64 uPos)
 {
-SAL_INFO("osl.file", "FileHandle_Impl::setPos(" << m_fd << ", " << 
getPos() << ") => " << uPos);
+SAL_INFO("sal.file", "FileHandle_Impl::setPos(" << m_fd << ", " << 
getPos() << ") => " << uPos);
 m_fileptr = sal::static_int_cast< off_t >(uPos);
 return osl_File_E_None;
 }
@@ -340,7 +340,7 @@ oslFileError FileHandle_Impl::setSize (sal_uInt64 uSize)
 return (result);
 }
 
-SAL_INFO("osl.file", "osl_setFileSize(" << m_fd << ", " << getSize() << ") 
=> " << nSize);
+SAL_INFO("sal.file", "osl_setFileSize(" << m_fd << ", " << getSize() << ") 
=> " << nSize);
 m_size = sal::static_int_cast< sal_uInt64 >(nSize);
 return osl_File_E_None;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PATCH] fdo#64455 Add default line color to standard.soc

2013-08-25 Thread Laurent BP
Hello Ivan,

Ivan Timofeev wrote
> And then, how about fixing the line color listbox, so that it will show
> unknown colors like the fill color listbox does? Then we can backport
> that fix to 4-1 and 4-0 without introducing a new UI string. Do you want
> to look at that? It's SvxLineColorToolBoxControl[2] and IIRC the
> StateChanged method is called on a color update.

That sounds interesting for me. Thanks for the links. :)
I will have a look at it in the next few days.



-
LibreOffice 3.6.7
--
View this message in context: 
http://nabble.documentfoundation.org/PATCH-fdo-64455-Add-default-line-color-to-standard-soc-tp4071038p4071531.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/cellatr.hxx  |8 +---
 sw/source/core/attr/cellatr.cxx |5 +++--
 2 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 99105031a3e15dad3120c74ab46df4ff5d0f7349
Author: Matteo Casalin 
Date:   Wed Aug 21 23:17:58 2013 +0200

String to OUString

Change-Id: I260df7e14a5394dcf4aef540e575366eb9785c47
Reviewed-on: https://gerrit.libreoffice.org/5607
Tested-by: Matteo Casalin 
Reviewed-by: Matteo Casalin 

diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index 1ae2135..3a71cb2 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef _CELLATR_HXX
-#define _CELLATR_HXX
+#ifndef CELLATR_HXX
+#define CELLATR_HXX
 
 #include 
 #include 
@@ -26,6 +26,8 @@
 #include "format.hxx"
 #include "cellfml.hxx"
 
+namespace rtl { class OUString; }
+
 class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item
 {
 sal_Bool bAuto; ///< automatically given flag
@@ -54,7 +56,7 @@ class SwTblBoxFormula : public SfxPoolItem, public 
SwTableFormula
 // can only be TableBoxFormat
 
 public:
-SwTblBoxFormula( const String& rFormula );
+SwTblBoxFormula( const OUString& rFormula );
 ~SwTblBoxFormula() {};
 
 // "pure virtual methods" of SfxPoolItem
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index c34ee34..43de12c 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -55,7 +56,7 @@ SfxPoolItem* SwTblBoxNumFormat::Clone( SfxItemPool* ) const
 // SwTblBoxFormula
 // -
 
-SwTblBoxFormula::SwTblBoxFormula( const String& rFormula )
+SwTblBoxFormula::SwTblBoxFormula( const OUString& rFormula )
 : SfxPoolItem( RES_BOXATR_FORMULA ),
 SwTableFormula( rFormula ),
 pDefinedIn( 0 )
@@ -186,7 +187,7 @@ void SwTblBoxFormula::Calc( SwTblCalcPara& rCalcPara, 
double& rValue )
 {
 // create pointers from box names
 BoxNmToPtr( rCalcPara.pTbl );
-String sFml( MakeFormula( rCalcPara ));
+const OUString sFml( MakeFormula( rCalcPara ));
 if( !rCalcPara.rCalc.IsCalcError() )
 rValue = rCalcPara.rCalc.Calculate( sFml ).GetDouble();
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/ui/inc/numprevw.hxx |5 +++--
 sw/source/ui/inc/outline.hxx  |7 ---
 sw/source/ui/misc/outline.cxx |6 +++---
 3 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 80dfbe76a8b04017897a5d96e5aa6038d0699ebe
Author: Matteo Casalin 
Date:   Sat Aug 24 18:01:05 2013 +0200

String to OUString

Change-Id: I5e071f9484abae04efa2ba1526448182068d8f9c
Reviewed-on: https://gerrit.libreoffice.org/5619
Reviewed-by: Matteo Casalin 
Tested-by: Matteo Casalin 

diff --git a/sw/source/ui/inc/numprevw.hxx b/sw/source/ui/inc/numprevw.hxx
index 605c995..9e0994e 100644
--- a/sw/source/ui/inc/numprevw.hxx
+++ b/sw/source/ui/inc/numprevw.hxx
@@ -24,13 +24,14 @@
 #include 
 
 class SwNumRule;
+namespace rtl { class OUString; }
 
 class NumberingPreview : public Window
 {
 const SwNumRule*pActNum;
 FontaStdFont;
 longnPageWidth;
-const String*   pOutlineNames;
+const OUString* pOutlineNames;
 sal_BoolbPosition;
 sal_uInt16  nActLevel;
 
@@ -58,7 +59,7 @@ class NumberingPreview : public Window
 {pActNum = pNum; Invalidate();};
 voidSetPageWidth(long nPgWidth)
 {nPageWidth = nPgWidth;}
-voidSetOutlineNames(const String* pNames)
+voidSetOutlineNames(const OUString* pNames)
 {pOutlineNames = pNames;}
 voidSetPositionMode()
 { bPosition = sal_True;}
diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx
index 0e2fa18..ca984ac 100644
--- a/sw/source/ui/inc/outline.hxx
+++ b/sw/source/ui/inc/outline.hxx
@@ -38,6 +38,7 @@
 #include "swtypes.hxx"  //for MAXLEVEL
 #include 
 #include 
+#include "rtl/ustring.hxx"
 
 class SwWrtShell;
 class SwNumRule;
@@ -50,7 +51,7 @@ class SwOutlineTabDialog : public SfxTabDialog
 sal_uInt16 m_nNumPosId;
 sal_uInt16 m_nOutlineId;
 
-String  aCollNames[MAXLEVEL];
+OUStringaCollNames[MAXLEVEL];
 
 SwWrtShell& rWrtSh;
 SwNumRule*  pNumRule;
@@ -74,7 +75,7 @@ class SwOutlineTabDialog : public SfxTabDialog
 
 SwNumRule*  GetNumRule() {return pNumRule;}
 sal_uInt16  GetLevel(const String &rFmtName) const;
-String* GetCollNames() {return aCollNames;}
+OUString*   GetCollNames() {return aCollNames;}
 
 static sal_uInt16   GetActNumLevel() {return nNumLevel;}
 static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
@@ -98,7 +99,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage
 String  aSaveCollNames[MAXLEVEL];
 SwWrtShell* pSh;
 SwNumRule*  pNumRule;
-String* pCollNames;
+OUString*   pCollNames;
 sal_uInt16  nActLevel;
 
 DECL_LINK( LevelHdl, ListBox * );
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 0e8c8ce..46ecbe6 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -390,7 +390,7 @@ short SwOutlineTabDialog::Ok()
 pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle();
 pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE);
 
-if( aCollNames[i].Len() )
+if( !aCollNames[i].isEmpty() )
 {
 pTxtColl = rWrtSh.GetParaStyle(
 aCollNames[i], 
SwWrtShell::GETSTYLE_CREATESOME);
@@ -626,7 +626,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, 
pBox )
 if( sOldName.Len() )
 for( i = 0; i < MAXLEVEL; ++i)
 if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel &&
-!pCollNames[ i ].Len() )
+pCollNames[ i ].isEmpty() )
 {
 sal_uInt8 n;
 for( n = 0; n < MAXLEVEL; ++n )
@@ -1131,7 +1131,7 @@ voidNumberingPreview::Paint( const Rectangle& 
/*rRect*/ )
 Point(nXStart + nTextOffset, nYStart),
 (pOutlineNames == 0
  ? utl::ConfigManager::getProductName()
- : OUString(pOutlineNames[nLevel])));
+ : pOutlineNames[nLevel]));
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/core/unocore/unotbl.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f6497d620296ee24d43424c0281ef911db773760
Author: Matteo Casalin 
Date:   Sat Aug 24 22:13:56 2013 +0200

String to OUString

Change-Id: Ic57557901fb45ea2c3a7b2c20a601b2be6985708
Reviewed-on: https://gerrit.libreoffice.org/5621
Reviewed-by: Matteo Casalin 
Tested-by: Matteo Casalin 

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 99c14d6..079f375 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -562,7 +562,7 @@ static SwXCell* lcl_CreateXCell(SwFrmFmt* pFmt, sal_Int32 
nColumn, sal_Int32 nRo
 return pXCell;
 }
 
-static void lcl_InspectLines(SwTableLines& rLines, std::vector& 
rAllNames)
+static void lcl_InspectLines(SwTableLines& rLines, std::vector& 
rAllNames)
 {
 for( sal_uInt16 i = 0; i < rLines.size(); i++ )
 {
@@ -572,7 +572,7 @@ static void lcl_InspectLines(SwTableLines& rLines, 
std::vector& rAllNam
 {
 SwTableBox* pBox = rBoxes[j];
 if(pBox->GetName().Len() && pBox->getRowSpan() > 0 )
-rAllNames.push_back( new String(pBox->GetName()) );
+rAllNames.push_back( new OUString(pBox->GetName()) );
 SwTableLines& rBoxLines = pBox->GetTabLines();
 if(!rBoxLines.empty())
 {
@@ -2251,7 +2251,7 @@ uno::Sequence< OUString > 
SwXTextTable::getCellNames(void) throw( uno::RuntimeEx
 SwTable* pTable = SwTable::FindTable( pFmt );
   // gibts an der Tabelle und an allen Boxen
 SwTableLines& rTblLines = pTable->GetTabLines();
-std::vector aAllNames;
+std::vector aAllNames;
 lcl_InspectLines(rTblLines, aAllNames);
 uno::Sequence< OUString > aRet( 
static_cast(aAllNames.size()) );
 OUString* pArray = aRet.getArray();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/unofieldcoll.hxx |2 -
 sw/source/core/unocore/unofield.cxx |   43 +---
 2 files changed, 17 insertions(+), 28 deletions(-)

New commits:
commit bb2478664bb88d3430f02d2cbcb6d18d60eab412
Author: Matteo Casalin 
Date:   Sun Aug 25 01:11:46 2013 +0200

String to OUString

Change-Id: I1c5c6478d91d97092dfa322f31e9376e09063e24
Reviewed-on: https://gerrit.libreoffice.org/5622
Reviewed-by: Matteo Casalin 
Tested-by: Matteo Casalin 

diff --git a/sw/inc/unofieldcoll.hxx b/sw/inc/unofieldcoll.hxx
index 6030b7e..c182dc3b 100644
--- a/sw/inc/unofieldcoll.hxx
+++ b/sw/inc/unofieldcoll.hxx
@@ -43,7 +43,7 @@ protected:
 public:
 SwXTextFieldMasters(SwDoc* pDoc);
 
-static sal_Bool getInstanceName(const SwFieldType& rFldType, String& 
rName);
+static sal_Bool getInstanceName(const SwFieldType& rFldType, OUString& 
rName);
 
 // XServiceInfo
 virtual OUString SAL_CALL getImplementationName()
diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 6ef7872..db9e2a3 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -796,10 +796,10 @@ throw (beans::UnknownPropertyException, 
lang::WrappedTargetException,
 SwFieldType* pType = GetFldType(true);
 if( rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_INSTANCE_NAME)) )
 {
-String sName;
+OUString sName;
 if(pType)
 SwXTextFieldMasters::getInstanceName(*pType, sName);
-aRet <<= OUString(sName);
+aRet <<= sName;
 }
 else if(pType)
 {
@@ -2659,48 +2659,37 @@ uno::Any SwXTextFieldMasters::getByName(const OUString& 
rName)
 }
 
 sal_Bool SwXTextFieldMasters::getInstanceName(
-const SwFieldType& rFldType, String& rName)
+const SwFieldType& rFldType, OUString& rName)
 {
-sal_Bool bRet = sal_True;
+OUString sField;
+
 switch( rFldType.Which() )
 {
 case RES_USERFLD:
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( COM_TEXT_FLDMASTER_CC 
));
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "User."));
-rName += rFldType.GetName();
+sField = "User." + rFldType.GetName();
 break;
 case RES_DDEFLD:
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( COM_TEXT_FLDMASTER_CC 
));
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "DDE."));
-rName += rFldType.GetName();
+sField = "DDE." + rFldType.GetName();
 break;
 
 case RES_SETEXPFLD:
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( COM_TEXT_FLDMASTER_CC 
));
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "SetExpression."));
-rName += String( SwStyleNameMapper::GetSpecialExtraProgName( 
rFldType.GetName() ) );
+sField = "SetExpression." + 
SwStyleNameMapper::GetSpecialExtraProgName( rFldType.GetName() );
 break;
 
 case RES_DBFLD:
-{
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( 
COM_TEXT_FLDMASTER_CC ));
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "DataBase."));
-String sDBName(rFldType.GetName());
-sDBName.SearchAndReplaceAll(DB_DELIM, '.');
-rName += sDBName;
-}
+sField = "DataBase." + 
rFldType.GetName().replaceAll(OUString(DB_DELIM), ".");
 break;
 
 case RES_AUTHORITY:
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( COM_TEXT_FLDMASTER_CC 
));
-rName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "Bibliography"));
+sField = "Bibliography";
 break;
 
 default:
-bRet = sal_False;
+return sal_False;
 }
 
-return bRet;
+rName += COM_TEXT_FLDMASTER_CC + sField;
+return sal_True;
 }
 
 uno::Sequence< OUString > SwXTextFieldMasters::getElementNames(void)
@@ -2713,8 +2702,8 @@ uno::Sequence< OUString > 
SwXTextFieldMasters::getElementNames(void)
 const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
 sal_uInt16 nCount = pFldTypes->size();
 
-std::vector aFldNames;
-String* pString = new String();
+std::vector aFldNames;
+OUString* pString = new OUString();
 
 for( sal_uInt16 i = 0; i < nCount; i++)
 {
@@ -2723,7 +2712,7 @@ uno::Sequence< OUString > 
SwXTextFieldMasters::getElementNames(void)
 if (SwXTextFieldMasters::getInstanceName(rFldType, *pString))
 {
 aFldNames.push_back(pString);
-pString = new String();
+pString = new OUString();
 }
 }
 delete pString;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/doc.hxx  |2 +-
 sw/source/core/doc/docbasic.cxx |2 +-
 sw/source/ui/docvw/edtwin.cxx   |9 +
 sw/source/ui/inc/wrtsh.hxx  |2 +-
 sw/source/ui/wrtsh/wrtsh2.cxx   |4 ++--
 sw/source/ui/wrtsh/wrtsh3.cxx   |2 +-
 6 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 4a386c42f03bdb1896cbdd9391e2c4e1841dd5b6
Author: Matteo Casalin 
Date:   Sat Aug 24 19:00:32 2013 +0200

String to OUString

Change-Id: I7aa1eda2689081aea624f1de64380322ed2fd0fa
Reviewed-on: https://gerrit.libreoffice.org/5620
Reviewed-by: Matteo Casalin 
Tested-by: Matteo Casalin 

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 58bd8aa..16c7b2c 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1812,7 +1812,7 @@ public:
 const SwFmtINetFmt* FindINetAttr( const OUString& rName ) const;
 
 /// Call into intransparent Basic; expect possible Return String.
-bool ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs 
= 0 );
+bool ExecMacro( const SvxMacro& rMacro, OUString* pRet = 0, SbxArray* 
pArgs = 0 );
 
 /// Call into intransparent Basic / JavaScript.
 sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& 
rCallEvent,
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index e14604c..15fcf5f 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -71,7 +71,7 @@ static Sequence *lcl_docbasic_convertArgs( SbxArray& 
rArgs )
 return pRet;
 }
 
-bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
+bool SwDoc::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs 
)
 {
 ErrCode eErr = 0;
 switch( rMacro.GetScriptType() )
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index ddeafd4..eae062e 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -1475,7 +1475,6 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
 const SvxMacro* pMacro = pFlyFmt->GetMacro().GetMacroTable().Get( 
nEvent );
 if( pMacro )
 {
-String sRet;
 SbxArrayRef xArgs = new SbxArray;
 SbxVariableRef xVar = new SbxVariable;
 xVar->PutString( pFlyFmt->GetName() );
@@ -1488,8 +1487,9 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
 xVar->PutUShort( rKeyCode.GetModifier() | rKeyCode.GetCode() );
 xArgs->Put( &xVar, 2 );
 
+OUString sRet;
 rSh.ExecMacro( *pMacro, &sRet, &xArgs );
-if( sRet.Len() && 0 != sRet.ToInt32() )
+if( !sRet.isEmpty() && sRet.toInt32()!=0 )
 return ;
 }
 }
@@ -3882,7 +3882,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
 {
 m_aRszMvHdlPt = aDocPt;
 sal_uInt16 nPos = 0;
-String sRet;
 SbxArrayRef xArgs = new SbxArray;
 SbxVariableRef xVar = new SbxVariable;
 xVar->PutString( pFlyFmt->GetName() );
@@ -3902,13 +3901,15 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
 xVar->PutLong( aDocPt.Y() - aSttPt.Y() );
 xArgs->Put( &xVar, ++nPos );
 
+OUString sRet;
+
 ReleaseMouse();
 
 rSh.ExecMacro( *pMacro, &sRet, &xArgs );
 
 CaptureMouse();
 
-if( sRet.Len() && 0 != sRet.ToInt32() )
+if( !sRet.isEmpty() && sRet.toInt32()!=0 )
 return ;
 }
 }
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 1030328..2b38eac 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -414,7 +414,7 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
 SwView& GetView() { return rView; }
 
 // Because nobody else is doing it, here is a ExecMacro()
-void ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs 
= 0 );
+void ExecMacro( const SvxMacro& rMacro, OUString* pRet = 0, SbxArray* 
pArgs = 0 );
 // call into the dark Basic/JavaScript
 sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& 
rCallEvent,
 bool bCheckPtr = false, SbxArray* pArgs = 0,
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 3d392df..2e91b13 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -264,8 +264,8 @@ void SwWrtShell::ClickToField( const SwField& rFld )
 case RES_MACROFLD:
 {
 const SwMacroField *pFld = (const SwMacroField*)&rFld;
-String sText( rFld.GetPar2() );
-String sRet( sText );
+

[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/filter/ww8/ww8par2.cxx |4 ++--
 sw/source/filter/ww8/ww8scan.cxx |   10 +-
 sw/source/filter/ww8/ww8scan.hxx |3 ++-
 3 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit dccdb71d21f2a3c2b483b77a18fec79f3d7f5d39
Author: Matteo Casalin 
Date:   Sun Aug 25 02:50:50 2013 +0200

String to OUString

Change-Id: Id3959a977c697a9300e8eba09c29b575d4c34c11
Reviewed-on: https://gerrit.libreoffice.org/5625
Reviewed-by: Matteo Casalin 
Tested-by: Matteo Casalin 

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 7fe428f..3bf32a7 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3854,7 +3854,7 @@ void WW8RStyle::Import1Style( sal_uInt16 nNr )
 pStStrm->Seek( rSI.nFilePos );
 
 short nSkip, cbStd;
-String sName;
+OUString sName;
 
 boost::scoped_ptr xStd(Read1Style(nSkip, &sName, &cbStd));// read 
Style
 
@@ -3863,7 +3863,7 @@ void WW8RStyle::Import1Style( sal_uInt16 nNr )
 
 // either no Name or unused Slot or unknown Style
 
-if ( !xStd || (0 == sName.Len()) || ((1 != xStd->sgc) && (2 != xStd->sgc)) 
)
+if ( !xStd || sName.isEmpty() || ((1 != xStd->sgc) && (2 != xStd->sgc)) )
 {
 pStStrm->SeekRel( nSkip );
 return;
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index f92ae6e..cde4e9c 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6043,7 +6043,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* 
pcbStd )
 return pStd;
 }
 
-WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
+WW8_STD* WW8Style::Read1Style( short& rSkip, OUString* pString, short* pcbStd )
 {
 // Attention: MacWord-Documents have their Stylenames
 // always in ANSI, even if eStructCharSet == CHARSET_MAC !!
@@ -6062,7 +6062,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* 
pString, short* pcbStd )
 // lies Pascal-String
 *pString = read_uInt8_BeltAndBracesString(rSt, 
RTL_TEXTENCODING_MS_1252);
 // leading len and trailing zero --> 2
-rSkip -= 2+ pString->Len();
+rSkip -= pString->getLength() + 2;
 break;
 case 8:
 // handle Unicode-String with leading length short and
@@ -6070,7 +6070,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* 
pString, short* pcbStd )
 if (TestBeltAndBraces(rSt))
 {
 *pString = read_uInt16_BeltAndBracesString(rSt);
-rSkip -= (pString->Len() + 2) * 2;
+rSkip -= (pString->getLength() + 2) * 2;
 }
 else
 {
@@ -6086,7 +6086,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* 
pString, short* pcbStd )
 */
 *pString = 
read_uInt8_BeltAndBracesString(rSt,RTL_TEXTENCODING_MS_1252);
 // leading len and trailing zero --> 2
-rSkip -= 2+ pString->Len();
+rSkip -= pString->getLength() + 2;
 }
 break;
 default:
@@ -6095,7 +6095,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* 
pString, short* pcbStd )
 }
 }
 else
-*pString = aEmptyStr;   // Kann keinen Namen liefern
+*pString = OUString();   // Kann keinen Namen liefern
 }
 return pStd;
 }
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 7026516..7f798f3 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -30,6 +30,7 @@
 #include // UINTXX
 #include 
 #include 
+#include "rtl/ustring.hxx"
 #include "hash_wrap.hxx"
 #include "sortedarray.hxx"
 
@@ -1455,7 +1456,7 @@ protected:
 public:
 WW8Style( SvStream& rSt, WW8Fib& rFibPara );
 WW8_STD* Read1STDFixed( short& rSkip, short* pcbStd );
-WW8_STD* Read1Style( short& rSkip, String* pString, short* pcbStd );
+WW8_STD* Read1Style( short& rSkip, OUString* pString, short* pcbStd );
 sal_uInt16 GetCount() const { return cstd; }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/calc.hxx|4 ++--
 sw/source/core/bastyp/calc.cxx |   15 +++
 sw/source/ui/fldui/fldvar.cxx  |8 
 sw/source/ui/frmdlg/cption.cxx |   11 ++-
 4 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 8b0864c4b9a3392dea34658ac0368f9a1e4f66ed
Author: Matteo Casalin 
Date:   Thu Aug 22 20:51:25 2013 +0200

String to OUString

Change-Id: Ice893d6ae25791d9a825cd95f60d1edb5e7e33d7
Reviewed-on: https://gerrit.libreoffice.org/5609
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 4e2a665..1411f43 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -226,8 +226,8 @@ public:
 static bool Str2Double( const String& rStr, xub_StrLen& rPos,
 double& rVal, SwDoc *const pDoc );
 
-SW_DLLPUBLIC static sal_Bool IsValidVarName( const String& rStr,
-String* pValidName = 0 );
+SW_DLLPUBLIC static sal_Bool IsValidVarName( const OUString& rStr,
+OUString* pValidName = 0 );
 };
 
 #endif
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 5d013e3..2d6bebc 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1541,28 +1541,27 @@ bool SwCalc::Str2Double( const String& rCommand, 
xub_StrLen& rCommandPos,
 return bRet;
 }
 
-sal_Bool SwCalc::IsValidVarName( const String& rStr, String* pValidName )
+sal_Bool SwCalc::IsValidVarName( const OUString& rStr, OUString* pValidName )
 {
 sal_Bool bRet = sal_False;
 using namespace ::com::sun::star::i18n;
 {
 // Parse any token.
 ParseResult aRes = GetAppCharClass().parseAnyToken( rStr, 0,
-coStartFlags, aEmptyStr,
- coContFlags, aEmptyStr );
+coStartFlags, OUString(),
+ coContFlags, OUString() );
 
 if( aRes.TokenType & KParseType::IDENTNAME )
 {
-bRet = aRes.EndPos == rStr.Len();
+bRet = aRes.EndPos == rStr.getLength();
 if( pValidName )
 {
-xub_StrLen nRealStt = (xub_StrLen)aRes.LeadingWhiteSpace;
-*pValidName = rStr.Copy( nRealStt,
-  static_cast(aRes.EndPos) - 
nRealStt );
+*pValidName = rStr.copy( aRes.LeadingWhiteSpace,
+ aRes.EndPos - aRes.LeadingWhiteSpace 
);
 }
 }
 else if( pValidName )
-pValidName->Erase();
+*pValidName = OUString();
 }
 return bRet;
 }
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index df43475..cbf808f 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -804,8 +804,8 @@ IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl)
 sal_uInt16 nTypeId = 
(sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
 bool bInsert = false, bApply = false, bDelete = false;
 
-String sName( m_pNameED->GetText() );
-xub_StrLen nLen = sName.Len();
+OUString sName( m_pNameED->GetText() );
+sal_Int32 nLen = sName.getLength();
 
 switch( nTypeId )
 {
@@ -814,9 +814,9 @@ IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl)
 case TYP_SETFLD:
 case TYP_SEQFLD:
 SwCalc::IsValidVarName( sName, &sName );
-if( sName.Len() != nLen )
+if ( sName.getLength() != nLen )
 {
-nLen = sName.Len();
+nLen = sName.getLength();
 Selection aSel(m_pNameED->GetSelection());
 m_pNameED->SetText( sName );
 m_pNameED->SetSelection( aSel );   // restore Cursorpos
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 3645a9c..201b1c7 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -508,13 +508,14 @@ long CategoryBox::PreNotify( NotifyEvent& rNEvt )
 if(nTmpCode != KEY_BACKSPACE && nTmpCode != KEY_RETURN
 && nTmpCode != KEY_TAB && nTmpCode != KEY_ESCAPE)
 {
-OUString sKey( pEvent->GetCharCode() );
-String sName( GetText() );
+const OUString sText( GetText() );
 Selection aSel( GetSelection() );
 aSel.Justify();
-if( aSel.Len() )
-sName.Erase( (xub_StrLen)aSel.Min(), (xub_StrLen)aSel.Len() );
-sName.Insert( sKey, (xub_StrLen)aSel.Min() );
+
+const OUString sName = sText.copy(0, aSel.Min())
++ OUString( pEvent->GetCharCode() )
++ sText.copy(aSel.Max());
+
 if( !SwCalc::IsValidVarName( sName ))
 nHandled = 1;
 }
___
Libreoffice-commit

[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/doc.hxx   |3 -
 sw/inc/editsh.hxx|2 
 sw/inc/fesh.hxx  |2 
 sw/inc/ndgrf.hxx |2 
 sw/source/core/doc/docfly.cxx|4 -
 sw/source/core/doc/notxtfrm.cxx  |   18 
 sw/source/core/edit/editsh.cxx   |2 
 sw/source/core/frmedt/fefly1.cxx |4 -
 sw/source/core/graphic/ndgrf.cxx |   14 +++---
 sw/source/core/inc/UndoInsert.hxx|3 -
 sw/source/core/undo/unins.cxx|   13 +++--
 sw/source/core/unocore/unoframe.cxx  |   59 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |4 -
 sw/source/filter/ww8/wrtw8esh.cxx|2 
 sw/source/filter/ww8/wrtww8gr.cxx|6 +-
 sw/source/ui/dochdl/swdtflvr.cxx |   13 +++--
 sw/source/ui/docvw/edtdd.cxx |2 
 sw/source/ui/docvw/romenu.cxx|4 -
 sw/source/ui/docvw/romenu.hxx|4 -
 sw/source/ui/shells/basesh.cxx   |4 -
 sw/source/ui/shells/grfsh.cxx|   16 ---
 sw/source/ui/utlui/content.cxx   |2 
 22 files changed, 91 insertions(+), 92 deletions(-)

New commits:
commit f83a1f8e1ce005183983e10e57933e0f8141e02c
Author: Matteo Casalin 
Date:   Thu Aug 22 22:41:04 2013 +0200

String to OUString

Change-Id: I364c5eabf45a3a5011c0b1709da68cbeb38a6997
Reviewed-on: https://gerrit.libreoffice.org/5610
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 16c7b2c..ded1285 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1162,8 +1162,7 @@ public:
 void SetFlyName( SwFlyFrmFmt& rFmt, const OUString& rName );
 const SwFlyFrmFmt* FindFlyByName( const OUString& rName, sal_Int8 nNdTyp = 
0 ) const;
 
-void GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
-String* pFltName ) const;
+void GetGrfNms( const SwFlyFrmFmt& rFmt, OUString* pGrfName, OUString* 
pFltName ) const;
 
 /// Set a valid name for all Flys that have none (Called by Readers after 
reading).
 void SetAllUniqueFlyNames();
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 08c71c3..fc5a6c1 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -622,7 +622,7 @@ public:
 /** @return name and filter of a graphic if the cursor is in a graphic,
  else give a rap on the knuckles!
  If a string-ptr != 0 return the respective name. */
-void GetGrfNms( String* pGrfName, String* pFltName,
+void GetGrfNms( OUString* pGrfName, OUString* pFltName,
 const SwFlyFrmFmt* = 0 ) const;
 
 /// Re-read if graphic is not ok. Current graphic is replaced by the new 
one.
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 43a8a95..4aaa973 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -336,7 +336,7 @@ public:
 /** Deliver graphic in rName besides graphic name. If graphic is
  linked give name with path. rbLink is TRUE if graphic is linked. */
 const Graphic *GetGrfAtPos( const Point &rDocPos,
-String &rName, sal_Bool &rbLink ) const;
+OUString &rName, sal_Bool &rbLink ) const;
 
 OUString GetObjTitle() const;
 void SetObjTitle( const OUString& rTitle );
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index ca2367a..0d8c3b5 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -194,7 +194,7 @@ public:
 inline bool IsLinkedFile() const;
 inline bool IsLinkedDDE() const;
 ::sfx2::SvBaseLinkRef GetLink() const{ return refLink; }
-bool GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
+bool GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const;
 void ReleaseLink();
 
 /** Scale an image-map: the image-map becomes zoomed in / out by
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index be3e96b..292da26 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -583,8 +583,8 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& 
rNewFmt,
 return bChgAnchor;
 }
 
-void SwDoc::GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
-String* pFltName ) const
+void SwDoc::GetGrfNms( const SwFlyFrmFmt& rFmt, OUString* pGrfName,
+   OUString* pFltName ) const
 {
 SwNodeIndex aIdx( *rFmt.GetCntnt().GetCntntIdx(), 1 );
 const SwGrfNode* pGrfNd = aIdx.GetNode().GetGrfNode();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 52a2c4c..71abd35 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -77,7 +77,7 @@ using namespace com::sun::star;
 
 extern void ClrContourCache( const SdrObject *pObj ); // TxtFly.Cxx
 
-inline bool GetRealURL( const SwGrfNode& rNd, String

[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/core/undo/unins.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e593b3b38434d605fa450afdb7a58e06bc6f949a
Author: Matteo Casalin 
Date:   Thu Aug 22 22:47:02 2013 +0200

Improve description

Change-Id: Id1039c99f3a56a90aa69f05378428f0214df74a0
Reviewed-on: https://gerrit.libreoffice.org/5611
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index dd7bde0..5145aaa 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -842,8 +842,9 @@ void SwUndoReRead::SetAndSave(::sw::UndoRedoContext & 
rContext)
 OUString* pOldNm = pNm;
 OUString* pOldFltr = pFltr;
 sal_uInt16 nOldMirr = nMirr;
-
+// since all of them are cleared/modified by SaveGraphicData:
 SaveGraphicData( *pGrfNd );
+
 if( pOldNm )
 {
 pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : OUString(), 0, 0, sal_True );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/crsrsh.hxx   |5 +++--
 sw/source/core/crsr/crstrvl.cxx |4 ++--
 sw/source/ui/inc/wrtsh.hxx  |2 +-
 sw/source/ui/utlui/content.cxx  |5 +++--
 sw/source/ui/utlui/glbltree.cxx |2 +-
 sw/source/ui/wrtsh/move.cxx |2 +-
 6 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit d598bb3ec735e45e53d82258d8aa9788bf0dc9a4
Author: Matteo Casalin 
Date:   Thu Aug 22 23:04:54 2013 +0200

String to OUString

Change-Id: Icc70248f48dd24a2940552f88590f02492a38824
Reviewed-on: https://gerrit.libreoffice.org/5612
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 61a7d2a..df120f9 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -21,6 +21,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -665,8 +666,8 @@ public:
 // in a headerframe otherwise in a footerframe
 bool IsInHeaderFooter( sal_Bool* pbInHeader = 0 ) const;
 
-sal_Bool GotoNextTOXBase( const String* = 0 );
-sal_Bool GotoPrevTOXBase( const String* = 0 );
+sal_Bool GotoNextTOXBase( const OUString* = 0 );
+sal_Bool GotoPrevTOXBase( const OUString* = 0 );
 sal_Bool GotoTOXMarkBase();
 // jump to the next or previous index entry
 sal_Bool GotoNxtPrvTOXMark( sal_Bool bNext = sal_True );
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 1b11a31..9e5630b1e5 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -284,7 +284,7 @@ sal_Bool SwCrsrShell::SetCrsrInHdFt( sal_uInt16 nDescNo, 
sal_Bool bInHeader )
 }
 
 /// jump to the next index
-sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName )
+sal_Bool SwCrsrShell::GotoNextTOXBase( const OUString* pName )
 {
 sal_Bool bRet = sal_False;
 
@@ -335,7 +335,7 @@ sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName )
 }
 
 /// jump to previous index
-sal_Bool SwCrsrShell::GotoPrevTOXBase( const String* pName )
+sal_Bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName )
 {
 sal_Bool bRet = sal_False;
 
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 2b38eac..ca6895e 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -464,7 +464,7 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
 bool GotoRegion( const String& rName );
 sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
 sal_uInt16 nSeqNo = 0 );
-sal_Bool GotoNextTOXBase( const String* pName = 0);
+sal_Bool GotoNextTOXBase( const OUString* pName = 0);
 bool GotoTable( const String& rName );
 sal_Bool GotoFld( const SwFmtFld& rFld );
 const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = 
sal_False);
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 4dc34d4..5bc51f2 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -2963,8 +2963,9 @@ void SwContentTree::GotoContent(SwContent* pCnt)
 break;
 case CONTENT_TYPE_INDEX:
 {
-if (!pActiveShell->GotoNextTOXBase(&pCnt->GetName()))
-pActiveShell->GotoPrevTOXBase(&pCnt->GetName());
+const OUString sName(pCnt->GetName());
+if (!pActiveShell->GotoNextTOXBase(&sName))
+pActiveShell->GotoPrevTOXBase(&sName);
 }
 break;
 case CONTENT_TYPE_POSTIT:
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 31b7f74..e433b95 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -1013,7 +1013,7 @@ void SwGlobalTree::GotoContent(const SwGlblDocContent* 
pCont)
 break;
 case GLBLDOC_TOXBASE:
 {
-String sName = pCont->GetTOX()->GetTOXName();
+const OUString sName = pCont->GetTOX()->GetTOXName();
 if (!pActiveShell->GotoNextTOXBase(&sName))
 pActiveShell->GotoPrevTOXBase(&sName);
 }
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index 6b998f3..26125c5 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -650,7 +650,7 @@ sal_Bool SwWrtShell::GotoRefMark( const String& rRefMark, 
sal_uInt16 nSubType,
 return bRet;
 }
 
-sal_Bool SwWrtShell::GotoNextTOXBase( const String* pName )
+sal_Bool SwWrtShell::GotoNextTOXBase( const OUString* pName )
 {
 SwPosition aPos = *GetCrsr()->GetPoint();
 bool bRet = SwCrsrShell::GotoNextTOXBase(pName);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/swunohelper.hxx |8 +-
 sw/source/core/unocore/swunohelper.cxx |   18 ++---
 sw/source/ui/dochdl/gloshdl.cxx|3 
 sw/source/ui/inc/glosbib.hxx   |7 +-
 sw/source/ui/inc/glosdoc.hxx   |   44 ++---
 sw/source/ui/misc/glosbib.cxx  |7 --
 sw/source/ui/misc/glosdoc.cxx  |  105 +++--
 sw/source/ui/misc/glossary.cxx |2 
 sw/source/ui/misc/glshell.cxx  |   12 +--
 sw/source/ui/utlui/gloslst.cxx |   13 +---
 10 files changed, 106 insertions(+), 113 deletions(-)

New commits:
commit ed834ce6fdd222b97e3bc280e8430b33631b31f1
Author: Matteo Casalin 
Date:   Fri Aug 23 07:58:18 2013 +0200

String to OUString

Change-Id: I54c8f641b6db1762404916c4e4174d1f0e15cc39
Reviewed-on: https://gerrit.libreoffice.org/5613
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
index 21aec7d..e33e973 100644
--- a/sw/inc/swunohelper.hxx
+++ b/sw/inc/swunohelper.hxx
@@ -31,6 +31,8 @@ namespace com { namespace sun { namespace star {
 }
 }}}
 
+namespace rtl {class OUString;}
+
 class String;
 class DateTime;
 
@@ -60,9 +62,9 @@ SW_DLLPUBLIC sal_Bool UCB_IsReadOnlyFileName( const String& 
rURL );
 //  pDateTime != 0 -> returns also the modified date/time of
 //   the files in a vector -->
 //   !! objects must be deleted from the caller!!
-bool UCB_GetFileListOfFolder( const String& rURL,
-std::vector& rList,
-const String* pExtension = 0,
+bool UCB_GetFileListOfFolder( const OUString& rURL,
+std::vector& rList,
+const OUString* pExtension = 0,
 std::vector* pDateTimeList = 0 );
 
 // is the URL an existing file?
diff --git a/sw/source/core/unocore/swunohelper.cxx 
b/sw/source/core/unocore/swunohelper.cxx
index 63e9027..729d938 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include "rtl/ustring.hxx"
 #include 
 #include 
 #include 
@@ -186,9 +187,9 @@ sal_Bool UCB_IsDirectory( const String& rURL )
 //  pDateTime != 0 -> returns also the modified date/time of
 //   the files in a std::vector -->
 //   !! objects must be deleted from the caller!!
-bool UCB_GetFileListOfFolder( const String& rURL,
-std::vector& rList,
-const String* pExtension,
+bool UCB_GetFileListOfFolder( const OUString& rURL,
+std::vector& rList,
+const OUString* pExtension,
 std::vector< ::DateTime* >* pDateTimeList )
 {
 bool bOk = false;
@@ -216,19 +217,18 @@ bool UCB_GetFileListOfFolder( const String& rURL,
 if( xResultSet.is() )
 {
 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow > 
xRow( xResultSet, ::com::sun::star::uno::UNO_QUERY );
-xub_StrLen nExtLen = pExtension ? pExtension->Len() : 0;
+const sal_Int32 nExtLen = pExtension ? pExtension->getLength() : 0;
 try
 {
 if( xResultSet->first() )
 {
 do {
-String sTitle( xRow->getString( 1 ) );
+const OUString sTitle( xRow->getString( 1 ) );
 if( !nExtLen ||
-( sTitle.Len() > nExtLen &&
-  sTitle.Equals( *pExtension,
-  sTitle.Len() - nExtLen, nExtLen )) )
+( sTitle.getLength() > nExtLen &&
+  sTitle.endsWith( *pExtension )) )
 {
-rList.push_back( new String(sTitle) );
+rList.push_back( new OUString(sTitle) );
 
 if( pDateTimeList )
 {
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 4c4edef..50df75d 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -119,8 +119,7 @@ void SwGlossaryHdl::SetCurGroup(const OUString &rGrp, 
sal_Bool bApi, sal_Bool bA
 const OUString sCurBase = aTemp.getBase();
 aTemp.removeSegment();
 const OUString sCurEntryPath = 
aTemp.GetMainURL(INetURLObject::NO_DECODE);
-const std::vector & rPathArr =
-rStatGlossaries.GetPathArray();
+const std::vector & rPathArr = 
rStatGlossaries.GetPathArray();
 sal_uInt16 nCurrentPath = USHRT_MAX;
 for (size_t nPath = 0; nPath < rPat

[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/ui/misc/glosdoc.cxx |   56 +-
 1 file changed, 34 insertions(+), 22 deletions(-)

New commits:
commit 45f2cba6e31e7e0af189ec6b2d2234969144ca1a
Author: Matteo Casalin 
Date:   Fri Aug 23 23:29:06 2013 +0200

Reduce getToken load by using nIndex

Change-Id: I5218181c03424ccbeeaea0bcebf12e97fdc168f5
Reviewed-on: https://gerrit.libreoffice.org/5614
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index 77655e6..fa4a0e6 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -202,12 +202,13 @@ void SwGlossaries::PutGroupDoc(SwTextBlocks *pBlock) {
 */
 sal_Bool SwGlossaries::NewGroupDoc(OUString& rGroupName, const OUString& 
rTitle)
 {
-sal_uInt16 nNewPath = (sal_uInt16)rGroupName.getToken(1, 
GLOS_DELIM).toInt32();
+const OUString sNewPath(rGroupName.getToken(1, GLOS_DELIM));
+sal_uInt16 nNewPath = (sal_uInt16)sNewPath.toInt32();
 if (static_cast(nNewPath) >= m_PathArr.size())
 return sal_False;
 const OUString sNewFilePath(m_PathArr[nNewPath]);
 const OUString sNewGroup = lcl_CheckFileName(sNewFilePath, 
rGroupName.getToken(0, GLOS_DELIM))
-+ OUString(GLOS_DELIM) + rGroupName.getToken(1, GLOS_DELIM);
++ OUString(GLOS_DELIM) + sNewPath;
 SwTextBlocks *pBlock = GetGlosDoc( sNewGroup );
 if(pBlock)
 {
@@ -399,28 +400,32 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
 
 m_PathArr.clear();
 
-sal_uInt16 nTokenCount = comphelper::string::getTokenCount(m_aPath, 
SVT_SEARCHPATH_DELIMITER);
 std::vector aDirArr;
 std::vector aInvalidPaths;
-for( sal_uInt16 i = 0; i < nTokenCount; i++ )
+if (!m_aPath.isEmpty())
 {
-const OUString sPth = URIHelper::SmartRel2Abs(
-INetURLObject(),
-m_aPath.getToken(i, SVT_SEARCHPATH_DELIMITER),
-URIHelper::GetMaybeFileHdl());
-
-if(i && std::find(aDirArr.begin(), aDirArr.end(), sPth) != 
aDirArr.end())
+sal_Int32 nIndex = 0;
+do
 {
-continue;
+const OUString sPth = URIHelper::SmartRel2Abs(
+INetURLObject(),
+m_aPath.getToken(0, SVT_SEARCHPATH_DELIMITER, nIndex),
+URIHelper::GetMaybeFileHdl());
+if (aDirArr.size() &&
+std::find(aDirArr.begin(), aDirArr.end(), sPth) != 
aDirArr.end())
+{
+continue;
+}
+aDirArr.push_back(sPth);
+if( !FStatHelper::IsFolder( sPth ) )
+aInvalidPaths.push_back(sPth);
+else
+m_PathArr.push_back(sPth);
 }
-aDirArr.push_back(sPth);
-if( !FStatHelper::IsFolder( sPth ) )
-aInvalidPaths.push_back(sPth);
-else
-m_PathArr.push_back(sPth);
+while (nIndex>=0);
 }
 
-if(!nTokenCount || !aInvalidPaths.empty())
+if (m_aPath.isEmpty() || !aInvalidPaths.empty())
 {
 std::sort(aInvalidPaths.begin(), aInvalidPaths.end());
 aInvalidPaths.erase(std::unique(aInvalidPaths.begin(), 
aInvalidPaths.end()), aInvalidPaths.end());
@@ -521,16 +526,23 @@ void SwGlossaries::RemoveFileFromList( const OUString& 
rGroup )
 
 OUString SwGlossaries::GetCompleteGroupName( const OUString& rGroupName )
 {
-sal_uInt16 nCount = GetGroupCnt();
+const sal_uInt16 nCount = GetGroupCnt();
 // when the group name was created internally the path is here as well
-const OUString sGroupName(rGroupName.getToken(0, GLOS_DELIM));
-const bool bPathLen = !rGroupName.getToken(1, GLOS_DELIM).isEmpty();
+sal_Int32 nIndex = 0;
+const OUString sGroupName(rGroupName.getToken(0, GLOS_DELIM, nIndex));
+const bool bPathLen = !rGroupName.getToken(0, GLOS_DELIM, 
nIndex).isEmpty();
 for ( sal_uInt16 i = 0; i < nCount; i++ )
 {
 const OUString sGrpName = GetGroupName(i);
-if(bPathLen ? rGroupName == sGrpName : sGroupName == 
sGrpName.getToken(0, GLOS_DELIM))
+if (bPathLen)
+{
+if (rGroupName == sGrpName)
+return sGrpName;
+}
+else
 {
-return sGrpName;
+if (sGroupName == sGrpName.getToken(0, GLOS_DELIM))
+return sGrpName;
 }
 }
 return OUString();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/ui/inc/glossary.hxx  |4 +++
 sw/source/ui/misc/glossary.cxx |   53 ++---
 2 files changed, 18 insertions(+), 39 deletions(-)

New commits:
commit 743c7c09b4deb7b62e49268f9867b96e6aab158c
Author: Matteo Casalin 
Date:   Fri Aug 23 23:30:22 2013 +0200

SwGlTreeListBox: NotifyCoping and NotifyMoving almost equal

Change-Id: I4cb9f7fccb7d5525a84dc8f5b1f25d1350d0f106
Reviewed-on: https://gerrit.libreoffice.org/5615
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/ui/inc/glossary.hxx b/sw/source/ui/inc/glossary.hxx
index 3beb52a..510fa83 100644
--- a/sw/source/ui/inc/glossary.hxx
+++ b/sw/source/ui/inc/glossary.hxx
@@ -70,6 +70,10 @@ class SwGlTreeListBox : public SvTreeListBox
 SvTreeListEntry*  pEntry,
 SvTreeListEntry*& rpNewParent,
 sal_uLong&rNewChildPos);
+
+sal_Bool NotifyCopyingOrMoving( SvTreeListEntry*  pTarget,
+SvTreeListEntry*  pEntry,
+bool  bIsMove);
 public:
 SwGlTreeListBox(Window* pParent, WinBits nBits);
 
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 7cb9983..414430d 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -954,44 +954,7 @@ sal_Bool  SwGlTreeListBox::NotifyMoving(   
SvTreeListEntry*  pTarget,
 sal_uLong&/*rNewChildPos*/
 )
 {
-pDragEntry = 0;
-if(!pTarget) // move to the beginning
-{
-pTarget = GetEntry(0);
-}
-// 1. move to different groups?
-// 2. allowed to write in both groups?
-SvTreeListEntry* pSrcParent = GetParent(pEntry);
-SvTreeListEntry* pDestParent =
-GetParent(pTarget) ? GetParent(pTarget) : pTarget;
-sal_Bool bRet = sal_False;
-if(pDestParent != pSrcParent)
-{
-SwGlossaryDlg* pDlg = (SwGlossaryDlg*)GetParentDialog();
-SwWait aWait( *pDlg->pSh->GetView().GetDocShell(), sal_True );
-
-GroupUserData* pGroupData = (GroupUserData*)pSrcParent->GetUserData();
-OUString sSourceGroup = pGroupData->sGroupName
-+ OUString(GLOS_DELIM)
-+ OUString::number(pGroupData->nPathIdx);
-pDlg->pGlossaryHdl->SetCurGroup(sSourceGroup);
-OUString sTitle(GetEntryText(pEntry));
-OUString sShortName(*(String*)pEntry->GetUserData());
-
-GroupUserData* pDestData = (GroupUserData*)pDestParent->GetUserData();
-OUString sDestName = pDestData->sGroupName
-+ OUString(GLOS_DELIM)
-+ OUString::number(pDestData->nPathIdx);
-bRet = pDlg->pGlossaryHdl->CopyOrMove( sSourceGroup,  sShortName,
-sDestName, sTitle, sal_True );
-if(bRet)
-{
-SvTreeListEntry* pChild = InsertEntry(sTitle, pDestParent);
-pChild->SetUserData(new String(sShortName));
-GetModel()->Remove(pEntry);
-}
-}
-return sal_False; // otherwise the entry is being set automatically
+return NotifyCopyingOrMoving(pTarget, pEntry, true);
 }
 
 sal_Bool  SwGlTreeListBox::NotifyCopying(   SvTreeListEntry*  pTarget,
@@ -1000,6 +963,14 @@ sal_Bool  SwGlTreeListBox::NotifyCopying(   
SvTreeListEntry*  pTarget,
 sal_uLong&/*rNewChildPos*/
 )
 {
+return NotifyCopyingOrMoving(pTarget, pEntry, false);
+}
+
+sal_Bool SwGlTreeListBox::NotifyCopyingOrMoving(
+SvTreeListEntry*  pTarget,
+SvTreeListEntry*  pEntry,
+bool  bIsMove)
+{
 pDragEntry = 0;
 // 1. move in different groups?
 // 2. allowed to write to both groups?
@@ -1031,11 +1002,15 @@ sal_Bool  SwGlTreeListBox::NotifyCopying(   
SvTreeListEntry*  pTarget,
 + OUString::number(pDestData->nPathIdx);
 
 bRet = pDlg->pGlossaryHdl->CopyOrMove( sSourceGroup,  sShortName,
-sDestName, sTitle, sal_False );
+sDestName, sTitle, bIsMove );
 if(bRet)
 {
 SvTreeListEntry* pChild = InsertEntry(sTitle, pDestParent);
 pChild->SetUserData(new String(sShortName));
+if (bIsMove)
+{
+GetModel()->Remove(pEntry);
+}
 }
 }
 return sal_False; // otherwise the entry is being set automatically
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/swabstdlg.hxx  |6 +++---
 sw/source/ui/chrdlg/chardlg.cxx   |8 ++--
 sw/source/ui/chrdlg/pardlg.cxx|8 ++--
 sw/source/ui/dialog/swdlgfact.cxx |6 +++---
 sw/source/ui/dialog/swdlgfact.hxx |6 +++---
 sw/source/ui/envelp/envfmt.cxx|4 ++--
 sw/source/ui/frmdlg/frmdlg.cxx|7 ++-
 sw/source/ui/inc/chrdlg.hxx   |2 +-
 sw/source/ui/inc/frmdlg.hxx   |2 +-
 sw/source/ui/inc/swuipardlg.hxx   |2 +-
 10 files changed, 20 insertions(+), 31 deletions(-)

New commits:
commit 90f83bd75ffde23a42f1165b5c1e7272dca71164
Author: Matteo Casalin 
Date:   Sat Aug 24 12:15:18 2013 +0200

String to OUString + missing SetText

SetText was addes as seen in other dialogs, for completeness,
although all call places seem to pass the default null pointer.

Change-Id: I1fe1792ad6f061fc762bae237f5cecfcbbd1ce06
Reviewed-on: https://gerrit.libreoffice.org/5616
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 7a6402c..9d6f988 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -340,7 +340,7 @@ public:
 virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell 
&rSh) = 0; // add for SwBreakDlg
 virtual VclAbstractDialog   * CreateSwChangeDBDlg(SwView& rVw) = 0; //add 
for SwChangeDBDlg
 virtual SfxAbstractTabDialog *  CreateSwCharDlg(Window* pParent, SwView& 
pVw, const SfxItemSet& rCoreSet,
-sal_uInt8 nDialogMode, const String* pFmtStr = 0) = 0;  // add for 
SwCharDlg
+sal_uInt8 nDialogMode, const OUString* pFmtStr = 0) = 0;  // add for 
SwCharDlg
 virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, 
bool bToTable) = 0; //add for SwConvertTableDlg
 virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, 
SwView &rV,int nResId) = 0; //add for SwCaptionDialog
 
@@ -365,7 +365,7 @@ public:
 SwView& rVw,
 const SfxItemSet& rCoreSet,
 sal_uInt8 nDialogMode,
-const String *pCollName = 
0,
+const OUString *pCollName 
= 0,
 sal_Bool bDraw = sal_False,
 OString sDefPage = 
OString() ) = 0;
 
@@ -397,7 +397,7 @@ public:
 bool bNewFrm = true,
 bool bFmt = false,
 OString sDefPage = OString(),
-const String* pFmtStr = 0) = 
0;  //add for SwFrmDlg
+const OUString* pFmtStr = 0) = 
0;  //add for SwFrmDlg
 // @param nSlot
 // Identifies optional Slot by which the creation of the Template (Style) 
dialog is triggered.
 // Currently used, if nRegion == SFX_STYLE_FAMILY_PAGE in order to 
activate certain dialog pane
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index db5ffc3..5fccdce 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star::uno;
 using namespace ::sfx2;
 
 SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
-sal_uInt8 nDialogMode, const String* pStr)
+sal_uInt8 nDialogMode, const OUString* pStr)
 : SfxTabDialog(0, pParent, "CharacterPropertiesDialog",
 "modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != 0)
 , m_rView(rVw)
@@ -67,11 +67,7 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const 
SfxItemSet& rCoreSet,
 {
 if(pStr)
 {
-String aTmp( GetText() );
-aTmp += SW_RESSTR(STR_TEXTCOLL_HEADER);
-aTmp += *pStr;
-aTmp += ')';
-SetText(aTmp);
+SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pStr + 
OUString(')'));
 }
 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
 OSL_ENSURE(pFact, "Dialogdiet fail!");
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 7686e40..3106894 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -48,7 +48,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
 SwView& rVw,
 const SfxItemSet& rCoreSet,
 sal_uInt8 nDialogMode,
-const String *pTitle,
+const OUString *pTitle,
 sal_Bool bDraw,
 OString sDefPage)
 : SfxTabDialog(pParent,
@@ -71,11 +71,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
 if(pTitle)
 {
 // Update title
-String aTmp( GetText()

[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/ui/frmdlg/cption.cxx   |   22 +++-
 sw/source/ui/inc/initui.hxx  |   25 -
 sw/source/ui/misc/glossary.cxx   |   48 +++---
 sw/source/ui/uiview/viewdlg2.cxx |   25 ++---
 sw/source/ui/utlui/initui.cxx|  101 ++-
 5 files changed, 126 insertions(+), 95 deletions(-)

New commits:
commit 9be8cc68cda77b22259bb418b5577918ba891362
Author: Matteo Casalin 
Date:   Sat Aug 24 14:22:58 2013 +0200

String to OUString and hide implementation details

Change-Id: I91ca70273b2262f8aee7e7bb8000d1271e727b18
Reviewed-on: https://gerrit.libreoffice.org/5617
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 201b1c7..f124f1b 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -42,17 +42,13 @@
 #include 
 #include 
 #include 
+#include "initui.hxx"
 #include 
 #include 
 #include 
 
 using namespace ::com::sun::star;
 
-extern String* GetOldGrfCat();
-extern String* GetOldTabCat();
-extern String* GetOldFrmCat();
-extern String* GetOldDrwCat();
-
 class SwSequenceOptionDialog : public SvxStandardDialog
 {
 ListBox*m_pLbLevel;
@@ -144,12 +140,12 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView 
&rV ) :
 m_pCategoryBox->InsertEntry(pType->GetName());
 }
 
-String* pString = 0;
+OUString sString;
 sal_uInt16 nPoolId = 0;
 if (eType & nsSelectionType::SEL_GRF)
 {
 nPoolId = RES_POOLCOLL_LABEL_ABB;
-pString = ::GetOldGrfCat();
+sString = ::GetOldGrfCat();
 bCopyAttributes = sal_True;
 sObjectName = rSh.GetFlyName();
 //if not OLE
@@ -163,7 +159,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView 
&rV ) :
 else if( eType & nsSelectionType::SEL_TBL )
 {
 nPoolId = RES_POOLCOLL_LABEL_TABLE;
-pString = ::GetOldTabCat();
+sString = ::GetOldTabCat();
 uno::Reference< text::XTextTablesSupplier >  xTables(xModel, 
uno::UNO_QUERY);
 xNameAccess = xTables->getTextTables();
 sObjectName = rSh.GetTableFmt()->GetName();
@@ -171,7 +167,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView 
&rV ) :
 else if( eType & nsSelectionType::SEL_FRM )
 {
 nPoolId = RES_POOLCOLL_LABEL_FRAME;
-pString = ::GetOldFrmCat();
+sString = ::GetOldFrmCat();
  uno::Reference< text::XTextFramesSupplier >  xFrms(xModel, 
uno::UNO_QUERY);
 xNameAccess = xFrms->getTextFrames();
 sObjectName = rSh.GetFlyName();
@@ -179,17 +175,17 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView 
&rV ) :
 else if( eType == nsSelectionType::SEL_TXT )
 {
 nPoolId = RES_POOLCOLL_LABEL_FRAME;
-pString = ::GetOldFrmCat();
+sString = ::GetOldFrmCat();
 }
 else if( eType & nsSelectionType::SEL_DRW )
 {
 nPoolId = RES_POOLCOLL_LABEL_DRAWING;
-pString = ::GetOldDrwCat();
+sString = ::GetOldDrwCat();
 }
 if( nPoolId )
 {
-if( pString && pString->Len())
-m_pCategoryBox->SetText( *pString );
+if (!sString.isEmpty())
+m_pCategoryBox->SetText( sString );
 else
 m_pCategoryBox->SetText(
 SwStyleNameMapper::GetUIName( nPoolId, aEmptyStr ));
diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx
index 297bb0b..c6f0b10 100644
--- a/sw/source/ui/inc/initui.hxx
+++ b/sw/source/ui/inc/initui.hxx
@@ -21,6 +21,7 @@
 
 #include "tools/solar.h"
 #include "swdllapi.h"
+#include "rtl/ustring.hxx"
 
 #include 
 
@@ -35,19 +36,17 @@ class SwThesaurus;
  */
 extern  SwThesaurus*pThes;
 
-extern  String* pOldGrfCat;
-extern  String* pOldTabCat;
-extern  String* pOldFrmCat;
-
-extern  String* pCurrGlosGroup;
-
-SW_DLLPUBLIC String* GetOldGrfCat();
-SW_DLLPUBLIC String* GetOldTabCat();
-SW_DLLPUBLIC String* GetOldFrmCat();
-SW_DLLPUBLIC String* GetOldDrwCat();
-
-SW_DLLPUBLIC String* GetCurrGlosGroup();
-SW_DLLPUBLIC void SetCurrGlosGroup(String* pStr);
+SW_DLLPUBLIC OUString GetOldGrfCat();
+SW_DLLPUBLIC void SetOldGrfCat(OUString sStr);
+SW_DLLPUBLIC OUString GetOldTabCat();
+SW_DLLPUBLIC void SetOldTabCat(OUString sStr);
+SW_DLLPUBLIC OUString GetOldFrmCat();
+SW_DLLPUBLIC void SetOldFrmCat(OUString sStr);
+SW_DLLPUBLIC OUString GetOldDrwCat();
+SW_DLLPUBLIC void SetOldDrwCat(OUString sStr);
+
+SW_DLLPUBLIC OUString GetCurrGlosGroup();
+SW_DLLPUBLIC void SetCurrGlosGroup(OUString sStr);
 
 extern std::vector*   pDBNameList;
 
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 414430d..4319fcd 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -159,16 +159,14 @@ SwNewGlosNameDlg::SwNewGlosNameDlg(Window* pParent,
 ---

[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/filter/ww8/attributeoutputbase.hxx |3 
 sw/source/filter/ww8/docxattributeoutput.cxx |   42 ---
 sw/source/filter/ww8/docxattributeoutput.hxx |2 
 sw/source/filter/ww8/wrtw8nds.cxx|   98 +++
 sw/source/filter/ww8/wrtww8.hxx  |2 
 sw/source/filter/ww8/ww8atr.cxx  |7 -
 sw/source/filter/ww8/ww8attributeoutput.hxx  |2 
 7 files changed, 66 insertions(+), 90 deletions(-)

New commits:
commit e19804aabac1e6beae444bc9d8918b8fc78868cd
Author: Matteo Casalin 
Date:   Sat Aug 24 17:29:44 2013 +0200

String to OUString and some cleanup

Change-Id: I78790a84fc86bd852899aebbaff526c7cec224cf
Reviewed-on: https://gerrit.libreoffice.org/5618
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx 
b/sw/source/filter/ww8/attributeoutputbase.hxx
index cadce5a..c415d3c 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -118,6 +118,7 @@ class SwNumRule;
 class wwFont;
 
 class String;
+namespace rtl { class OUString; }
 
 class MSWordExportBase;
 
@@ -574,7 +575,7 @@ protected:
 virtual bool DropdownField( const SwField* pFld ) = 0;
 virtual bool PlaceholderField( const SwField* pFld ) = 0;
 
-virtual bool AnalyzeURL( const String& rUrl, const String& rTarget, 
String* pLinkURL, String* pMark );
+virtual bool AnalyzeURL( const OUString& rUrl, const OUString& rTarget, 
OUString* pLinkURL, OUString* pMark );
 
 ww8::GridColsPtr GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t 
pTableTextNodeInfoInner );
 
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8188fd6..5fa9713 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1260,48 +1260,38 @@ void DocxAttributeOutput::EndRuby()
 m_pSerializer->endElementNS( XML_w, XML_ruby );
 }
 
-bool DocxAttributeOutput::AnalyzeURL( const String& rUrl, const String& 
rTarget, String* pLinkURL, String* pMark )
+bool DocxAttributeOutput::AnalyzeURL( const OUString& rUrl, const OUString& 
rTarget, OUString* pLinkURL, OUString* pMark )
 {
 bool bBookMarkOnly = AttributeOutputBase::AnalyzeURL( rUrl, rTarget, 
pLinkURL, pMark );
 
-String sURL = *pLinkURL;
-String sMark = *pMark;
-
-bool bOutputField = sMark.Len();
-
-if ( bOutputField )
+if ( !pMark->isEmpty() )
 {
+OUString sURL = *pLinkURL;
+
 if ( bBookMarkOnly )
 sURL = FieldString( ww::eHYPERLINK );
 else
-{
-String sFld( FieldString( ww::eHYPERLINK ) );
-sFld.AppendAscii( "\"" );
-sURL.Insert( sFld, 0 );
-sURL += '\"';
-}
+sURL = FieldString( ww::eHYPERLINK ) + "\"" + sURL + "\"";
 
-if ( sMark.Len() )
-( ( sURL.AppendAscii( " \\l \"" ) ) += sMark ) += '\"';
+sURL += " \\l \"" + *pMark + "\"";
 
-if ( rTarget.Len() )
-( sURL.AppendAscii( " \\n " ) ) += rTarget;
-}
+if ( !rTarget.isEmpty() )
+sURL += " \\n " + rTarget;
 
-*pLinkURL = sURL;
-*pMark = sMark;
+*pLinkURL = sURL;
+}
 
 return bBookMarkOnly;
 }
 
 bool DocxAttributeOutput::StartURL( const String& rUrl, const String& rTarget )
 {
-String sMark;
-String sUrl;
+OUString sMark;
+OUString sUrl;
 
 bool bBookmarkOnly = AnalyzeURL( rUrl, rTarget, &sUrl, &sMark );
 
-if ( sMark.Len() && !bBookmarkOnly )
+if ( !sMark.isEmpty() && !bBookmarkOnly )
 {
 m_rExport.OutputField( NULL, ww::eHYPERLINK, sUrl );
 }
@@ -1312,17 +1302,15 @@ bool DocxAttributeOutput::StartURL( const String& rUrl, 
const String& rTarget )
 
 if ( !bBookmarkOnly )
 {
-OUString osUrl( sUrl );
-
 OString sId = OUStringToOString( 
GetExport().GetFilter().addRelation( m_pSerializer->getOutputStream(),
 
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";,
-osUrl, true ), RTL_TEXTENCODING_UTF8 );
+sUrl, true ), RTL_TEXTENCODING_UTF8 );
 
 m_pHyperlinkAttrList->add( FSNS( XML_r, XML_id), sId.getStr());
 }
 else
 m_pHyperlinkAttrList->add( FSNS( XML_w, XML_anchor ),
-OUStringToOString( OUString( sMark ), 
RTL_TEXTENCODING_UTF8 ).getStr( ) );
+OUStringToOString( sMark, RTL_TEXTENCODING_UTF8 ).getStr( 
) );
 
 OUString sTarget( rTarget );
 if ( !sTarget.isEmpty() )
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index e02eaae..a6c4532 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -578,7 +578,7 @@ protected:
 virtua

[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/core/unocore/unofield.cxx |   22 +-
 1 file changed, 9 insertions(+), 13 deletions(-)

New commits:
commit a3d10e95d24d9199de60b05e2ce4207f57988021
Author: Matteo Casalin 
Date:   Sun Aug 25 01:50:22 2013 +0200

vector to vector as a temporary

Change-Id: Ib615c88c0ca9c0a3d969860249e96cb71b75f6f7
Reviewed-on: https://gerrit.libreoffice.org/5623
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index db9e2a3..57cb5bc 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2700,29 +2700,25 @@ uno::Sequence< OUString > 
SwXTextFieldMasters::getElementNames(void)
 throw uno::RuntimeException();
 
 const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
-sal_uInt16 nCount = pFldTypes->size();
-
-std::vector aFldNames;
-OUString* pString = new OUString();
+const size_t nCount = pFldTypes->size();
 
-for( sal_uInt16 i = 0; i < nCount; i++)
+std::vector aFldNames;
+for( size_t i = 0; i < nCount; ++i )
 {
 SwFieldType& rFldType = *((*pFldTypes)[i]);
 
-if (SwXTextFieldMasters::getInstanceName(rFldType, *pString))
+OUString sFldName;
+if (SwXTextFieldMasters::getInstanceName(rFldType, sFldName))
 {
-aFldNames.push_back(pString);
-pString = new OUString();
+aFldNames.push_back(sFldName);
 }
 }
-delete pString;
 
-uno::Sequence< OUString > aSeq( static_cast(aFldNames.size()) 
);
+uno::Sequence< OUString > aSeq( static_cast(aFldNames.size()) );
 OUString* pArray = aSeq.getArray();
-for(sal_uInt16 i = 0; i < aFldNames.size();i++)
+for (size_t i = 0; ihttp://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2013-08-25 Thread Matteo Casalin
 sw/source/core/unocore/unofield.cxx |   80 +---
 1 file changed, 38 insertions(+), 42 deletions(-)

New commits:
commit ab5c85f1307ceb3e0ac97b601e01d74ffd5778b7
Author: Matteo Casalin 
Date:   Sun Aug 25 02:14:52 2013 +0200

Use support function for name of services

Change-Id: Ib77a2aebdf6d557b78d433c4d9a81e6e9ad0edf1
Reviewed-on: https://gerrit.libreoffice.org/5624
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 57cb5bc..8dee53a 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -455,35 +455,47 @@ throw (uno::RuntimeException)
 return OUString("SwXFieldMaster");
 }
 
+namespace
+{
+
+OUString getServiceName(const sal_uInt16 aId)
+{
+const sal_Char* pEntry;
+switch (aId)
+{
+case RES_USERFLD:
+pEntry = "User";
+break;
+case RES_DBFLD:
+pEntry = "Database";
+break;
+case RES_SETEXPFLD:
+pEntry = "SetExpression";
+break;
+case RES_DDEFLD:
+pEntry = "DDE";
+break;
+case RES_AUTHORITY:
+pEntry = "Bibliography";
+break;
+default:
+return OUString();
+}
+
+return "com.sun.star.text.fieldmaster." + 
OUString::createFromAscii(pEntry);
+}
+
+}
+
 sal_Bool SAL_CALL
 SwXFieldMaster::supportsService(const OUString& rServiceName)
 throw (uno::RuntimeException)
 {
-sal_Bool bRet = sal_False;
-if(rServiceName.equalsAsciiL(
-RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextFieldMaster")))
-bRet = sal_True;
-else
-{
-const sal_Char* pEntry;
-switch (m_pImpl->m_nResTypeId)
-{
-case RES_USERFLD:   pEntry = "User";break;
-case RES_DBFLD: pEntry = "Database";break;
-case RES_SETEXPFLD: pEntry = "SetExpression";   break;
-case RES_DDEFLD:pEntry = "DDE"; break;
-case RES_AUTHORITY: pEntry = "Bibliography";break;
-default: pEntry = 0;
-}
-if( pEntry )
-{
-OString aTmp = OStringBuffer(RTL_CONSTASCII_STRINGPARAM(
-"com.sun.star.text.fieldmaster.")).append(pEntry).
-makeStringAndClear();
-bRet = rServiceName.equalsAsciiL(aTmp.getStr(), aTmp.getLength());
-}
-}
-return bRet;
+if (rServiceName=="com.sun.star.text.TextFieldMaster")
+return sal_True;
+
+const OUString sName(getServiceName(m_pImpl->m_nResTypeId));
+return !sName.isEmpty() && sName==rServiceName;
 }
 
 uno::Sequence< OUString > SAL_CALL
@@ -492,23 +504,7 @@ SwXFieldMaster::getSupportedServiceNames() throw 
(uno::RuntimeException)
 uno::Sequence< OUString > aRet(2);
 OUString* pArray = aRet.getArray();
 pArray[0] = "com.sun.star.text.TextFieldMaster";
-
-const sal_Char* pEntry1;
-switch (m_pImpl->m_nResTypeId)
-{
-case RES_USERFLD:   pEntry1 = "User";   break;
-case RES_DBFLD: pEntry1 = "Database";   break;
-case RES_SETEXPFLD: pEntry1 = "SetExpression";  break;
-case RES_DDEFLD:pEntry1 = "DDE";break;
-case RES_AUTHORITY: pEntry1 = "Bibliography";   break;
-default: pEntry1 = 0;
-}
-if( pEntry1 )
-{
-String s;
-s.AppendAscii( "com.sun.star.text.fieldmaster." ).AppendAscii( pEntry1 
);
-pArray[1] = s;
-}
+pArray[1] = getServiceName(m_pImpl->m_nResTypeId);
 return aRet;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2013-08-25 Thread Matteo Casalin
 sw/inc/doc.hxx   |6 +++---
 sw/inc/fesh.hxx  |4 ++--
 sw/source/core/doc/docredln.cxx  |6 +++---
 sw/source/core/docnode/ndtbl.cxx |2 +-
 sw/source/core/edit/autofmt.cxx  |9 -
 sw/source/core/frmedt/fetab.cxx  |2 +-
 sw/source/ui/utlui/content.cxx   |2 +-
 7 files changed, 15 insertions(+), 16 deletions(-)

New commits:
commit d4c97a522e269a8875a8dadea1f6d728e91d77f7
Author: Matteo Casalin 
Date:   Sun Aug 25 13:30:29 2013 +0200

String to OUString

Change-Id: I4e35c8876d9bfbddb9da6c96cd605905343df1e7
Reviewed-on: https://gerrit.libreoffice.org/5626
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index ded1285..831fcba 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -359,7 +359,7 @@ class SW_DLLPUBLIC SwDoc :
 tHashMapForLists maListStyleLists;
 
 SwRedlineTbl*mpRedlineTbl;   ///< List of all Redlines.
-String  *mpAutoFmtRedlnComment;  ///< Comment for Redlines 
inserted via AutoFormat.
+OUString*mpAutoFmtRedlnComment;  ///< Comment for Redlines 
inserted via AutoFormat.
 
 SwUnoCrsrTbl*mpUnoCrsrTbl;
 
@@ -1689,7 +1689,7 @@ public:
 sal_Bool UnProtectCells( const SwSelBoxes& rBoxes );
 sal_Bool UnProtectTbls( const SwPaM& rPam );
 sal_Bool HasTblAnyProtection( const SwPosition* pPos,
-  const String* pTblName = 0,
+  const OUString* pTblName = 0,
   sal_Bool* pFullTblProtection = 0 );
 
 /// Split table at baseline position, i.e. create a new table.
@@ -1854,7 +1854,7 @@ public:
 /** Set comment-text for Redline. It then comes in via AppendRedLine.
  Used by AutoFormat. 0-pointer resets mode.
  Sequence number is for conjoining of Redlines by the UI. */
-void SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo = 0 );
+void SetAutoFmtRedlineComment( const OUString* pTxt, sal_uInt16 nSeqNo = 0 
);
 
 bool IsAutoFmtRedline() const   { return mbIsAutoFmtRedline; }
 void SetAutoFmtRedline( bool bFlag ){ mbIsAutoFmtRedline = bFlag; }
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 4aaa973..b1b5a11 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -29,7 +29,7 @@
 #include 
 
 #include 
-
+#include "rtl/ustring.hxx"
 #include 
 
 #include 
@@ -651,7 +651,7 @@ public:
  cursor is not allowed in readonly. */
 void UnProtectCells();  ///< Refers to table selection.
 void UnProtectTbls();   ///< Unprotect all tables in selection.
-sal_Bool HasTblAnyProtection( const String* pTblName = 0,
+sal_Bool HasTblAnyProtection( const OUString* pTblName = 0,
 sal_Bool* pFullTblProtection = 0 );
 sal_Bool CanUnProtectCells() const;
 
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 0acb592..1ac94ad 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -298,7 +298,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool 
bCallDelete )
 if( mbIsAutoFmtRedline )
 {
 pNewRedl->SetAutoFmtFlag();
-if( mpAutoFmtRedlnComment && mpAutoFmtRedlnComment->Len() )
+if( mpAutoFmtRedlnComment && !mpAutoFmtRedlnComment->isEmpty() )
 {
 pNewRedl->SetComment( *mpAutoFmtRedlnComment );
 pNewRedl->SetSeqNo( mnAutoFmtRedlnCommentNo );
@@ -2537,13 +2537,13 @@ void SwDoc::UpdateRedlineAttr()
 /// AppendRedline. Is used by Autoformat.
 /// A null pointer resets the mode. The pointer is not copied, so it
 /// needs to stay valid!
-void SwDoc::SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo )
+void SwDoc::SetAutoFmtRedlineComment( const OUString* pTxt, sal_uInt16 nSeqNo )
 {
 mbIsAutoFmtRedline = 0 != pTxt;
 if( pTxt )
 {
 if( !mpAutoFmtRedlnComment )
-mpAutoFmtRedlnComment = new String( *pTxt );
+mpAutoFmtRedlnComment = new OUString( *pTxt );
 else
 *mpAutoFmtRedlnComment = *pTxt;
 }
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 751b6dc..db0de08 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -4538,7 +4538,7 @@ sal_Bool SwDoc::UnProtectTbls( const SwPaM& rPam )
 }
 
 sal_Bool SwDoc::HasTblAnyProtection( const SwPosition* pPos,
- const String* pTblName,
+ const OUString* pTblName,
  sal_Bool* pFullTblProtection )
 {
 sal_Bool bHasProtection = sal_False;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index c3c28df..9b4dae9 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -265,7 +265,7 @@ void SwAutoFormat::_GetCharClass( LanguageType 

[GSOC]Firebird Integration Weekly Update 11

2013-08-25 Thread Andrzej Hunt
Hello everyone,


Current status of the firebird-sdbc driver:

(- String/[VAR]CHAR only supported for now, numeric types should be
fairly simple to add.)
- Data Editing in the GUI works.
- Data Insertion works but buggy.*
(- Table and Column definition/manipulation is mostly complete, there
might still be a few minor-to-major issues, indexes aren't supported at
all.)

*Data is entered in the db ok (i.e. shown after closing and reopening a
table), but shown either incorrectly or not at all in the GUI directly
after insertion -- this is an anomaly in the interaction of dbaccess's
RowSet/CacheSet/etc. and the firebird-sdbc ResultSet which I'm currently
investigating.


This weeks progress in general:

- Cleaned up ResultSet's properties: use PropertyContainer instead of
PropertySetHelper, removing a lot of boilerplate code (that I didn't
really understand anyway).
- Set up storing the NULL value in PreparedStatements so that we can
actually save data to the db -- previously the null indicator being set
to a random value meant that firebird would simply ignore the input most
of the time.
- Made PreparedStatements reusable by closing the cursor before
re-running ("free statement" has a deceptive name and is in fact also
needed to close cursors before re-running a statement).
- Removed a whole bunch of unsupported and unneeded methods / interfaces
within ResultSet.
- Set sdbcx Table Privileges to actually allow editing of tables.
Currently we assume all privileges for embedded mode -- I still need to
add the code to retrieve privileges from remote dbs.
- Some SQL statement building simplification / simpler conditions within
DatabaseMetaData.
- Improved key handling: extended OKeysHelper to correctly drop Primary
and Foreign Keys.
- Added user retrieval: is currently unused and untested since we don't
actually have multiple users for an embedded db.


Cheers,

Andrzej

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/qa sw/source

2013-08-25 Thread Jelle van der Waa
 sw/qa/core/uwriter.cxx|   14 +---
 sw/source/core/crsr/bookmrk.cxx   |   54 +-
 sw/source/filter/ww8/rtfsdrexport.cxx |5 ---
 3 files changed, 18 insertions(+), 55 deletions(-)

New commits:
commit 88011f4cdf050c2df0b7488e273332d4e7048012
Author: Jelle van der Waa 
Date:   Sat Aug 24 12:50:01 2013 +0200

fdo#57950: Remove some chained appends in sw

Change-Id: Ib63fe1cf689d8f3cab4ca3571dd71f712e3fd7a5
Reviewed-on: https://gerrit.libreoffice.org/5602
Reviewed-by: Andrzej J.R. Hunt 
Tested-by: Andrzej J.R. Hunt 

diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 20f974f..0cbad14 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -275,23 +275,13 @@ void SwDocTest::testModelToViewHelper()
 {
 ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEINVISIBLE);
 OUString sViewText = aModelToViewHelper.getViewText();
-OUStringBuffer aBuffer;
-aBuffer.append("A C ");
-aBuffer.append(CH_TXTATR_BREAKWORD);
-aBuffer.append(" D");
-CPPUNIT_ASSERT(sViewText == aBuffer.makeStringAndClear());
+CPPUNIT_ASSERT(sViewText == "A C " + 
OUString(CH_TXTATR_BREAKWORD) + " D");
 }
 
 {
 ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEREDLINED);
 OUString sViewText = aModelToViewHelper.getViewText();
-OUStringBuffer aBuffer;
-aBuffer.append("BB ");
-aBuffer.append(CH_TXTATR_BREAKWORD);
-aBuffer.append(" C ");
-aBuffer.append(CH_TXTATR_BREAKWORD);
-aBuffer.append(" D");
-CPPUNIT_ASSERT(sViewText == aBuffer.makeStringAndClear());
+CPPUNIT_ASSERT(sViewText == "BB " + 
OUString(CH_TXTATR_BREAKWORD) + " C " + OUString(CH_TXTATR_BREAKWORD) + " 
D");
 }
 
 {
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 09f3438..8c8f450 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -161,15 +161,9 @@ namespace sw { namespace mark
 
 OUString MarkBase::ToString( ) const
 {
-OUStringBuffer buf;
-buf.append("Mark: ( Name, [ Node1, Index1 ] ): ( ");
-buf.append( m_aName ).append(", [ ");
-buf.append( sal_Int32( GetMarkPos().nNode.GetIndex( ) ) )
-.append(", ");
-buf.append( sal_Int32( GetMarkPos().nContent.GetIndex( ) ) )
-.append(" ] )");
-
-return buf.makeStringAndClear( );
+return "Mark: ( Name, [ Node1, Index1 ] ): ( " + m_aName + ", [ "
++ OUString::number( GetMarkPos().nNode.GetIndex( ) )  + ", "
++ OUString::number( GetMarkPos().nContent.GetIndex( ) ) + " ] )";
 }
 
 MarkBase::~MarkBase()
@@ -306,21 +300,11 @@ namespace sw { namespace mark
 
 OUString Fieldmark::ToString( ) const
 {
-OUStringBuffer buf;
-buf.append(
-"Fieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( ");
-buf.append( m_aName ).append(", ");
-buf.append( m_aFieldname ).append(", [ ");
-buf.append( sal_Int32( GetMarkPos().nNode.GetIndex( ) ) )
-.append(", ");
-buf.append( sal_Int32( GetMarkPos( ).nContent.GetIndex( ) ) )
-.append(" ], [");
-buf.append( sal_Int32( GetOtherMarkPos().nNode.GetIndex( ) ) )
-.append(", ");
-buf.append( sal_Int32( GetOtherMarkPos( ).nContent.GetIndex( ) ) )
-.append(" ] ) ");
-
-return buf.makeStringAndClear( );
+return "Fieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( " + 
m_aName + ", "
++ m_aFieldname + ", [ " + OUString::number( 
GetMarkPos().nNode.GetIndex( ) )
++ ", " + OUString::number( GetMarkPos( ).nContent.GetIndex( ) ) + 
" ], ["
++ OUString::number( GetOtherMarkPos().nNode.GetIndex( ) ) + ", "
++ OUString::number( GetOtherMarkPos( ).nContent.GetIndex( ) ) + " 
] ) ";
 }
 
 void Fieldmark::Invalidate( )
@@ -387,21 +371,13 @@ namespace sw { namespace mark
 
 OUString CheckboxFieldmark::toString( ) const
 {
-OUStringBuffer buf;
-buf.append(
-"CheckboxFieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( 
");
-buf.append( m_aName ).append(", ");
-buf.append( GetFieldname() ).append(", [ ");
-buf.append( sal_Int32( GetMarkPos().nNode.GetIndex( ) ) )
-.append(", ");
-buf.append( sal_Int32( GetMarkPos( ).nContent.GetIndex( ) ) )
-.append(" ], [");
-buf.append( sal_Int32( GetOtherMarkPos().nNode.GetIndex( ) ) )
-.append(", ");
-buf.append( sal_Int32( GetOtherMarkPos( ).nContent.GetIndex( ) ) )
-.append(" ] ) ");
-
-return buf.makeStringAndClear( );
+
+return "CheckboxFieldmark: ( Nam

[Libreoffice-commits] core.git: avmedia/source

2013-08-25 Thread Minh Ngo
 avmedia/source/vlc/vlcmanager.cxx   |   20 +--
 avmedia/source/vlc/vlcmanager.hxx   |2 +
 avmedia/source/vlc/wrapper/EventHandler.cxx |2 -
 avmedia/source/vlc/wrapper/EventHandler.hxx |2 -
 avmedia/source/vlc/wrapper/EventManager.cxx |   29 -
 avmedia/source/vlc/wrapper/EventManager.hxx |5 +++
 avmedia/source/vlc/wrapper/Instance.cxx |9 --
 avmedia/source/vlc/wrapper/Instance.hxx |1 
 avmedia/source/vlc/wrapper/Media.cxx|   22 +---
 avmedia/source/vlc/wrapper/Media.hxx|1 
 avmedia/source/vlc/wrapper/Player.cxx   |8 --
 avmedia/source/vlc/wrapper/Player.hxx   |1 
 avmedia/source/vlc/wrapper/SymbolLoader.hxx |   37 +++-
 13 files changed, 90 insertions(+), 49 deletions(-)

New commits:
commit 8a844a4b924eaadec25f9e27cef56b52a0abe50e
Author: Minh Ngo 
Date:   Sun Aug 25 20:56:20 2013 +0300

Linking symbols only once.

If they were linked unsuccessfully a VLC instance won't be created. Some 
static
functions and variables were encapsulated.

Change-Id: I9d07ac9a73a6bd59928bcc349458ea346a26deb4

diff --git a/avmedia/source/vlc/vlcmanager.cxx 
b/avmedia/source/vlc/vlcmanager.cxx
index 6a5431d..5565f5a 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -1,5 +1,9 @@
 #include "vlcmanager.hxx"
 #include "vlcplayer.hxx"
+#include "wrapper/Instance.hxx"
+#include "wrapper/EventManager.hxx"
+#include "wrapper/Media.hxx"
+#include "wrapper/Player.hxx"
 
 using namespace ::com::sun::star;
 
@@ -13,7 +17,13 @@ Manager::Manager( const uno::Reference< 
lang::XMultiServiceFactory >& rxMgr )
 : mEventHandler(new VLC::EventHandler( "EventHandler" ) )
 , mxMgr( rxMgr )
 {
-mEventHandler->launch();
+using namespace VLC;
+static bool success = Instance::LoadSymbols() && 
EventManager::LoadSymbols()
+  && Media::LoadSymbols() && Player::LoadSymbols();
+
+m_is_vlc_found = success;
+if (m_is_vlc_found)
+mEventHandler->launch();
 }
 
 Manager::~Manager()
@@ -23,6 +33,9 @@ Manager::~Manager()
 uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const 
rtl::OUString& rURL )
 throw (uno::RuntimeException)
 {
+if ( !m_is_vlc_found )
+return uno::Reference< media::XPlayer >();
+
 if ( !rURL.isEmpty() || (mPlayer.is() && dynamic_cast( 
mPlayer.get() )->url() != rURL))
 {
 VLCPlayer* pPlayer( new VLCPlayer( rURL, mEventHandler /*, mxMgr */ ) 
);
@@ -41,12 +54,15 @@ rtl::OUString SAL_CALL Manager::getImplementationName()
 sal_Bool SAL_CALL Manager::supportsService( const rtl::OUString& serviceName )
 throw (uno::RuntimeException)
 {
-return serviceName == VLC_SERVICENAME;
+return serviceName == VLC_SERVICENAME && m_is_vlc_found;
 }
 
 uno::Sequence< rtl::OUString > SAL_CALL Manager::getSupportedServiceNames()
 throw (uno::RuntimeException)
 {
+if ( !m_is_vlc_found )
+return uno::Sequence< rtl::OUString >();
+
 ::uno::Sequence< OUString > aRet(1);
 aRet[0] = VLC_SERVICENAME;
 return aRet;
diff --git a/avmedia/source/vlc/vlcmanager.hxx 
b/avmedia/source/vlc/vlcmanager.hxx
index dbcaed6..b2ea01f 100644
--- a/avmedia/source/vlc/vlcmanager.hxx
+++ b/avmedia/source/vlc/vlcmanager.hxx
@@ -45,6 +45,8 @@ public:
 private:
 ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory > mxMgr;
 ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer >  
mPlayer;
+
+bool m_is_vlc_found;
 };
 
 }
diff --git a/avmedia/source/vlc/wrapper/EventHandler.cxx 
b/avmedia/source/vlc/wrapper/EventHandler.cxx
index 19054d6..6104d31 100644
--- a/avmedia/source/vlc/wrapper/EventHandler.cxx
+++ b/avmedia/source/vlc/wrapper/EventHandler.cxx
@@ -32,4 +32,4 @@ void EventHandler::execute()
 
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/avmedia/source/vlc/wrapper/EventHandler.hxx 
b/avmedia/source/vlc/wrapper/EventHandler.hxx
index 9118da0..f203e39 100644
--- a/avmedia/source/vlc/wrapper/EventHandler.hxx
+++ b/avmedia/source/vlc/wrapper/EventHandler.hxx
@@ -31,4 +31,4 @@ namespace VLC
 
 #endif // _WRAPPER_EVENT_HANDLER_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/avmedia/source/vlc/wrapper/EventManager.cxx 
b/avmedia/source/vlc/wrapper/EventManager.cxx
index b8a194b..fe893c7 100644
--- a/avmedia/source/vlc/wrapper/EventManager.cxx
+++ b/avmedia/source/vlc/wrapper/EventManager.cxx
@@ -30,16 +30,9 @@ namespace VLC
 libvlc_event_type_t i_event_type,
 libvlc_callback_t f_callback,
 void *p_user_data );
-
-ApiMap VLC_EVENT_MANAGER_API[]

[Libreoffice-commits] core.git: vcl/source

2013-08-25 Thread Julien Nabet
 vcl/source/app/session.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 21fbeebc8e9cd264e42e76022607851391ce3868
Author: Julien Nabet 
Date:   Sun Aug 25 20:04:11 2013 +0200

Simplify iterator management

Change-Id: Ib1aaafe82c0a316d3a047a00940f65a818993321

diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index 9c0f30b..8f1ab9e 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -249,8 +249,7 @@ void SAL_CALL VCLSession::removeSessionManagerListener( 
const css::uno::Referenc
 {
 if( it->m_xListener == xListener )
 {
-m_aListeners.erase( it );
-it = m_aListeners.begin();
+it = m_aListeners.erase(it);
 }
 else
 ++it;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2013-08-25 Thread Pavel Janík
 sw/source/ui/docvw/edtwin.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit acad1fbe75ca9e534ed1001cd7aa930e57e22048
Author: Pavel Janík 
Date:   Sun Aug 25 17:52:02 2013 +

WaE: Remove unused variables to prevent compiler warnings.

diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index e51cf48..7c3e8dc 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2276,8 +2276,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
 if(pFieldmark)
 {
 pFieldmark->SetChecked(!pFieldmark->IsChecked());
-SwDocShell* pDocSh = rView.GetDocShell();
-SwDoc *pDoc=pDocSh->GetDoc();
 OSL_ENSURE(pFieldmark->IsExpanded(),
 "where is the otherpos?");
 if (pFieldmark->IsExpanded())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSOC / VLC status & next steps ...

2013-08-25 Thread Minh Ngo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi guys,

I have changed some code to load libraries symbols only once and have
wrote some stuff to detect VLC on Windows platforms [1]. Could anybody
check it for successful compiling on Windows? Thanks.

All the best,

Minh


[1] https://gerrit.libreoffice.org/#/c/5627/

Minh Ngo | 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSGklDAAoJEGV0m6dA97mc/hkH/1eT8dZ+p8dbmVH/Mgr/Nct4
HarC0pS8TOkheChDplB6IVqFelRZzVfeewopa7USyt3mx/YFYkxACPJx8mHb+9oH
qSCQ/hh9o4bNx+WRXmEjzdC1Tg4/yXVSPSuK3yCo/VWw3hvyvD4XHJQpy/HJR2rR
VjvXp7ChBCWR2k3fEWn//fSkvkgC0EgtmCdX/gdoIMQzW62QUdstZ7ztR1Tlcq1b
hLP8XrON+fe5mLs1dxQev8oYViJTzOlLjukUSzjcIxY2DuKCK9ehEyhuLrDEHSPe
93XGbVngf0PnvfUcGWfeKNFH9O1/PkdNvDSFo2T/Nu4Qd4KL/Uox1GtbmJTbX0k=
=JIFd
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: fpicker/source sal/osl

2013-08-25 Thread Tor Lillqvist
 fpicker/source/aqua/SalAquaFilePicker.mm |6 ++
 sal/osl/unx/uunxapi.cxx  |   27 +++
 2 files changed, 33 insertions(+)

New commits:
commit 0aeba08d3e0ee611883fc5d415b0c87319ca31e8
Author: Tor Lillqvist 
Date:   Sun Aug 25 20:51:41 2013 +0300

Fix "Save As" when sandboxed on OS X

Change-Id: Ibe2ea21265a0bb9c4fedcef137626df2a8019116

diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm 
b/fpicker/source/aqua/SalAquaFilePicker.mm
index ffa9c9c..fbae6e4 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -340,6 +340,12 @@ uno::Sequence SAL_CALL 
SalAquaFilePicker::getFiles() throw( uno::
 if (userDefaults != NULL &&
 [url 
respondsToSelector:@selector(bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:)])
 {
+// In the case of "Save As" when the user has input a new
+// file name, this call will return nil, as bookmarks can
+// (naturally) only be created for existing file system
+// objects. In that case, code at a much lower level, in
+// sal, takes care of creating a bookmark when a new file
+// has been created outside the sandbox.
 NSData *data = [url 
bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope
  includingResourceValuesForKeys:nil
   relativeToURL:nil
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 7eb2ed9..3052538 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -262,6 +262,33 @@ int open_c(const char *cpPath, int oflag, int mode)
 
 int result = open(cpPath, oflag, mode);
 
+#if defined(MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && 
HAVE_FEATURE_MACOSX_SANDBOX
+if (result != -1 && (oflag & O_CREAT) && (oflag & O_EXCL))
+{
+// A new file was created. Check if it is outside the sandbox.
+// (In that case it must be one the user selected as export or
+// save destination in a file dialog, otherwise we wouldn't
+// have been able to crete it.) Create and store a security
+// scoped bookmark for it so that we can access the file in
+// the future, too. (For the "Recent Files" functionality.)
+const char *sandbox = [NSHomeDirectory() UTF8String];
+if (!(memcmp(sandbox, cpPath, strlen(sandbox)) == 0 &&
+  cpPath[strlen(sandbox)] == '/'))
+{
+NSURL *url = [NSURL fileURLWithPath:[NSString 
stringWithUTF8String:cpPath]];
+NSData *data = [url 
bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope
+ includingResourceValuesForKeys:nil
+  relativeToURL:nil
+  error:nil];
+if (data != NULL)
+{
+[userDefaults setObject:data
+ forKey:[@"bookmarkFor:" 
stringByAppendingString:[url absoluteString]]];
+}
+}
+}
+#endif
+
 done_accessing_file_path(cpPath, state);
 
 return result;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Makefile.in

2013-08-25 Thread Tor Lillqvist
 Makefile.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c89d6bcdb44cb06f7bbd907d191dfbe18cfb0cc5
Author: Tor Lillqvist 
Date:   Sun Aug 25 21:29:40 2013 +0300

Don't sign the Current symlink in a framework

Change-Id: I14106827d86f798687cdeb560c0df007070469ee

diff --git a/Makefile.in b/Makefile.in
index 260b974..16f18b8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -306,7 +306,7 @@ ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 #
for framework in `find $(DEVINSTALLDIR)/opt/LibreOffice.app -name 
'*.framework' -type d`; do \
 for version in $$framework/Versions/*; do \
-test -d $$version && codesign --force --verbose 
--prefix=$(MACOSX_BUNDLE_IDENTIFIER). --sign $(MACOSX_CODESIGNING_IDENTITY) 
$$version; \
+if test ! -L $$version -a -d $$version; then codesign --force 
--verbose --prefix=$(MACOSX_BUNDLE_IDENTIFIER). --sign 
$(MACOSX_CODESIGNING_IDENTITY) $$version; fi; \
 done; \
 done
 #
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH] fdo#68346 Expose font name to Accessibility bridge

2013-08-25 Thread Niklas Johansson
I did some testing with some swing classes and they seem to expose the 
font name as the text attribute called fontfamily. This patch makes 
LibreOffice do the same. A quick test with JavaMonkey shows that it 
works. There are still some issues with other text attributes, such as 
indents being reported as zero regardless of the actual indentation. I 
probably won't have time to look into that in the near feature but if it 
is still an issue I hope I'll get more time to look into it later this 
fall.


Regards,
Niklas Johansson

Niklas Johansson skrev 2013-08-22 21:01:

Hi

At the moment the text attribute Font family is exposed as Monospaced 
or Porportional. I've looked at some java examples (example programs) 
and seen that they seem to expose the font name as the text attribute 
font family. Does anybody know if it is correct to expose the font 
name here. It feels a lot more informative to get the font name then 
knowing if the font is mono spaced or proportional.


I've been able to build a version that exposes the font name. But I 
wanted to hear if somebody knows if it is correct/incorrect before I 
prepare the patch.






0001-fdo-68346-Accessibility-bridge-should-exspose-the-fo.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: 6 commits - editeng/source sc/inc sc/source

2013-08-25 Thread Kohei Yoshida
 editeng/source/editeng/editobj.cxx  |   40 ++
 sc/inc/editutil.hxx |3 
 sc/inc/formulacell.hxx  |1 
 sc/source/core/data/formulacell.cxx |5 
 sc/source/core/tool/editutil.cxx|  168 +-
 sc/source/filter/xml/xmlexprt.cxx   |  227 +---
 sc/source/filter/xml/xmlexprt.hxx   |6 
 7 files changed, 329 insertions(+), 121 deletions(-)

New commits:
commit fd4d8cee4b8c3bc7ec50d30c25090bfe61fd8037
Author: Kohei Yoshida 
Date:   Sun Aug 25 14:42:37 2013 -0400

Now we don't need to increment progress bar on every edit cell.

Change-Id: Id5d460c134c6683a4e876856575ce269a43ea66f

diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 42cac6d..980b025 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3340,18 +3340,14 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 
nEqualCellCount)
 WriteAnnotation(aCell);
 WriteDetective(aCell);
 
-bool bEditCell = false;
-
 if (!bIsEmpty)
 {
 if (aCell.nType == table::CellContentType_TEXT && 
aCell.maBaseCell.meType == CELLTYPE_EDIT)
 {
-bEditCell = true;
 WriteEditCell(aCell.maBaseCell.mpEditText);
 }
 else if (aCell.nType == table::CellContentType_FORMULA && 
IsMultiLineFormulaCell(aCell))
 {
-bEditCell = true;
 WriteMultiLineFormulaResult(aCell.maBaseCell.mpFormula);
 }
 else
@@ -3364,7 +3360,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 
nEqualCellCount)
 }
 WriteShapes(aCell);
 if (!bIsEmpty)
-IncrementProgressBar(bEditCell);
+IncrementProgressBar(false);
 }
 
 void ScXMLExport::WriteEditCell(const EditTextObject* pText)
@@ -5006,10 +5002,10 @@ void ScXMLExport::CollectUserDefinedNamespaces(const 
SfxItemPool* pPool, sal_uIn
 XML_NAMESPACE_PRESENTATION );
 }
 
-void ScXMLExport::IncrementProgressBar(bool bEditCell, sal_Int32 nInc)
+void ScXMLExport::IncrementProgressBar(bool bFlush, sal_Int32 nInc)
 {
 nProgressCount += nInc;
-if (bEditCell || nProgressCount > 100)
+if (bFlush || nProgressCount > 100)
 {
 GetProgressBarHelper()->Increment(nProgressCount);
 nProgressCount = 0;
diff --git a/sc/source/filter/xml/xmlexprt.hxx 
b/sc/source/filter/xml/xmlexprt.hxx
index 4276e8e..a3b9905 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -220,7 +220,7 @@ class ScXMLExport : public SvXMLExport
 const com::sun::star::uno::Reference< 
com::sun::star::beans::XPropertySet >& xRowProperties,
 const OUString* pOldName, sal_Int32& rIndex );
 
-void IncrementProgressBar(bool bEditCell, sal_Int32 nInc = 1);
+void IncrementProgressBar(bool bFlush, sal_Int32 nInc = 1);
 
 void CopySourceStream( sal_Int32 nStartOffset, sal_Int32 nEndOffset, 
sal_Int32& rNewStart, sal_Int32& rNewEnd );
 
commit d5d96b15551fb685a99a4ee4217a152e00bc0dbf
Author: Kohei Yoshida 
Date:   Sun Aug 25 14:38:30 2013 -0400

fdo#60740: Export multi-line formula results to ods without UNO API.

Change-Id: I69391a9d2ffb0afae7f40c8449196c986375db3f

diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 985aebe..c8a7414 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -310,6 +310,7 @@ public:
 void SetResultToken( const formula::FormulaToken* pToken );
 
 double GetResultDouble() const;
+OUString GetResultString() const;
 
 voidSetErrCode( sal_uInt16 n );
 bool IsHyperLinkCell() const;
diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index a7491a2..32238cd 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1705,6 +1705,11 @@ double ScFormulaCell::GetResultDouble() const
 return aResult.GetDouble();
 }
 
+OUString ScFormulaCell::GetResultString() const
+{
+return aResult.GetString();
+}
+
 void ScFormulaCell::SetResultMatrix( SCCOL nCols, SCROW nRows, const 
ScConstMatrixRef& pMat, formula::FormulaToken* pUL )
 {
 aResult.SetMatrix(nCols, nRows, pMat, pUL);
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 10da5ff..42cac6d 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3352,9 +3352,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 
nEqualCellCount)
 else if (aCell.nType == table::CellContentType_FORMULA && 
IsMultiLineFormulaCell(aCell))
 {
 bEditCell = true;
-uno::Reference 
xText(xCurrentTableCellRange->getCellByPosition(aCell.aCellAddress.Column, 
aCell.aCellAddress.Row), uno::UNO_QUERY);
-if ( xText.is())
-GetTextParagraphExport()->exportText(xText, false, false);
+WriteMultiLineFormulaResult(aCell.maBaseCell.mpFormula);
 

Re: [libreoffice-l10n] Re: [libreoffice-projects] Re: [ANN] LibreOffice 4.0.5 RC2 available

2013-08-25 Thread Martin Srebotnjak
Hi, all,

Slovenian LO team has reported/confirmed two issues with the Ubuntu
packaging of LO already a year ago:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/957589
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1024886

We posted a warning and workaround for those two bugs (in Slovenian):
http://slolibre.blogspot.com/2012/07/slovenski-libo-na-ubuntu.html

Hope this helps someone,
m.

2013/8/25 Tom Davies :
> Hi :)
> Ubuntu users can use the same resources as everyone else to get the full 
> range of localisations.
>
>
> Their PPA's are an additional resource but Ubuntu Users (such as me) could go 
> to the main LibreOffice website (as i do) to get all the latest stuff.
>
>
> I think there are even instructions somewhere although when i just had a 
> quick look they weren't as obvious as i had hoped.  Apparently most 
> instructions still sy to install the "desktop integration" packages 
> afterwards but those have now been cleverly pulled into the main install so 
> you don't have to do that 2nd part anymore.  It's just the help packages to 
> get the in-built help and maybe the appropriate language pack.
>
>
> So, don't worry too much about the PPAs but if reasonably possible please get 
> them to signpost people to the official LibreOffice website.
>
> Regards from
> Tom :)
>
>
>
>
>
> 
>  From: Mihkel Tõnnov 
> To: LibreOffice ; libreoffice-l10n 
> ; proje...@global.libreoffice.org; 
> libreoffice...@lists.freedesktop.org; bjoern.michael...@canonical.com
> Sent: Friday, 23 August 2013, 12:49
> Subject: [libreoffice-l10n] Re: [libreoffice-projects] Re: [ANN] LibreOffice 
> 4.0.5 RC2 available
>
>
> 2013/8/23 bjoern 
>
>> On Mon, Aug 19, 2013 at 05:02:01PM +0200, Thorsten Behrens wrote:
>> > The release is available for Windows, Linux and Mac OS X from our QA
>> > builds download page at
>> >
>> >  http://www.libreoffice.org/download/pre-releases/
>>
>> and users of Ubuntu 13.04 (raring) find a build in the LibreOffice 4.0
>> ppa at:
>>
>>
>> https://launchpad.net/~libreoffice/+archive/libreoffice-4-0?field.series_filter=raring
>>
>>
> Hi all,
>
> Is there any reason why these PPAs only contain localisations into a select
> few locales?
>
> Best regards,
> Mihkel
>
> --
> To unsubscribe e-mail to: l10n+unsubscr...@global.libreoffice.org
> Problems? 
> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/l10n/
> All messages sent to this list will be publicly archived and cannot be deleted
> --
> To unsubscribe e-mail to: l10n+unsubscr...@global.libreoffice.org
> Problems? 
> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/l10n/
> All messages sent to this list will be publicly archived and cannot be deleted
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fdo#39468 German comments for svx/source/tbxctrls/linectrl.cxx

2013-08-25 Thread Laurent BP
Hello,

Here is a patch to translate German comments on the file I'm working on.
0001-fdo-39468-translate-German-comments.patch

  

Laurent BP



-
LibreOffice 4.1.1.2
--
View this message in context: 
http://nabble.documentfoundation.org/PATCH-fdo-39468-German-comments-for-svx-source-tbxctrls-linectrl-cxx-tp4071563.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: 2 commits - sc/source

2013-08-25 Thread Kohei Yoshida
 sc/source/filter/xml/XMLExportIterator.cxx |   11 +++
 sc/source/filter/xml/XMLExportIterator.hxx |1 -
 sc/source/filter/xml/xmlexprt.cxx  |   12 ++--
 sc/source/filter/xml/xmlexprt.hxx  |3 +--
 4 files changed, 6 insertions(+), 21 deletions(-)

New commits:
commit 8f465e27063a04037f555afa40c17eee1a7ccdd5
Author: Kohei Yoshida 
Date:   Sun Aug 25 16:11:52 2013 -0400

A little more cleanup.

Change-Id: I4cf9e6dfd4a6b9202b864693ec5861f1bae0f773

diff --git a/sc/source/filter/xml/XMLExportIterator.cxx 
b/sc/source/filter/xml/XMLExportIterator.cxx
index 1a14daf..df6c2f0 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -701,8 +701,7 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& 
rMyCell, table::CellAddre
 
 ScAddress aScAddress;
 ScUnoConversion::FillScAddress( aScAddress, rMyCell.aCellAddress );
-CellType eCalcType = rExport.GetDocument()->GetCellType( aScAddress );
-switch (eCalcType)
+switch (rMyCell.maBaseCell.meType)
 {
 case CELLTYPE_VALUE:
 rMyCell.nType = table::CellContentType_VALUE;
@@ -718,7 +717,7 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& 
rMyCell, table::CellAddre
 rMyCell.nType = table::CellContentType_EMPTY;
 }
 
-if (rMyCell.nType == table::CellContentType_FORMULA)
+if (rMyCell.maBaseCell.meType == CELLTYPE_FORMULA)
 if( rExport.IsMatrix( aScAddress, rMyCell.aMatrixRange, bIsMatrixBase 
) )
 {
 rMyCell.bIsMatrixBase = bIsMatrixBase;
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 980b025..b083d4f 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3342,11 +3342,11 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 
nEqualCellCount)
 
 if (!bIsEmpty)
 {
-if (aCell.nType == table::CellContentType_TEXT && 
aCell.maBaseCell.meType == CELLTYPE_EDIT)
+if (aCell.maBaseCell.meType == CELLTYPE_EDIT)
 {
 WriteEditCell(aCell.maBaseCell.mpEditText);
 }
-else if (aCell.nType == table::CellContentType_FORMULA && 
IsMultiLineFormulaCell(aCell))
+else if (aCell.maBaseCell.meType == CELLTYPE_FORMULA && 
aCell.maBaseCell.mpFormula->IsMultilineResult())
 {
 WriteMultiLineFormulaResult(aCell.maBaseCell.mpFormula);
 }
@@ -3798,14 +3798,6 @@ bool ScXMLExport::IsEditCell(ScMyCell& rCell) const
 return rCell.maBaseCell.meType == CELLTYPE_EDIT;
 }
 
-bool ScXMLExport::IsMultiLineFormulaCell(ScMyCell& rCell) const
-{
-if (rCell.maBaseCell.meType != CELLTYPE_FORMULA)
-return false;
-
-return rCell.maBaseCell.mpFormula->IsMultilineResult();
-}
-
 bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
 {
 ScAddress aCellPos1;
diff --git a/sc/source/filter/xml/xmlexprt.hxx 
b/sc/source/filter/xml/xmlexprt.hxx
index a3b9905..6c93827 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -192,8 +192,7 @@ class ScXMLExport : public SvXMLExport
 
 bool IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& aCell2) 
const;
 bool IsEditCell(ScMyCell& rCell) const;
-bool IsMultiLineFormulaCell(ScMyCell& rCell) const;
-bool IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2);
+bool IsCellEqual(ScMyCell& aCell1, ScMyCell& aCell2);
 
 void WriteCalculationSettings(const com::sun::star::uno::Reference 
& xSpreadDoc);
 void WriteTableSource();
commit 2be411acef8bd7ef02ddfbaeb6543fb876934112
Author: Kohei Yoshida 
Date:   Sun Aug 25 15:58:03 2013 -0400

Combine SetMatrixCellData() with SetCellData().

Change-Id: I170eca29a36e2d2db2f91bd588e912d7d56b4d4d

diff --git a/sc/source/filter/xml/XMLExportIterator.cxx 
b/sc/source/filter/xml/XMLExportIterator.cxx
index 2cf4325..1a14daf 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -693,14 +693,11 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& 
rMyCell, table::CellAddre
 if (mpCell)
 rMyCell.maBaseCell = *mpCell;
 }
-}
 
-void ScMyNotEmptyCellsIterator::SetMatrixCellData( ScMyCell& rMyCell )
-{
 rMyCell.bIsMatrixCovered = false;
 rMyCell.bIsMatrixBase = false;
 
-bool bIsMatrixBase(false);
+bool bIsMatrixBase = false;
 
 ScAddress aScAddress;
 ScUnoConversion::FillScAddress( aScAddress, rMyCell.aCellAddress );
@@ -879,7 +876,6 @@ bool ScMyNotEmptyCellsIterator::GetNext(ScMyCell& aCell, 
ScFormatRangeStyles* pC
 pDetectiveOp->SetCellData( aCell );
 
 HasAnnotation( aCell );
-SetMatrixCellData( aCell );
 bool bIsAutoStyle;
 // Ranges before the previous cell are not needed by 
ExportFormatRanges anymore and can be removed
 sal_Int32 nRemoveBeforeRow = aLastAddress.Row;
diff --git a/sc/source/filter/xml/XMLExpo

[Libreoffice-commits] core.git: sc/source

2013-08-25 Thread Kohei Yoshida
 sc/source/core/tool/editutil.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 3c67751cd57ff54da6afa95949a67011eac5d239
Author: Kohei Yoshida 
Date:   Sun Aug 25 16:13:16 2013 -0400

Unused variable.

Change-Id: Ibef6cade989995a61cdc22872a81bc97aeea86aa

diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index c963243..d851def 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -899,7 +899,6 @@ OUString ScFieldEditEngine::CalcFieldValue( const 
SvxFieldItem& rField,
 sal_Int32 /* nPara */, sal_uInt16 /* nPos 
*/,
 Color*& rTxtColor, Color*& /* rFldColor */ 
)
 {
-OUString aRet;
 const SvxFieldData* pFieldData = rField.GetField();
 
 if (!pFieldData)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSOC] Implementing Table Styles - Status update

2013-08-25 Thread Alex Ivan
Hello everybody,

Here's the progress I've made during the past couple of weeks:
- fixed undo after resizing the table causing loss of table style
- adapted inserting/deleting rows/columns and respective undos
operation so that the properties are correctly updated
- submitted a beginning of a fix for fdo#59048, which avoids the
crash but might cause a memory leak, so someone should take a
look at that [1]. Initially, I thought the bug was a regression I
introduced, and it took a while to figure out.
- tried some more to get the borders and text properties to update
properly, but have not had much luck
- had a go at applying the table style on a copy-pasted table, but
I might be doing it wrong.

Plans for this week:
- Getting the copy-pasting to work (currently, I seem to have
succeeded in applying the style to the table in the clipboard, not
on the one which is actually inserted in the document).
- Try to make the borders and text properties work, although
i'll probably leave this for last, since I've spent a considerable
amount of time on it and haven't got much done.
- Adapt merging of tables and cells and undos to take the table
styles into consideration.
- Take a look at how the filters work in order to start working
on them.

[1] http://gerrit.libreoffice.org/#/c/5547/
  

Cheers,
Alex



--
View this message in context: 
http://nabble.documentfoundation.org/GSOC-Implementing-Table-Styles-Status-update-tp4071572.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 65675] LibreOffice 4.2 most annoying bugs

2013-08-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65675

--- Comment #9 from ape  ---
Nominate bug 68512 "Open button and File Open stopped working" and bug 68552
"[FILEOPEN] XML filter: Excel-2007 XML file don't open", because these are a
regression into the Master release:

a) bug 68512 – between 21st (ID:e8c0708ee9d0c01cbe0bdcb38ac14e34bdceef32,
TinderBox: Win-x86@6-debug, Branch: master, Time: 2013-08-21_20:26:24) and 23rd
(ID:45ef1eda9e8851d454237d91b7fc46299fd621eb, TinderBox: Win-x86@6-debug,
Branch: master, Time: 2013-08-23_07:32:04) August;

b) bug 68552 – between 13rd (ID:73c02c20b19702dbe662fe0d80601049f015d8ac,
TinderBox: Win-x86@6-debug, Branch: master, Time: 2013-08-13_21:26:14) and 21st
(ID:e8c0708ee9d0c01cbe0bdcb38ac14e34bdceef32, TinderBox: Win-x86@6-debug,
Branch: master, Time: 2013-08-21_20:26:24) August.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: GSOC / VLC status & next steps ...

2013-08-25 Thread Tor Lillqvist
>
> Could anybody
> check it for successful compiling on Windows? Thanks.
>
>
It still requires libvlc headers, is that intentional?

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sal/osl

2013-08-25 Thread Tor Lillqvist
 sal/osl/unx/uunxapi.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d06e5adc21f29c8954021a60445a5c0810731d9e
Author: Tor Lillqvist 
Date:   Mon Aug 26 07:41:14 2013 +0300

Be careful not to access a string out of bounds

Change-Id: Ibc43ffa0c535e0baf1bb6d8b213320da345a3d65

diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 3052538..866cef2 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -272,7 +272,8 @@ int open_c(const char *cpPath, int oflag, int mode)
 // scoped bookmark for it so that we can access the file in
 // the future, too. (For the "Recent Files" functionality.)
 const char *sandbox = [NSHomeDirectory() UTF8String];
-if (!(memcmp(sandbox, cpPath, strlen(sandbox)) == 0 &&
+if (!(strlen(cpPath) > strlen(sandbox) &&
+  memcmp(sandbox, cpPath, strlen(sandbox)) == 0 &&
   cpPath[strlen(sandbox)] == '/'))
 {
 NSURL *url = [NSURL fileURLWithPath:[NSString 
stringWithUTF8String:cpPath]];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


LibreOffice Gerrit News 2013-08-26

2013-08-25 Thread gerrit
Moin!

* Open changes on master for project core changed in the last 25 hours:

+ Cross-platform libvlc loading.
  in https://gerrit.libreoffice.org/5627 from Minh Ngo
+ fdo#60924 autoinstall - gbuild/scp2: Move more libs to OOO
  in https://gerrit.libreoffice.org/5631 from Marcos Souza
+ Fix iterator management
  in https://gerrit.libreoffice.org/5629 from Julien Nabet
+ Simplify iterator management (part2)
  in https://gerrit.libreoffice.org/5628 from Julien Nabet
+ String to OUString, some cleanup
  in https://gerrit.libreoffice.org/5608 from Matteo Casalin
+ fix for text watermark
  in https://gerrit.libreoffice.org/5568 from Adam CloudOn


* Merged changes on master for project core changed in the last 25 hours:

+ fdo#57950: Remove some chained appends in sw
  in https://gerrit.libreoffice.org/5602 from Jelle van der Waa
+ String to OUString
  in https://gerrit.libreoffice.org/5626 from Matteo Casalin
+ Use support function for name of services
  in https://gerrit.libreoffice.org/5624 from Matteo Casalin
+ vector to vector as a temporary
  in https://gerrit.libreoffice.org/5623 from Matteo Casalin
+ String to OUString and some cleanup
  in https://gerrit.libreoffice.org/5618 from Matteo Casalin
+ String to OUString and hide implementation details
  in https://gerrit.libreoffice.org/5617 from Matteo Casalin
+ String to OUString + missing SetText
  in https://gerrit.libreoffice.org/5616 from Matteo Casalin
+ SwGlTreeListBox: NotifyCoping and NotifyMoving almost equal
  in https://gerrit.libreoffice.org/5615 from Matteo Casalin
+ Reduce getToken load by using nIndex
  in https://gerrit.libreoffice.org/5614 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5613 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5612 from Matteo Casalin
+ Improve description
  in https://gerrit.libreoffice.org/5611 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5610 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5609 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5625 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5620 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5622 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5621 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5619 from Matteo Casalin
+ String to OUString
  in https://gerrit.libreoffice.org/5607 from Matteo Casalin


* Abandoned changes on master for project core changed in the last 25 hours:

None

* Open changes needing tweaks, but being untouched for more than a week:

+ fdo#64817 : fix for rectangle with image fill
  in https://gerrit.libreoffice.org/4718 from Adam CloudOn
+ fdo#66577: non-fractional widths with Core Text
  in https://gerrit.libreoffice.org/5023 from Khaled Hosny
+ more debug logs, extra debug layer, file is not used in p3k
  in https://gerrit.libreoffice.org/5267 from James Michael Dupont
+ fdo#67104: Default value of 'Show cell grid lines' checkbox on sidebar
  in https://gerrit.libreoffice.org/5260 from Prashant Pandey
+ fdo#66401: fix for combined characters
  in https://gerrit.libreoffice.org/5018 from Adam CloudOn
+ Icons & Texts per toolbar in 'Customize' Toolbars
  in https://gerrit.libreoffice.org/5125 from Prashant Pandey
+ Math Embedded Fonts: Added Font tab to document...
  in https://gerrit.libreoffice.org/4931 from Marcos Souza
+  fdo#66279 - MathML export: use the operator dictionary
  in https://gerrit.libreoffice.org/4671 from Frédéric Wang
+ fdo#36791 : fix for import of greeting card
  in https://gerrit.libreoffice.org/4240 from Adam CloudOn
+ Remove old outdated gallery images and sounds
  in https://gerrit.libreoffice.org/4993 from Samuel Mehrbrodt


Best,

Your friendly LibreOffice Gerrit Digest Mailer

Note: The bot generating this message can be found and improved here:
   
https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=gerritbot/send-daily-digest
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sal/osl

2013-08-25 Thread Tor Lillqvist
 sal/osl/unx/uunxapi.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 847d60c4525a81c1c299e3b318c0552b2616f49b
Author: Tor Lillqvist 
Date:   Mon Aug 26 09:03:17 2013 +0300

Use strncmp()

Change-Id: I593ce24ce83cd3034d23297adc3de5f6de18f3a9

diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 866cef2..316f75a 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -272,8 +272,7 @@ int open_c(const char *cpPath, int oflag, int mode)
 // scoped bookmark for it so that we can access the file in
 // the future, too. (For the "Recent Files" functionality.)
 const char *sandbox = [NSHomeDirectory() UTF8String];
-if (!(strlen(cpPath) > strlen(sandbox) &&
-  memcmp(sandbox, cpPath, strlen(sandbox)) == 0 &&
+if (!(strncmp(sandbox, cpPath, strlen(sandbox)) == 0 &&
   cpPath[strlen(sandbox)] == '/'))
 {
 NSURL *url = [NSURL fileURLWithPath:[NSString 
stringWithUTF8String:cpPath]];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/source scp2/source

2013-08-25 Thread Stephan Bergmann
 desktop/source/app/langselect.cxx |   70 --
 scp2/source/ooo/common_brand.scp  |   14 ---
 2 files changed, 84 deletions(-)

New commits:
commit 3162d9d430a32c0d51f3d1f0cac3e22f66ae43f2
Author: Stephan Bergmann 
Date:   Sat Aug 24 17:28:55 2013 +0200

Remove unused STARTLANG feature

Change-Id: Ib33f2ba2541faad24779cfdfbff7cf7f8a960af2

diff --git a/desktop/source/app/langselect.cxx 
b/desktop/source/app/langselect.cxx
index d701ee4..5fc4bc2 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -24,10 +24,6 @@
 #include 
 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -41,8 +37,6 @@
 #include 
 #include "com/sun/star/util/XFlushable.hpp"
 #include 
-#include 
-#include 
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
@@ -53,48 +47,10 @@ using namespace com::sun::star::util;
 
 namespace desktop {
 
-static char const SOFFICE_BOOTSTRAP[] = "Bootstrap";
-static char const SOFFICE_STARTLANG[] = "STARTLANG";
-
 sal_Bool LanguageSelection::bFoundLanguage = sal_False;
 OUString LanguageSelection::aFoundLanguage;
 LanguageSelection::LanguageSelectionStatus LanguageSelection::m_eStatus = 
LS_STATUS_OK;
 
-static sal_Bool existsURL( OUString const& sURL )
-{
-using namespace osl;
-DirectoryItem aDirItem;
-
-if (!sURL.isEmpty())
-return ( DirectoryItem::get( sURL, aDirItem ) == DirectoryItem::E_None 
);
-
-return sal_False;
-}
-
-// locate soffice.ini/.rc file
-static OUString locateSofficeIniFile()
-{
-OUString aUserDataPath;
-OUString aSofficeIniFileURL;
-
-// Retrieve the default file URL for the soffice.ini/rc
-rtl::Bootstrap().getIniName( aSofficeIniFileURL );
-
-if ( utl::Bootstrap::locateUserData( aUserDataPath ) == 
utl::Bootstrap::PATH_EXISTS )
-{
-sal_Int32 nIndex = aSofficeIniFileURL.lastIndexOf( '/');
-if ( nIndex > 0 )
-{
-OUString aUserSofficeIniFileURL = aUserDataPath + "/config" + 
aSofficeIniFileURL.copy( nIndex );
-
-if ( existsURL( aUserSofficeIniFileURL ))
-return aUserSofficeIniFileURL;
-}
-}
-// Fallback try to use the soffice.ini/rc from program folder
-return aSofficeIniFileURL;
-}
-
 bool LanguageSelection::prepareLanguage()
 {
 m_eStatus = LS_STATUS_OK;
@@ -136,7 +92,6 @@ bool LanguageSelection::prepareLanguage()
 
 // get the selected UI language as string
 bool bCmdLanguage( false );
-bool bIniLanguage( false );
 OUString aLocaleString = getUserUILanguage();
 
 if ( aLocaleString.isEmpty() )
@@ -153,23 +108,6 @@ bool LanguageSelection::prepareLanguage()
 }
 else
 aLocaleString = aEmpty;
-
-if ( !bCmdLanguage )
-{
-OUString aSOfficeIniURL = locateSofficeIniFile();
-Config aConfig(aSOfficeIniURL);
-aConfig.SetGroup( SOFFICE_BOOTSTRAP );
-OString sLang = aConfig.ReadKey( SOFFICE_STARTLANG );
-aLocaleString = OUString( sLang.getStr(), sLang.getLength(), 
RTL_TEXTENCODING_ASCII_US );
-if (isInstalledLanguage(aLocaleString, sal_False))
-{
-bIniLanguage   = true;
-bFoundLanguage = true;
-aFoundLanguage = aLocaleString;
-}
-else
-aLocaleString = aEmpty;
-}
 }
 
 // user further fallbacks for the UI language
@@ -194,14 +132,6 @@ bool LanguageSelection::prepareLanguage()
 Reference< XChangesBatch >(xProp, 
UNO_QUERY_THROW)->commitChanges();
 }
 
-if ( bIniLanguage )
-{
-// Store language only
-Reference< XPropertySet > 
xProp2(getConfigAccess("org.openoffice.Office.Linguistic/General/", sal_True), 
UNO_QUERY_THROW);
-xProp2->setPropertyValue("UILocale", makeAny(aLocaleString));
-Reference< XChangesBatch >(xProp2, 
UNO_QUERY_THROW)->commitChanges();
-}
-
 MsLangId::setConfiguredSystemUILanguage( 
aUILanguageTag.getLanguageType( false) );
 
 OUString sLocale;
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 665b8bf..3dedd0b 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -939,20 +939,6 @@ ProfileItem gid_Brand_Profileitem_Soffice_Hideeula
 Value = "1";
 End
 
-#ifdef WNT
-ProfileItem gid_Brand_Profileitem_Soffice_Startlang
-ProfileID = gid_Brand_Profile_Soffice_Ini;
-ModuleID = gid_Module_Root_Brand;
-Section = "Bootstrap";
-Order = 8;
-Key = "STARTLANG";
-Value = "[STARTLANG]";
-Inifiletablekey = "STARTLANG";
-Inifiletableaction = "1";
-Styles = (INIFILETABLE);
-End
-#endif
-
 ProfileItem gid_Brand_Profileitem_Version_Buildid
 ProfileID = gid_Brand_Profile_Version_Ini;
 Module