[Libreoffice-commits] core.git: 9 commits - connectivity/source filter/source fpicker/source sd/inc sd/source sd/uiconfig sd/UIConfig_sdraw.mk svtools/source sw/source tools/inc tools/source

Caolán McNamara caolanm at redhat.com
Wed Nov 13 05:51:06 PST 2013


 connectivity/source/drivers/file/FStatement.cxx  |    8 +-
 connectivity/source/drivers/flat/ETable.cxx      |    8 +-
 connectivity/source/drivers/mork/MResultSet.hxx  |    1 
 connectivity/source/drivers/mozab/MResultSet.hxx |    1 
 connectivity/source/inc/file/FStatement.hxx      |    2 
 filter/source/msfilter/escherex.cxx              |    3 
 filter/source/msfilter/svdfppt.cxx               |    7 -
 fpicker/source/office/iodlg.hxx                  |    4 -
 sd/UIConfig_sdraw.mk                             |    1 
 sd/inc/helpids.h                                 |    2 
 sd/source/filter/html/pubdlg.cxx                 |   25 ++----
 sd/source/filter/html/pubdlg.src                 |   38 ---------
 sd/source/ui/inc/pubdlg.hrc                      |    7 -
 sd/uiconfig/sdraw/ui/namedesign.ui               |   89 +++++++++++++++++++++++
 svtools/source/control/scriptedtext.cxx          |   12 +--
 svtools/source/svhtml/parhtml.cxx                |   14 +--
 sw/source/ui/lingu/hhcwrp.cxx                    |   30 +++----
 tools/inc/impstrg.hxx                            |   31 --------
 tools/source/inet/inetmime.cxx                   |    7 -
 19 files changed, 147 insertions(+), 143 deletions(-)

New commits:
commit 4d585e6fcd379dc699ec9bcd6d96291453ecbf34
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 11:31:33 2013 +0000

    longparas: STRING_NOTFOUND->-1
    
    Change-Id: I596b0bbe32b9f4017e58cedb6802d82b55454d16

diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 28e159a..7a0c070 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -238,18 +238,18 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText,
     {
         // remember cursor start position for later setting of the cursor
         const SwPosition *pStart = pCrsr->Start();
-        const xub_StrLen nStartIndex = pStart->nContent.GetIndex();
+        const sal_Int32 nStartIndex = pStart->nContent.GetIndex();
         const SwNodeIndex aStartNodeIndex  = pStart->nNode;
         SwTxtNode *pStartTxtNode = aStartNodeIndex.GetNode().GetTxtNode();
 
         const sal_Int32  nIndices = pOffsets->getLength();
         const sal_Int32 *pIndices = pOffsets->getConstArray();
         sal_Int32 nConvTextLen = rNewText.getLength();
-        xub_StrLen nPos = 0;
-        xub_StrLen nChgPos = STRING_NOTFOUND;
-        xub_StrLen nChgLen = 0;
-        xub_StrLen nConvChgPos = STRING_NOTFOUND;
-        xub_StrLen nConvChgLen = 0;
+        sal_Int32 nPos = 0;
+        sal_Int32 nChgPos = -1;
+        sal_Int32 nChgLen = 0;
+        sal_Int32 nConvChgPos = -1;
+        sal_Int32 nConvChgLen = 0;
 
         // offset to calculate the position in the text taking into
         // account that text may have been replaced with new text of
@@ -263,20 +263,20 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText,
         while (true)
         {
             // get index in original text that matches nPos in new text
-            xub_StrLen nIndex;
+            sal_Int32 nIndex;
             if (nPos < nConvTextLen)
-                nIndex = (sal_Int32) nPos < nIndices ? (xub_StrLen) pIndices[nPos] : nPos;
+                nIndex = nPos < nIndices ? pIndices[nPos] : nPos;
             else
             {
                 nPos   = nConvTextLen;
-                nIndex = static_cast< xub_StrLen >( rOrigText.getLength() );
+                nIndex = rOrigText.getLength();
             }
 
             if (rOrigText[nIndex] == rNewText[nPos] ||
                 nPos == nConvTextLen /* end of string also terminates non-matching char sequence */)
             {
                 // substring that needs to be replaced found?
-                if (nChgPos != STRING_NOTFOUND && nConvChgPos != STRING_NOTFOUND)
+                if (nChgPos != -1 && nConvChgPos != -1)
                 {
                     nChgLen = nIndex - nChgPos;
                     nConvChgLen = nPos - nConvChgPos;
@@ -286,7 +286,7 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText,
                     OUString aInNew( rNewText.copy( nConvChgPos, nConvChgLen ) );
 
                     // set selection to sub string to be replaced in original text
-                    xub_StrLen nChgInNodeStartIndex = static_cast< xub_StrLen >( nStartIndex + nCorrectionOffset + nChgPos );
+                    sal_Int32 nChgInNodeStartIndex = nStartIndex + nCorrectionOffset + nChgPos;
                     OSL_ENSURE( m_rWrtShell.GetCrsr()->HasMark(), "cursor misplaced (nothing selected)" );
                     m_rWrtShell.GetCrsr()->GetMark()->nContent.Assign( pStartTxtNode, nChgInNodeStartIndex );
                     m_rWrtShell.GetCrsr()->GetPoint()->nContent.Assign( pStartTxtNode, nChgInNodeStartIndex + nChgLen );
@@ -301,14 +301,14 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText,
 
                     nCorrectionOffset += nConvChgLen - nChgLen;
 
-                    nChgPos = STRING_NOTFOUND;
-                    nConvChgPos = STRING_NOTFOUND;
+                    nChgPos = -1;
+                    nConvChgPos = -1;
                 }
             }
             else
             {
                 // begin of non-matching char sequence found ?
-                if (nChgPos == STRING_NOTFOUND && nConvChgPos == STRING_NOTFOUND)
+                if (nChgPos == -1 && nConvChgPos == -1)
                 {
                     nChgPos = nIndex;
                     nConvChgPos = nPos;
@@ -495,7 +495,7 @@ void SwHHCWrapper::ReplaceUnit(
         if (bIsChineseConversion)
         {
             m_rWrtShell.SetMark();
-            m_rWrtShell.GetCrsr()->GetMark()->nContent -= (xub_StrLen) aNewTxt.getLength();
+            m_rWrtShell.GetCrsr()->GetMark()->nContent -= aNewTxt.getLength();
 
             OSL_ENSURE( GetTargetLanguage() == LANGUAGE_CHINESE_SIMPLIFIED || GetTargetLanguage() == LANGUAGE_CHINESE_TRADITIONAL,
                     "SwHHCWrapper::ReplaceUnit : unexpected target language" );
commit 09a1a81dac8e0b3af5f2f1403a77472e24193ad9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 11:27:09 2013 +0000

    remove archaic drop comments referring to STRING_NOTFOUND
    
    Change-Id: Ieb31ca4d3a4dbeae2bc66f9c94b243425805fdb0

diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx
index 2ab027f..8b0516b 100644
--- a/connectivity/source/drivers/mork/MResultSet.hxx
+++ b/connectivity/source/drivers/mork/MResultSet.hxx
@@ -254,7 +254,6 @@ protected:
 
             sal_Bool isCount() const;
 
-            // XXX sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] != STRING_NOTFOUND ;}
             sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty(); }
 
             enum eRowPosition {
diff --git a/connectivity/source/drivers/mozab/MResultSet.hxx b/connectivity/source/drivers/mozab/MResultSet.hxx
index 1a56e0c..bc12d26 100644
--- a/connectivity/source/drivers/mozab/MResultSet.hxx
+++ b/connectivity/source/drivers/mozab/MResultSet.hxx
@@ -254,7 +254,6 @@ protected:
 
             sal_Bool isCount() const;
 
-            // XXX sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] != STRING_NOTFOUND ;}
             sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty(); }
 
             enum eRowPosition {
commit 9881f48337ad1151a9ddf664ba78dd7f747582cf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 10:58:02 2013 +0000

    xub_StrLen->sal_Int32
    
    Change-Id: Ia7b61f28555af5f3bbfa9a8e82d54b9a18de15df

diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index d6edcb7..06575d0 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1365,8 +1365,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedBitmapProperties(
     sal_Int32 nIndex = aBmpUrl.indexOf( aVndUrl, 0 );
     if( nIndex != -1 )
     {
-        // note: += ist not defined for xub_StrLen -> conversion to int and back to xub_StrLen
-        nIndex = nIndex + aVndUrl.getLength();
+        nIndex += aVndUrl.getLength();
         if( aBmpUrl.getLength() > nIndex )
         {
             OString aUniqueId(OUStringToOString(aBmpUrl.copy(nIndex, aBmpUrl.getLength() - nIndex), RTL_TEXTENCODING_UTF8));
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index a8515bb..ade3f1f 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5154,7 +5154,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
             }
             pPtr++;
         }
-        xub_StrLen nLen = sal::static_int_cast< xub_StrLen >( pPtr - pBuf );
+        sal_Int32 nLen = pPtr - pBuf;
         if ( nLen )
             aString = OUString( pBuf, nLen, RTL_TEXTENCODING_MS_1252 );
         delete[] pBuf;
@@ -6704,12 +6704,11 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
                                                     // idea.
                                                     if (nVal == 0)
                                                     {
-                                                        sal_Unicode n;
-                                                        xub_StrLen nLen;
                                                         OUString aStr;
                                                         bool inquote = sal_False;
-                                                        for (nLen = 0, n = 0; nLen < 64; nLen++)
+                                                        for (int nLen = 0; nLen < 64; ++nLen)
                                                         {
+                                                            sal_Unicode n(0);
                                                             rIn >> n;
 
                                                             // Collect quoted characters into aStr
commit 65a831a8b4dc6795c9c3cce4c74ec352d416d176
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 10:55:27 2013 +0000

    xub_StrLen->sal_Int32
    
    Change-Id: If287d83f636c2aa585559299be7039cad6208ae2

diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 80b5995..0126e17 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -268,7 +268,7 @@ public:
     inline void                 SetHasFilename( bool bHasFilename );
     inline const OUString&      GetPath() const;
     inline void                 SetDefaultExt( const OUString& rExt );
-    inline void                 EraseDefaultExt( xub_StrLen _nIndex = 0 );
+    inline void                 EraseDefaultExt( sal_Int32 _nIndex = 0 );
     inline const OUString&      GetDefaultExt() const;
     inline void                 SetOKHdl( const Link& rLink );
     inline const Link&          GetOKHdl() const;
@@ -374,7 +374,7 @@ inline void SvtFileDialog::SetDefaultExt( const OUString& rExt )
     _aDefExt = rExt;
 }
 
-inline void SvtFileDialog::EraseDefaultExt( xub_StrLen _nIndex )
+inline void SvtFileDialog::EraseDefaultExt( sal_Int32 _nIndex )
 {
     _aDefExt = _aDefExt.copy( 0, _nIndex );
 }
commit a556802b52c6d0089cb289de4d41c1cc8409bcac
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 10:51:58 2013 +0000

    xub_StrLen->sal_Int32
    
    Change-Id: I4ee33d8c5c564df62ad65cbcaf0d0cb253129fc8

diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 39a3926..02bfe24 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -616,7 +616,7 @@ void OStatement_Base::GetAssignValues()
         OSL_ENSURE(pInsertAtomCommalist->count() > 0,"OResultSet: pInsertAtomCommalist <= 0");
 
         OSQLParseNode * pRow_Value_Const;
-        xub_StrLen nIndex=0;
+        sal_Int32 nIndex=0;
         for (sal_uInt32 i = 0; i < pInsertAtomCommalist->count(); i++)
         {
             pRow_Value_Const = pInsertAtomCommalist->getChild(i); // row_value_constructor
@@ -626,7 +626,7 @@ void OStatement_Base::GetAssignValues()
                 ParseAssignValues(aColumnNameList,pRow_Value_Const,nIndex++); // only one Columnname allowed per loop
             }
             else if(pRow_Value_Const->isToken())
-                ParseAssignValues(aColumnNameList,pRow_Value_Const,static_cast<xub_StrLen>(i));
+                ParseAssignValues(aColumnNameList,pRow_Value_Const,i);
             else
             {
                 if(pRow_Value_Const->count() == aColumnNameList.size())
@@ -686,10 +686,10 @@ void OStatement_Base::GetAssignValues()
     }
 }
 // -------------------------------------------------------------------------
-void OStatement_Base::ParseAssignValues(const ::std::vector< OUString>& aColumnNameList,OSQLParseNode* pRow_Value_Constructor_Elem,xub_StrLen nIndex)
+void OStatement_Base::ParseAssignValues(const ::std::vector< OUString>& aColumnNameList,OSQLParseNode* pRow_Value_Constructor_Elem, sal_Int32 nIndex)
 {
     SAL_INFO( "connectivity.drivers", "file Ocke.Janssen at sun.com OStatement_Base::ParseAssignValues" );
-    OSL_ENSURE(nIndex <= aColumnNameList.size(),"SdbFileCursor::ParseAssignValues: nIndex > aColumnNameList.GetTokenCount()");
+    OSL_ENSURE(size_t(nIndex) <= aColumnNameList.size(),"SdbFileCursor::ParseAssignValues: nIndex > aColumnNameList.GetTokenCount()");
     OUString aColumnName(aColumnNameList[nIndex]);
     OSL_ENSURE(aColumnName.getLength() > 0,"OResultSet: Column-Name nicht gefunden");
     OSL_ENSURE(pRow_Value_Constructor_Elem != NULL,"OResultSet: pRow_Value_Constructor_Elem darf nicht NULL sein!");
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 6e5f148..f30f467 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -106,7 +106,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
         aHeaderLine = m_aCurrentLine;
     }
     // column count
-    const xub_StrLen nFieldCount = aHeaderLine.GetTokenCount(m_cFieldDelimiter,m_cStringDelimiter);
+    const sal_Int32 nFieldCount = aHeaderLine.GetTokenCount(m_cFieldDelimiter,m_cStringDelimiter);
 
     if(!m_aColumns.is())
         m_aColumns = new OSQLColumns();
@@ -239,9 +239,9 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,
                 else
                 {
                     bNumeric = sal_True;
-                    xub_StrLen nDot = 0;
-                    xub_StrLen nDecimalDelCount = 0;
-                    xub_StrLen nSpaceCount = 0;
+                    sal_Int32 nDot = 0;
+                    sal_Int32 nDecimalDelCount = 0;
+                    sal_Int32 nSpaceCount = 0;
                     for( sal_Int32 j = 0; j < aField2.getLength(); j++ )
                     {
                         const sal_Unicode c = aField2[j];
diff --git a/connectivity/source/inc/file/FStatement.hxx b/connectivity/source/inc/file/FStatement.hxx
index a9483b9..fa7f8d0 100644
--- a/connectivity/source/inc/file/FStatement.hxx
+++ b/connectivity/source/inc/file/FStatement.hxx
@@ -127,7 +127,7 @@ namespace connectivity
                                    sal_Bool bSetNull = sal_False,
                                    sal_uInt32 nParameter=SQL_NO_PARAMETER);
             void ParseAssignValues( const ::std::vector< OUString>& aColumnNameList,
-                                    connectivity::OSQLParseNode* pRow_Value_Constructor_Elem,xub_StrLen nIndex);
+                                    connectivity::OSQLParseNode* pRow_Value_Constructor_Elem, sal_Int32 nIndex);
 
             virtual void parseParamterElem(const OUString& _sColumnName,OSQLParseNode* pRow_Value_Constructor_Elem);
             // factory method for resultset's
commit 2d2e1267be7ebb1843bed44ea53d3f5bb369ae20
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 10:45:15 2013 +0000

    xub_StrLen->sal_Int32
    
    Change-Id: Ia17762919b57bc6febed5cc49e8931165870c117

diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx
index 46f40fc..29eab5f 100644
--- a/svtools/source/control/scriptedtext.cxx
+++ b/svtools/source/control/scriptedtext.cxx
@@ -145,8 +145,8 @@ void SvtScriptedTextHelper_Impl::CalculateSizes()
         DBG_ASSERT( maPosVec.size() - 1 == maScriptVec.size(),
             "SvtScriptedTextHelper_Impl::CalculateWidth - invalid vectors" );
 
-        xub_StrLen nThisPos = static_cast< xub_StrLen >( maPosVec[ 0 ] );
-        xub_StrLen nNextPos;
+        sal_Int32 nThisPos = maPosVec[ 0 ];
+        sal_Int32 nNextPos;
         sal_Int32 nPosVecSize = maPosVec.size();
         sal_Int32 nPosVecIndex = 1;
 
@@ -157,7 +157,7 @@ void SvtScriptedTextHelper_Impl::CalculateSizes()
 
         while( nPosVecIndex < nPosVecSize )
         {
-            nNextPos = static_cast< xub_StrLen >( maPosVec[ nPosVecIndex++ ] );
+            nNextPos = maPosVec[ nPosVecIndex++ ];
             nScript = maScriptVec[ nScriptVecIndex++ ];
 
             SetOutDevFont( nScript );
@@ -284,8 +284,8 @@ void SvtScriptedTextHelper_Impl::DrawText( const Point& _rPos )
 
     maDefltFont = mrOutDevice.GetFont();
     Point aCurrPos( _rPos );
-    xub_StrLen nThisPos = static_cast< xub_StrLen >( maPosVec[ 0 ] );
-    xub_StrLen nNextPos;
+    sal_Int32 nThisPos = maPosVec[ 0 ];
+    sal_Int32 nNextPos;
     sal_Int32 nPosVecSize = maPosVec.size();
     sal_Int32 nPosVecIndex = 1;
 
@@ -294,7 +294,7 @@ void SvtScriptedTextHelper_Impl::DrawText( const Point& _rPos )
 
     while( nPosVecIndex < nPosVecSize )
     {
-        nNextPos = static_cast< xub_StrLen >( maPosVec[ nPosVecIndex++ ] );
+        nNextPos = maPosVec[ nPosVecIndex++ ];
         nScript = maScriptVec[ nVecIndex ];
 
         SetOutDevFont( nScript );
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 81d3584..54c1548 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -239,8 +239,8 @@ void HTMLOption::GetColor( Color& rColor ) const
     if( SAL_MAX_UINT32 == nColor )
     {
         nColor = 0;
-        xub_StrLen nPos = 0;
-        for( sal_uInt32 i=0; i<6; i++ )
+        sal_Int32 nPos = 0;
+        for (sal_uInt32 i=0; i<6; ++i)
         {
             // Whatever Netscape does to get color values,
             // at maximum three characters < '0' are ignored.
@@ -1162,7 +1162,7 @@ int HTMLParser::_GetNextToken()
                         sal_uLong nCStreamPos = 0;
                         sal_uLong nCLineNr = 0;
                         sal_uLong nCLinePos = 0;
-                        xub_StrLen nCStrLen = 0;
+                        sal_Int32 nCStrLen = 0;
 
                         bool bDone = false;
                         // Read until closing -->. If not found restart at first >
@@ -1421,7 +1421,7 @@ scan_text:
 
 void HTMLParser::UnescapeToken()
 {
-    xub_StrLen nPos=0;
+    sal_Int32 nPos=0;
 
     bool bEscape = false;
     while( nPos < aToken.getLength() )
@@ -1447,7 +1447,7 @@ const HTMLOptions& HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken )
     if (!maOptions.empty())
         return maOptions;
 
-    xub_StrLen nPos = 0;
+    sal_Int32 nPos = 0;
     while( nPos < aToken.getLength() )
     {
         // A letter? Option beginning here.
@@ -1455,7 +1455,7 @@ const HTMLOptions& HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken )
         {
             int nToken;
             OUString aValue;
-            xub_StrLen nStt = nPos;
+            sal_Int32 nStt = nPos;
             sal_Unicode cChar = 0;
 
             // Actually only certain characters allowed.
@@ -1492,7 +1492,7 @@ const HTMLOptions& HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken )
 
                 if( nPos != aToken.getLength() )
                 {
-                    xub_StrLen nLen = 0;
+                    sal_Int32 nLen = 0;
                     nStt = nPos;
                     if( ('"'==cChar) || ('\'')==cChar )
                     {
commit 8577006e9a7c67d7bd3df19c38edda5d5f0f89f5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 10:41:43 2013 +0000

    unused header file
    
    Change-Id: I179cc3dc58484ab1e21af3b1d776188d52f3974c

diff --git a/tools/inc/impstrg.hxx b/tools/inc/impstrg.hxx
deleted file mode 100644
index 5c67488..0000000
--- a/tools/inc/impstrg.hxx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _IMPSTRG_HXX
-#define _IMPSTRG_HXX
-
-#include <tools/tools.h>
-
-// Helper functions for Strings
-
-xub_StrLen ImplStringLen( const sal_Char* pStr );
-xub_StrLen ImplStringLen( const sal_Unicode* pStr );
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 4bc5287636aa4d12aaaeff94076b4fb202a2d936
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 10:41:04 2013 +0000

    xub_StrLen->sal_Int32
    
    Change-Id: Ia52a898fa0a6b47eb7f78b03ef8c8648ddf72e28

diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 2152c90..83ca17e 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -178,7 +178,7 @@ namespace unnamed_tools_inetmime {
 void appendISO88591(OUString & rText, sal_Char const * pBegin,
                     sal_Char const * pEnd)
 {
-    xub_StrLen nLength = static_cast< xub_StrLen >(pEnd - pBegin);
+    sal_Int32 nLength = pEnd - pBegin;
     sal_Unicode * pBuffer = new sal_Unicode[nLength];
     for (sal_Unicode * p = pBuffer; pBegin != pEnd;)
         *p++ = sal_uChar(*pBegin++);
@@ -2670,7 +2670,7 @@ OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
                 if (eType == HEADER_FIELD_TEXT)
                     sDecoded += OUString(
                         pUnicodeBuffer,
-                        static_cast< xub_StrLen >(nUnicodeSize));
+                        static_cast< sal_Int32 >(nUnicodeSize));
                 else if (nCommentLevel == 0)
                 {
                     sEncodedText = OUString(pUnicodeBuffer, nUnicodeSize);
@@ -2781,8 +2781,7 @@ OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
                 {
                     appendISO88591(sDecoded, pCopyBegin, p - 1);
                     sal_Unicode aUTF16Buf[2];
-                    xub_StrLen nUTF16Len = static_cast< xub_StrLen >(
-                        putUTF32Character(aUTF16Buf, nCharacter) - aUTF16Buf);
+                    sal_Int32 nUTF16Len = putUTF32Character(aUTF16Buf, nCharacter) - aUTF16Buf;
                     sDecoded += OUString(aUTF16Buf, nUTF16Len);
                     p = pUTF8End;
                     pCopyBegin = p;
commit c1fd218e903d5b7b9f705b379d86f0d237705785
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 13 10:14:57 2013 +0000

    convert name html design to .ui
    
    Change-Id: If384ab765e09a6600d3e9cb559ed58dccb6b18c1

diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk
index c6851e2..a578a2d 100644
--- a/sd/UIConfig_sdraw.mk
+++ b/sd/UIConfig_sdraw.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\
 	sd/uiconfig/sdraw/ui/drawpagedialog \
 	sd/uiconfig/sdraw/ui/drawprtldialog \
 	sd/uiconfig/sdraw/ui/insertlayer \
+	sd/uiconfig/sdraw/ui/namedesign \
 	sd/uiconfig/sdraw/ui/paranumberingtab \
 	sd/uiconfig/sdraw/ui/printeroptions \
 ))
diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h
index a0cc01c..3d6aabf 100644
--- a/sd/inc/helpids.h
+++ b/sd/inc/helpids.h
@@ -88,8 +88,6 @@
 #define HID_SD_CHGFOIL_OBJECTS                                  "SD_HID_SD_CHGFOIL_OBJECTS"
 #define HID_SD_CHGFOIL_NAME                                     "SD_HID_SD_CHGFOIL_NAME"
 
-#define HID_SD_HTMLEXPORT_DLG_DNAME                             "SD_HID_SD_HTMLEXPORT_DLG_DNAME"
-
 #define HID_FM_CTL_SELECTION                                    "SD_HID_FM_CTL_SELECTION"
 
 #define HID_SD_AUTOPILOT_REGION                                 "SD_HID_SD_AUTOPILOT_REGION"
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 26acda2..31076f6 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -350,9 +350,8 @@ SvStream& operator << (SvStream& rOut, const SdPublishingDesign& rDesign)
 class SdDesignNameDlg : public ModalDialog
 {
 private:
-    Edit            m_aEdit;
-    OKButton        m_aBtnOK;
-    CancelButton    m_aBtnCancel;
+    Edit*           m_pEdit;
+    OKButton*       m_pBtnOK;
 
 public:
     SdDesignNameDlg(Window* pWindow, const OUString& aName );
@@ -1581,26 +1580,24 @@ sal_Bool SdPublishingDlg::Save()
 }
 
 // SdDesignNameDlg Methods
-SdDesignNameDlg::SdDesignNameDlg(Window* pWindow, const OUString& aName):
-                ModalDialog             (pWindow, SdResId( DLG_DESIGNNAME )),
-                m_aEdit                 (this, SdResId(EDT_NAME)),
-                m_aBtnOK                (this, SdResId(BTN_SAVE)),
-                m_aBtnCancel            (this, SdResId(BTN_NOSAVE))
+SdDesignNameDlg::SdDesignNameDlg(Window* pWindow, const OUString& aName)
+    : ModalDialog(pWindow, "NameDesignDialog", "modules/sdraw/ui/namedesign.ui")
 {
-    FreeResource();
-    m_aEdit.SetModifyHdl(LINK(this, SdDesignNameDlg, ModifyHdl ));
-    m_aEdit.SetText(aName);
-    m_aBtnOK.Enable(!aName.isEmpty());
+    get(m_pEdit, "entry");
+    get(m_pBtnOK, "ok");
+    m_pEdit->SetModifyHdl(LINK(this, SdDesignNameDlg, ModifyHdl ));
+    m_pEdit->SetText(aName);
+    m_pBtnOK->Enable(!aName.isEmpty());
 }
 
 OUString SdDesignNameDlg::GetDesignName()
 {
-    return m_aEdit.GetText();
+    return m_pEdit->GetText();
 }
 
 IMPL_LINK_NOARG(SdDesignNameDlg, ModifyHdl)
 {
-    m_aBtnOK.Enable(!m_aEdit.GetText().isEmpty());
+    m_pBtnOK->Enable(!m_pEdit->GetText().isEmpty());
 
     return 0;
 }
diff --git a/sd/source/filter/html/pubdlg.src b/sd/source/filter/html/pubdlg.src
index d13f62e..bf23d85 100644
--- a/sd/source/filter/html/pubdlg.src
+++ b/sd/source/filter/html/pubdlg.src
@@ -693,42 +693,4 @@ ModalDialog DLG_PUBLISHING
     };
 };
 
-ModalDialog DLG_DESIGNNAME
-{
-    HelpID = HID_SD_HTMLEXPORT_DLG_DNAME;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 160 , 40 ) ;
-    Moveable = TRUE ;
-
-    Edit EDT_NAME
-    {
-        HelpID = "sd:Edit:DLG_DESIGNNAME:EDT_NAME";
-        BORDER = TRUE ;
-        Pos = MAP_APPFONT ( 4, 4 );
-        Size = MAP_APPFONT ( 152, 14 );
-        LEFT = TRUE;
-    };
-
-    OKButton BTN_SAVE
-    {
-        OutputSize = TRUE ;
-        Pos = MAP_APPFONT ( 25 , 22 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        DefButton = TRUE ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Save";
-    };
-
-    CancelButton BTN_NOSAVE
-    {
-        OutputSize = TRUE ;
-        Pos = MAP_APPFONT ( 80 , 22 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Do Not Save";
-    };
-    Text [ en-US ] = "Name HTML Design";
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/pubdlg.hrc b/sd/source/ui/inc/pubdlg.hrc
index d5612da..77d84a8 100644
--- a/sd/source/ui/inc/pubdlg.hrc
+++ b/sd/source/ui/inc/pubdlg.hrc
@@ -123,11 +123,4 @@
 
 #define DLG_PUBLISHING 739
 
-//////////////////////////////
-
-#define BTN_SAVE    1
-#define BTN_NOSAVE  2
-#define EDT_NAME    3
-#define DLG_DESIGNNAME 740
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/uiconfig/sdraw/ui/namedesign.ui b/sd/uiconfig/sdraw/ui/namedesign.ui
new file mode 100644
index 0000000..e568ad4
--- /dev/null
+++ b/sd/uiconfig/sdraw/ui/namedesign.ui
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="NameDesignDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Name HTML Design</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="row_spacing">12</property>
+            <property name="column_spacing">12</property>
+            <child>
+              <object class="GtkEntry" id="entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="invisible_char">•</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list