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

2021-07-17 Thread Noel Grandin (via logerrit)
 include/svtools/svparser.hxx  |6 
 svtools/source/svrtf/svparser.cxx |   55 --
 sw/source/filter/html/svxcss1.cxx |   11 ++-
 sw/source/filter/html/svxcss1.hxx |4 +-
 4 files changed, 11 insertions(+), 65 deletions(-)

New commits:
commit 1b80998025e13fbf71017ac08fa607737e716429
Author: Noel Grandin 
AuthorDate: Fri Jul 16 20:37:15 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Jul 17 12:48:05 2021 +0200

move BuildWhichTable and simplify

move it to the only place using it, and simplify

Change-Id: I4a46b5d01f042e7b2e99b7dd1d28f67feda037d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119086
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svtools/svparser.hxx b/include/svtools/svparser.hxx
index 0941c4e6d99b..3233cf8000a7 100644
--- a/include/svtools/svparser.hxx
+++ b/include/svtools/svparser.hxx
@@ -141,12 +141,6 @@ public:
 T GetSaveToken() const;
 };
 
-// build a Which-Map 'rWhichMap' from an array of WhichIds
-// 'pWhichIds'. It has the length 'nWhichIds'.
-// The WhichMap is not deleted.
-SVT_DLLPUBLIC void BuildWhichTable( std::vector ,
-   sal_uInt16 const *pWhichIds,
-   sal_uInt16 nWhichIds );
 
 /*
  *
diff --git a/svtools/source/svrtf/svparser.cxx 
b/svtools/source/svrtf/svparser.cxx
index 301e2961d923..3da34404f517 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -595,61 +595,6 @@ void SvParser::Continue( T )
 {
 }
 
-void BuildWhichTable( std::vector ,
-  sal_uInt16 const *pWhichIds,
-  sal_uInt16 nWhichIds )
-{
-sal_uInt16 aNewRange[2];
-
-for( sal_uInt16 nCnt = 0; nCnt < nWhichIds; ++nCnt, ++pWhichIds )
-if( *pWhichIds )
-{
-aNewRange[0] = aNewRange[1] = *pWhichIds;
-bool bIns = true;
-
-// search position
-for ( sal_uInt16 nOfs = 0; rWhichMap[nOfs]; nOfs += 2 )
-{
-if( *pWhichIds < rWhichMap[nOfs] - 1 )
-{
-// new range before
-rWhichMap.insert( rWhichMap.begin() + nOfs, aNewRange, 
aNewRange + 2 );
-bIns = false;
-break;
-}
-else if( *pWhichIds == rWhichMap[nOfs] - 1 )
-{
-// extend range downwards
-rWhichMap[nOfs] = *pWhichIds;
-bIns = false;
-break;
-}
-else if( *pWhichIds == rWhichMap[nOfs+1] + 1 )
-{
-if( rWhichMap[nOfs+2] != 0 && rWhichMap[nOfs+2] == 
*pWhichIds + 1 )
-{
-// merge with next field
-rWhichMap[nOfs+1] = rWhichMap[nOfs+3];
-rWhichMap.erase( rWhichMap.begin() + nOfs + 2,
-rWhichMap.begin() + nOfs + 4 );
-}
-else
-// extend range upwards
-rWhichMap[nOfs+1] = *pWhichIds;
-bIns = false;
-break;
-}
-}
-
-// append range
-if( bIns )
-{
-rWhichMap.insert( rWhichMap.begin() + rWhichMap.size() - 1,
-aNewRange, aNewRange + 2 );
-}
-}
-}
-
 
 // expanded out version of
 //   IMPL_LINK_NOARG( SvParser, NewDataRead, LinkParamNone*, void )
diff --git a/sw/source/filter/html/svxcss1.cxx 
b/sw/source/filter/html/svxcss1.cxx
index 280c927320d0..649163449d56 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -694,6 +694,14 @@ void SvxCSS1Parser::SelectorParsed( 
std::unique_ptr pSelector, boo
 m_Selectors.push_back(std::move(pSelector));
 }
 
+static void BuildWhichTable( WhichRangesContainer& rWhichMap,
+   sal_uInt16 const *pWhichIds,
+   sal_uInt16 nWhichIds )
+{
+for (sal_uInt16 i = 0; i < nWhichIds; ++i)
+rWhichMap = rWhichMap.MergeRange(pWhichIds[i], pWhichIds[i]);
+}
+
 SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const OUString& rBaseURL,
   sal_uInt16 const *pWhichIds, sal_uInt16 
nWhichIds ) :
 CSS1Parser(),
@@ -740,13 +748,12 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const 
OUString& rBaseURL,
 aItemIds.nLanguageCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, 
false );
 aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, false );
 
-m_aWhichMap.insert( m_aWhichMap.begin(), 0 );
 BuildWhichTable( m_aWhichMap, reinterpret_cast(),
  sizeof(aItemIds) / sizeof(sal_uInt16) );

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

2021-05-02 Thread Noel Grandin (via logerrit)
 include/svtools/svparser.hxx  |   15 +++
 svtools/source/svhtml/parhtml.cxx |   22 +++---
 svtools/source/svrtf/svparser.cxx |   14 +++---
 sw/source/core/inc/txtfrm.hxx |4 ++--
 sw/source/core/text/txtfrm.cxx|4 ++--
 5 files changed, 29 insertions(+), 30 deletions(-)

New commits:
commit 6549aa9afa7f39b45a0d402d83f4975f37bcc2fb
Author: Noel Grandin 
AuthorDate: Sun May 2 18:00:32 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun May 2 19:33:14 2021 +0200

sal_uLong->sal_uInt32 in SvParser

Change-Id: Ibe5599e1cc136330a8e9c089c7cc66d0ef4bc966
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115002
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svtools/svparser.hxx b/include/svtools/svparser.hxx
index 35da5bd51ad8..0941c4e6d99b 100644
--- a/include/svtools/svparser.hxx
+++ b/include/svtools/svparser.hxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -49,8 +48,8 @@ class SVT_DLLPUBLIC SvParser : public SvRefBase
 protected:
 SvStream&   rInput;
 OUStringaToken; // scanned token
-sal_uLong   nlLineNr;   // current line number
-sal_uLong   nlLinePos;  // current column number
+sal_uInt32  nlLineNr;   // current line number
+sal_uInt32  nlLinePos;  // current column number
 
 std::unique_ptr> pImplData; // internal data
 tools::Longm_nTokenIndex;  // current token index to 
detect loops for seeking backwards
@@ -107,12 +106,12 @@ public:
 
 SvParserState GetStatus() const;  // StatusInfo
 
-sal_uLongGetLineNr() const;
-sal_uLongGetLinePos() const;
+sal_uInt32   GetLineNr() const;
+sal_uInt32   GetLinePos() const;
 void IncLineNr();
-sal_uLongIncLinePos();
-void SetLineNr( sal_uLong nlNum );
-void SetLinePos( sal_uLong nlPos );
+sal_uInt32   IncLinePos();
+void SetLineNr( sal_uInt32 nlNum );
+void SetLinePos( sal_uInt32 nlPos );
 
 sal_uInt32 GetNextChar();   // Return next Unicode codepoint in UTF32.
 void RereadLookahead();
diff --git a/svtools/source/svhtml/parhtml.cxx 
b/svtools/source/svhtml/parhtml.cxx
index 6796c6ca8738..d9f64c4541d9 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -134,7 +134,7 @@ void HTMLOption::GetNumbers( std::vector 
 ) const
 // This is a very simplified scanner: it only searches all
 // numerals in the string.
 bool bInNum = false;
-sal_uLong nNum = 0;
+sal_uInt32 nNum = 0;
 for( sal_Int32 i=0; i(nPos+1)*GetCharSize(),
 "Wrong stream position" );
 DBG_ASSERT( nlLinePos-nLinePos ==
-static_cast(nPos+1),
+static_cast(nPos+1),
 "Wrong line position" );
 rInput.Seek( nStreamPos );
 nlLinePos = nLinePos;
@@ -553,7 +553,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak )
 
static_cast(nPos+1)*GetCharSize(),
 "Wrong stream position" );
 DBG_ASSERT( nlLinePos-nLinePos ==
-static_cast(nPos+1),
+
static_cast(nPos+1),
 "Wrong line position" );
 rInput.Seek( nStreamPos );
 nlLinePos = nLinePos;
@@ -810,8 +810,8 @@ HtmlTokenId HTMLParser::GetNextRawToken()
 
 // and remember position in stream.
 sal_uInt64 nStreamPos = rInput.Tell();
-sal_uLong nLineNr = GetLineNr();
-sal_uLong nLinePos = GetLinePos();
+sal_uInt32 nLineNr = GetLineNr();
+sal_uInt32 nLinePos = GetLinePos();
 
 // Start of an end token?
 bool bOffState = false;
@@ -1041,8 +1041,8 @@ HtmlTokenId HTMLParser::GetNextToken_()
 case '<':
 {
 sal_uInt64 nStreamPos = rInput.Tell();
-sal_uLong nLineNr = GetLineNr();
-sal_uLong nLinePos = GetLinePos();
+sal_uInt32 nLineNr = GetLineNr();
+sal_uInt32 nLinePos = GetLinePos();
 
 bool bOffState = false;
 if( '/' == (nNextCh = GetNextChar()) )
@@ -1113,8 +1113,8 @@ HtmlTokenId HTMLParser::GetNextToken_()
 if( '>'!=nNextCh )
 aToken += " ";
 sal_uInt64 nCStreamPos = 0;
-

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

2018-07-17 Thread Libreoffice Gerrit user
 include/svtools/transfer.hxx   |3 --
 svtools/source/misc/transfer2.cxx  |   45 -
 sw/source/uibase/docvw/romenu.cxx  |   12 
 sw/source/uibase/docvw/romenu.hxx  |1 
 sw/uiconfig/swriter/ui/readonlymenu.ui |8 -
 5 files changed, 69 deletions(-)

New commits:
commit 923131f8b47f7ae53b1385df213722991673bffa
Author: Xisco Fauli 
AuthorDate: Sun Jul 8 19:30:28 2018 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jul 17 10:26:33 2018 +0200

tdf#105262 Clean up CopyGraphic

It's only available in read-only mode, it doesn't work and
the images can be copied with the normal copy option

Change-Id: I6493147309104b2b0f3881a667547c38d7633ef3
Reviewed-on: https://gerrit.libreoffice.org/57162
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx
index 4091a8f087d1..dfd6e1b77dc0 100644
--- a/include/svtools/transfer.hxx
+++ b/include/svtools/transfer.hxx
@@ -487,9 +487,6 @@ public:
 virtual ~TransferDataContainer() override;
 
 voidCopyINetBookmark( const INetBookmark& rBkmk );
-voidCopyINetImage( const INetImage& rINtImg );
-voidCopyImageMap( const ImageMap& rImgMap );
-voidCopyGraphic( const Graphic& rGrf );
 voidCopyString( const OUString& rStr );
 voidCopyString( SotClipboardFormatId nFmt, const OUString& 
rStr );
 voidCopyAny( SotClipboardFormatId nFmt, const 
css::uno::Any& rAny );
diff --git a/svtools/source/misc/transfer2.cxx 
b/svtools/source/misc/transfer2.cxx
index b1ece2619f52..f41163a729ba 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -427,51 +427,6 @@ void TransferDataContainer::CopyByteString( 
SotClipboardFormatId nFormatId,
 }
 
 
-void TransferDataContainer::CopyINetImage( const INetImage& rINtImg )
-{
-SvMemoryStream aMemStm( 1024, 1024 );
-aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
-rINtImg.Write( aMemStm, SotClipboardFormatId::INET_IMAGE );
-CopyAnyData( SotClipboardFormatId::INET_IMAGE, static_cast(aMemStm.GetData()),
-aMemStm.Seek( STREAM_SEEK_TO_END ) );
-}
-
-
-void TransferDataContainer::CopyImageMap( const ImageMap& rImgMap )
-{
-SvMemoryStream aMemStm( 8192, 8192 );
-aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
-rImgMap.Write( aMemStm );
-CopyAnyData( SotClipboardFormatId::SVIM, static_cast(aMemStm.GetData()),
-aMemStm.Seek( STREAM_SEEK_TO_END ) );
-}
-
-
-void TransferDataContainer::CopyGraphic( const Graphic& rGrf )
-{
-GraphicType nType = rGrf.GetType();
-if( GraphicType::NONE == nType )
-return;
-
-if( !pImpl->pGrf )
-pImpl->pGrf.reset( new Graphic( rGrf ) );
-else
-*pImpl->pGrf = rGrf;
-
-AddFormat( SotClipboardFormatId::SVXB );
-
-if( GraphicType::Bitmap == nType )
-{
-AddFormat( SotClipboardFormatId::PNG );
-AddFormat( SotClipboardFormatId::BITMAP );
-}
-else if( GraphicType::GdiMetafile == nType )
-{
-AddFormat( SotClipboardFormatId::GDIMETAFILE );
-}
-}
-
-
 void TransferDataContainer::CopyString( SotClipboardFormatId nFmt, const 
OUString& rStr )
 {
 if( !rStr.isEmpty() )
diff --git a/sw/source/uibase/docvw/romenu.cxx 
b/sw/source/uibase/docvw/romenu.cxx
index af8a625c55cf..3b56c4b2fb29 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -102,7 +102,6 @@ SwReadOnlyPopup::SwReadOnlyPopup(const Point , SwView 
)
 , m_nReadonlyBackgroundTogallerylink(m_xMenu->GetItemId("backaslink"))
 , m_nReadonlyBackgroundTogallerycopy(m_xMenu->GetItemId("backascopy"))
 , m_nReadonlyCopylink(m_xMenu->GetItemId("copylink"))
-, m_nReadonlyCopyGraphic(m_xMenu->GetItemId("copygraphic"))
 , m_nReadonlyLoadGraphic(m_xMenu->GetItemId("loadgraphic"))
 , m_nReadonlyGraphicoff(m_xMenu->GetItemId("imagesoff"))
 , m_nReadonlyFullscreen(m_xMenu->GetItemId("fullscreen"))
@@ -133,7 +132,6 @@ SwReadOnlyPopup::SwReadOnlyPopup(const Point , SwView 
)
 if ( nullptr == (pGrf = rSh.GetGrfAtPos( m_rDocPos, m_sGrfName, bLink )) )
 {
 m_xMenu->EnableItem(m_nReadonlySaveGraphic, false);
-m_xMenu->EnableItem(m_nReadonlyCopyGraphic, false);
 }
 else
 {
@@ -318,16 +316,6 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, 
sal_uInt16 nId )
 pClipCntnr = new TransferDataContainer;
 pClipCntnr->CopyString( m_sURL );
 }
-else if (nId == m_nReadonlyCopyGraphic)
-{
-pClipCntnr = new TransferDataContainer;
-pClipCntnr->CopyGraphic( m_aGraphic );
-
-if( m_pImageMap )
-pClipCntnr->CopyImageMap( *m_pImageMap );
-if( m_pTargetURL )
-pClipCntnr->CopyINetImage( *m_pTargetURL );
-}
 else if (nId == 

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

2018-04-29 Thread Jim Raykowski
 include/svtools/treelistbox.hxx   |2 +-
 svtools/source/contnr/treelistbox.cxx |7 ---
 sw/source/uibase/utlui/content.cxx|9 -
 3 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit b649ce123dea372359ec571135a68eb3de844e5b
Author: Jim Raykowski 
Date:   Tue Apr 17 18:07:39 2018 -0800

tdf#117063 Modify tree list double click behavior in the navigator

Change-Id: I369a7a2075aabd3574bdda39dac74e2b132f6923
Reviewed-on: https://gerrit.libreoffice.org/53074
Tested-by: Jenkins 
Reviewed-by: Heiko Tietze 

diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 9907e4358397..ac58f6228069 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -647,7 +647,7 @@ public:
 
 voidSetSublistOpenWithReturn();  // open/close sublist 
with return/enter
 voidSetSublistOpenWithLeftRight();   // open/close sublist 
with cursor left/right
-voidSetSublistDontOpenWithDoubleClick(); // do not open/close 
sublist with mouse double click on entry
+voidSetSublistDontOpenWithDoubleClick( bool bDontOpen ); // 
set mouse double click open/close sublist behavior
 
 voidEnableInplaceEditing( bool bEnable );
 // Edits the Entry's first StringItem, 0 == Cursor
diff --git a/svtools/source/contnr/treelistbox.cxx 
b/svtools/source/contnr/treelistbox.cxx
index 49ac834eecac..63ddcdbd62e1 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -427,7 +427,8 @@ void SvTreeListBox::DeselectHdl()
 
 bool SvTreeListBox::DoubleClickHdl()
 {
-return !aDoubleClickHdl.IsSet() || aDoubleClickHdl.Call(this);
+aDoubleClickHdl.Call( this );
+return true;
 }
 
 
@@ -1433,9 +1434,9 @@ void SvTreeListBox::SetSublistOpenWithLeftRight()
 pImpl->bSubLstOpLR = true;
 }
 
-void SvTreeListBox::SetSublistDontOpenWithDoubleClick()
+void SvTreeListBox::SetSublistDontOpenWithDoubleClick(bool bDontOpen)
 {
-pImpl->bSubLstOpDblClick = false;
+pImpl->bSubLstOpDblClick = !bDontOpen;
 }
 
 void SvTreeListBox::Resize()
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 4fe719131123..06bb5ad1c701 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -858,7 +858,6 @@ SwContentTree::SwContentTree(vcl::Window* pParent, 
SwNavigationPI* pDialog)
 , m_bViewHasChanged(false)
 , m_bIsKeySpace(false)
 {
-SetSublistDontOpenWithDoubleClick();
 SetHelpId(HID_NAVIGATOR_TREELIST);
 
 SetNodeDefaultImages();
@@ -2705,7 +2704,15 @@ void SwContentTree::MouseButtonDown( const MouseEvent& 
rMEvt )
 if( !pEntry && rMEvt.IsLeft() && rMEvt.IsMod1() && (rMEvt.GetClicks() % 2) 
== 0)
 Control::MouseButtonDown( rMEvt );
 else
+{
+if( pEntry && (rMEvt.GetClicks() % 2) == 0)
+{
+SwContent* pCnt = static_cast(pEntry->GetUserData());
+const ContentTypeId nActType = pCnt->GetParent()->GetType();
+SetSublistDontOpenWithDoubleClick( nActType == 
ContentTypeId::OUTLINE );
+}
 SvTreeListBox::MouseButtonDown( rMEvt );
+}
 }
 
 // Update immediately
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-01 Thread Miklos Vajna
 include/svtools/htmlout.hxx  |2 -
 svtools/source/svhtml/htmlout.cxx|4 +-
 sw/source/filter/html/css1atr.cxx|   10 ++---
 sw/source/filter/html/htmlatr.cxx|   56 +++
 sw/source/filter/html/htmldrawwriter.cxx |2 -
 sw/source/filter/html/htmlfldw.cxx   |2 -
 sw/source/filter/html/htmlflywriter.cxx  |   50 +--
 sw/source/filter/html/htmlforw.cxx   |8 ++--
 sw/source/filter/html/htmlftn.cxx|   16 
 sw/source/filter/html/htmlnumwriter.cxx  |8 ++--
 sw/source/filter/html/htmlplug.cxx   |   16 
 sw/source/filter/html/htmltabw.cxx   |   54 ++---
 sw/source/filter/html/wrthtml.cxx|   26 +-
 sw/source/filter/html/wrthtml.hxx|3 +
 14 files changed, 134 insertions(+), 123 deletions(-)

New commits:
commit b4f3af91d344d5f8c18e060615360e2a6633b63f
Author: Miklos Vajna 
Date:   Tue Feb 27 15:30:25 2018 +0100

sw HTML export: handle XHTML ns alias even with HTMLOutFuncs::Out_AsciiTag()

This is meant to be mechanical, full conversion to HtmlWriter has to be
done step by step in follow-up commits.

Change-Id: Ieab096f8c9936f0ecad029fbdfb51da7412ad83e
Reviewed-on: https://gerrit.libreoffice.org/50449
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/include/svtools/htmlout.hxx b/include/svtools/htmlout.hxx
index 8fadcb90280e..9aaf719021f2 100644
--- a/include/svtools/htmlout.hxx
+++ b/include/svtools/htmlout.hxx
@@ -57,7 +57,7 @@ struct HTMLOutFuncs
 rtl_TextEncoding eDestEnc,
 OUString *pNonConvertableChars );
 
-SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, const sal_Char* 
pStr,
+SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, const OString& 
rStr,
bool bOn = true);
 SVT_DLLPUBLIC static SvStream& Out_Char( SvStream&, sal_uInt32 cChar,
 HTMLOutContext& rContext,
diff --git a/svtools/source/svhtml/htmlout.cxx 
b/svtools/source/svhtml/htmlout.cxx
index c2975d06faea..8ee63d19b757 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -513,7 +513,7 @@ OString HTMLOutFuncs::ConvertStringToHTML( const OUString& 
rSrc,
 return aDest.makeStringAndClear();
 }
 
-SvStream& HTMLOutFuncs::Out_AsciiTag( SvStream& rStream, const sal_Char *pStr,
+SvStream& HTMLOutFuncs::Out_AsciiTag( SvStream& rStream, const OString& rStr,
   bool bOn )
 {
 if(bOn)
@@ -521,7 +521,7 @@ SvStream& HTMLOutFuncs::Out_AsciiTag( SvStream& rStream, 
const sal_Char *pStr,
 else
 rStream.WriteCharPtr("');
+rStream.WriteOString(rStr).WriteChar('>');
 
 return rStream;
 }
diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index 4232fdfdedd4..3ef2ed278510 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -226,7 +226,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
 {
 m_bFirstCSS1Rule = false;
 OutNewLine();
-sOut.append("<" OOO_STRING_SVTOOLS_HTML_style " "
+sOut.append("<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_style " "
 OOO_STRING_SVTOOLS_HTML_O_type "=\"text/css\">");
 //  Optional CSS2 code for dot leaders (dotted line between the Table of 
Contents titles and page numbers):
 //  (More information: 
http://www.w3.org/Style/Examples/007/leaders.en.html)
@@ -288,7 +288,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
 }
 else
 {
-HTMLOutFuncs::Out_AsciiTag( Strm(), 
OOO_STRING_SVTOOLS_HTML_span, false );
+HTMLOutFuncs::Out_AsciiTag( Strm(), GetNamespace() + 
OOO_STRING_SVTOOLS_HTML_span, false );
 return;
 }
 break;
@@ -590,7 +590,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& 
rPageDesc )
 DecIndentLevel();
 
 OutNewLine();
-HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_style, 
false );
+HTMLOutFuncs::Out_AsciiTag( Strm(), GetNamespace() + 
OOO_STRING_SVTOOLS_HTML_style, false );
 }
 else
 {
@@ -2822,7 +2822,7 @@ static Writer& OutCSS1_SwFormatDrop( Writer& rWrt, const 
SfxPoolItem& rHt )
 }
 else
 {
-HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, 
false );
+HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rHTMLWrt.GetNamespace() + 
OOO_STRING_SVTOOLS_HTML_span, false );
 }
 
 return rWrt;
@@ -3384,7 +3384,7 @@ Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& 
rHt )
 }
 else
 {
-HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), 
OOO_STRING_SVTOOLS_HTML_span, false );
+  

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

2018-01-15 Thread Jim Raykowski
 include/svtools/treelistbox.hxx   |2 +-
 svtools/source/contnr/treelistbox.cxx |2 +-
 sw/source/uibase/utlui/content.cxx|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 77acf66a3414c46edecfbc04b65e4a507eb857cb
Author: Jim Raykowski 
Date:   Sun Jan 14 11:24:10 2018 -0900

change Not to Dont in tdf#36308 fix

Change-Id: I05806eea3363b7363d7a377277c63785aadc5386
Reviewed-on: https://gerrit.libreoffice.org/47870
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 12bfa4a11439..adf8a079a2a2 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -649,7 +649,7 @@ public:
 
 voidSetSublistOpenWithReturn();  // open/close sublist 
with return/enter
 voidSetSublistOpenWithLeftRight();   // open/close sublist 
with cursor left/right
-voidSetSublistNotOpenWithDoubleClick(); // do not open/close 
sublist with mouse double click on entry
+voidSetSublistDontOpenWithDoubleClick(); // do not open/close 
sublist with mouse double click on entry
 
 voidEnableInplaceEditing( bool bEnable );
 // Edits the Entry's first StringItem, 0 == Cursor
diff --git a/svtools/source/contnr/treelistbox.cxx 
b/svtools/source/contnr/treelistbox.cxx
index 5f1c37606785..1a8c07d521a6 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1434,7 +1434,7 @@ void SvTreeListBox::SetSublistOpenWithLeftRight()
 pImpl->bSubLstOpLR = true;
 }
 
-void SvTreeListBox::SetSublistNotOpenWithDoubleClick()
+void SvTreeListBox::SetSublistDontOpenWithDoubleClick()
 {
 pImpl->bSubLstOpDblClick = false;
 }
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index f58c15a6e358..df7f1bbb29c1 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -858,7 +858,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, 
SwNavigationPI* pDialog)
 , m_bViewHasChanged(false)
 , m_bIsKeySpace(false)
 {
-SetSublistNotOpenWithDoubleClick();
+SetSublistDontOpenWithDoubleClick();
 SetHelpId(HID_NAVIGATOR_TREELIST);
 
 SetNodeDefaultImages();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-11 Thread Jim Raykowski
 include/svtools/treelistbox.hxx   |1 +
 svtools/source/contnr/svimpbox.cxx|   11 +++
 svtools/source/contnr/treelistbox.cxx |5 +
 svtools/source/inc/svimpbox.hxx   |1 +
 sw/source/uibase/utlui/content.cxx|1 +
 5 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 582b2ed5ba25657afc2c2d45860899325b3b2450
Author: Jim Raykowski 
Date:   Mon Jan 1 14:52:41 2018 -0900

tdf#36308 make double click not expand/collapse node in Navigator tree

Change-Id: I0075af147e5aa02f09db57fc2113dcdfcab5bc57
Reviewed-on: https://gerrit.libreoffice.org/47241
Tested-by: Jenkins 
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 
Reviewed-by: Thorsten Behrens 

diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index e7f72b3b15be..12bfa4a11439 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -649,6 +649,7 @@ public:
 
 voidSetSublistOpenWithReturn();  // open/close sublist 
with return/enter
 voidSetSublistOpenWithLeftRight();   // open/close sublist 
with cursor left/right
+voidSetSublistNotOpenWithDoubleClick(); // do not open/close 
sublist with mouse double click on entry
 
 voidEnableInplaceEditing( bool bEnable );
 // Edits the Entry's first StringItem, 0 == Cursor
diff --git a/svtools/source/contnr/svimpbox.cxx 
b/svtools/source/contnr/svimpbox.cxx
index 8c3f8ed0e093..1b0e4ac4f509 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2037,10 +2037,13 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& 
rMEvt )
 }
 if( pEntry->HasChildren() || pEntry->HasChildrenOnDemand() )
 {
-if( pView->IsExpanded(pEntry) )
-pView->Collapse( pEntry );
-else
-pView->Expand( pEntry );
+if( bSubLstOpDblClick )
+{
+if( pView->IsExpanded(pEntry) )
+pView->Collapse( pEntry );
+else
+pView->Expand( pEntry );
+}
 if( pEntry == pCursor )  // only if Entryitem was clicked
   // (Nodebutton is not an Entryitem!)
 pView->Select( pCursor );
diff --git a/svtools/source/contnr/treelistbox.cxx 
b/svtools/source/contnr/treelistbox.cxx
index 02e5d0416c91..c3da96e85bf5 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1434,6 +1434,11 @@ void SvTreeListBox::SetSublistOpenWithLeftRight()
 pImpl->bSubLstOpLR = true;
 }
 
+void SvTreeListBox::SetSublistNotOpenWithDoubleClick()
+{
+pImpl->bSubLstOpDblClick = false;
+}
+
 void SvTreeListBox::Resize()
 {
 if( IsEditingActive() )
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index 373c715e3577..5b69e16c479f 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -135,6 +135,7 @@ private:
 boolbAsyncBeginDrag : 1;
 boolbSubLstOpRet : 1;   // open/close sublist with 
return/enter, defaulted with false
 boolbSubLstOpLR : 1;// open/close sublist with cursor 
left/right, defaulted with false
+boolbSubLstOpDblClick : 1; // open/close sublist with 
mouse double click, defaulted with true
 boolbContextMenuHandling : 1;
 boolbIsCellFocusEnabled : 1;
 boolbAreChildrenTransient;
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 6f1e71e5b0c6..29b0b19ffb2d 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -858,6 +858,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, 
SwNavigationPI* pDialog)
 , m_bViewHasChanged(false)
 , m_bIsKeySpace(false)
 {
+SetSublistNotOpenWithDoubleClick();
 SetHelpId(HID_NAVIGATOR_TREELIST);
 
 SetNodeDefaultImages();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-09-18 Thread Abdulaziz A Alayed
 include/svtools/ruler.hxx|2 +-
 svtools/source/control/ruler.cxx |6 +-
 sw/source/ui/misc/swruler.cxx|6 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit d86a72b64f208fe55f302d9fd8a7f578a4275bb8
Author: Abdulaziz A Alayed aala...@kacst.edu.sa
Date:   Wed Sep 18 13:18:32 2013 +0300

fdo#69280 fixing comments toggle button position when local

set to RTL language

Change-Id: I0c133e3bbb6801f56e9ac0f508961bfa07a19523

Conflicts:
svtools/source/control/ruler.cxx

diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 9382cb0..8f34c23 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -808,7 +808,7 @@ public:
 const Link GetExtraDownHdl() const { return maExtraDownHdl; }
 
 voidSetTextRTL(sal_Bool bRTL);
-
+boolGetTextRTL();
 voidSetCharWidth( long nWidth ) { mnCharWidth = nWidth ; }
 voidSetLineHeight( long nHeight ) { mnLineHeight = nHeight ; }
 
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 6a356c6..91bb084 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -2728,7 +2728,6 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Color 
rFillColor, const Point
 ImplDrawRulerTab( pDevice, aPos, nTabStyle, nStyle  );
 pDevice-Pop();
 }
-
 void Ruler::SetTextRTL(sal_Bool bRTL)
 {
 if(mpData-bTextRTL != (bool) bRTL)
@@ -2770,6 +2769,11 @@ long Ruler::GetRulerVirHeight() const
 return mnVirHeight;
 }
 
+bool Ruler::GetTextRTL()
+{
+return mpData-bTextRTL;
+}
+
 RulerUnitData Ruler::GetCurrentRulerUnit() const
 {
 return aImplRulerUnitTab[mnUnitIndex];
diff --git a/sw/source/ui/misc/swruler.cxx b/sw/source/ui/misc/swruler.cxx
index 76fb8be..f0838f3 100644
--- a/sw/source/ui/misc/swruler.cxx
+++ b/sw/source/ui/misc/swruler.cxx
@@ -246,6 +246,7 @@ void SwCommentRuler::UpdateCommentHelpText()
 // TODO Make Ruler return its central rectangle instead of margins.
 Rectangle SwCommentRuler::GetCommentControlRegion()
 {
+long nLeft = 0;
 SwPostItMgr *pPostItMgr = mpViewShell-GetPostItMgr();
 
 //rhbz#1006850 When the SwPostItMgr ctor is called from SwView::SwView it
@@ -255,7 +256,10 @@ Rectangle SwCommentRuler::GetCommentControlRegion()
 return Rectangle();
 
 //FIXME When the page width is larger then screen, the ruler is misplaced 
by one pixel
-long nLeft   = GetWinOffset() + GetPageOffset() + 
mpSwWin-LogicToPixel(Size(GetPageWidth(), 0)).Width();
+if (GetTextRTL())
+   nLeft = GetPageOffset() - pPostItMgr-GetSidebarWidth(true) + 
GetBorderOffset();
+else
+   nLeft = GetWinOffset() + GetPageOffset() + 
mpSwWin-LogicToPixel(Size(GetPageWidth(), 0)).Width();
 long nTop= 0 + 4; // Ruler::ImplDraw uses RULER_OFF (value: 3px) as 
offset, and Ruler::ImplFormat adds one extra pixel
 // Somehow pPostItMgr-GetSidebarBorderWidth() returns border width 
already doubled
 long nRight  = nLeft+ pPostItMgr-GetSidebarWidth(true) + 
pPostItMgr-GetSidebarBorderWidth(true);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-08-13 Thread Palenik Mihály
 include/svtools/parhtml.hxx|6 +--
 svtools/source/svhtml/htmlsupp.cxx |   66 ++---
 sw/source/filter/html/htmlbas.cxx  |   40 +++---
 sw/source/filter/html/htmlcss1.cxx |4 +-
 sw/source/filter/html/htmldraw.cxx |4 +-
 sw/source/filter/html/htmlfld.cxx  |   13 ++-
 sw/source/filter/html/htmlgrin.cxx |2 -
 sw/source/filter/html/htmlnum.cxx  |2 -
 sw/source/filter/html/swhtml.cxx   |   65 +---
 sw/source/filter/html/swhtml.hxx   |   32 -
 10 files changed, 115 insertions(+), 119 deletions(-)

New commits:
commit 7a504c8752bf7c5accbb9bcc33a98f79b31b8bf2
Author: Palenik Mihály palenik.mih...@gmail.com
Date:   Fri Aug 9 13:51:08 2013 +0200

Change String to OUString in SwHTMLParser class

I changed some variables in SwHTMLParser class and her dependencies.

Change-Id: Ie8ad6c481df8a904bd358c2e9cd6afeef990d418
Reviewed-on: https://gerrit.libreoffice.org/5330
Reviewed-by: Tor Lillqvist t...@iki.fi
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx
index 7df1d76..d82bbaf 100644
--- a/include/svtools/parhtml.hxx
+++ b/include/svtools/parhtml.hxx
@@ -252,13 +252,13 @@ public:
   bool bSwitchToUCS2 = false,
   rtl_TextEncoding eEnc=RTL_TEXTENCODING_DONTKNOW );
 
-bool ParseScriptOptions( String rLangString, const String, 
HTMLScriptLanguage rLang,
- String rSrc, String rLibrary, String rModule );
+bool ParseScriptOptions( OUString rLangString, const OUString, 
HTMLScriptLanguage rLang,
+ OUString rSrc, OUString rLibrary, OUString 
rModule );
 
 // Einen Kommentar um den Inhalt von SCRIPT oder STYLE entfernen
 // Bei 'bFull' wird ggf. die gesammte Zeile hinter einem !--
 // entfernt (fuer JavaSript)
-static void RemoveSGMLComment( String rString, sal_Bool bFull );
+static void RemoveSGMLComment( OUString rString, sal_Bool bFull );
 
 static bool InternalImgToPrivateURL( String rURL );
 static rtl_TextEncoding GetEncodingByHttpHeader( SvKeyValueIterator 
*pHTTPHeader );
diff --git a/svtools/source/svhtml/htmlsupp.cxx 
b/svtools/source/svhtml/htmlsupp.cxx
index 3d90fec..829e8f3 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -36,19 +36,19 @@ static HTMLOptionEnum const aScriptLangOptEnums[] =
 { 0,0   }
 };
 
-bool HTMLParser::ParseScriptOptions( String rLangString, const String 
rBaseURL,
+bool HTMLParser::ParseScriptOptions( OUString rLangString, const OUString 
rBaseURL,
  HTMLScriptLanguage rLang,
- String rSrc,
- String rLibrary,
- String rModule )
+ OUString rSrc,
+ OUString rLibrary,
+ OUString rModule )
 {
 const HTMLOptions aScriptOptions = GetOptions();
 
-rLangString.Erase();
+rLangString = ;
 rLang = HTML_SL_JAVASCRIPT;
-rSrc.Erase();
-rLibrary.Erase();
-rModule.Erase();
+rSrc = ;
+rLibrary = ;
+rModule = ;
 
 for( size_t i = aScriptOptions.size(); i; )
 {
@@ -82,71 +82,71 @@ bool HTMLParser::ParseScriptOptions( String rLangString, 
const String rBaseURL
 return true;
 }
 
-void HTMLParser::RemoveSGMLComment( String rString, sal_Bool bFull )
+void HTMLParser::RemoveSGMLComment( OUString rString, sal_Bool bFull )
 {
 sal_Unicode c = 0;
-while( rString.Len() 
-   ( ' '==(c=rString.GetChar(0)) || '\t'==c || '\r'==c || '\n'==c ) )
-rString.Erase( 0, 1 );
+while( !rString.isEmpty() 
+   ( ' '==(c=rString[0]) || '\t'==c || '\r'==c || '\n'==c ) )
+rString = rString.copy( 1, rString.getLength() - 1 );
 
-while( rString.Len() 
-   ( ' '==(c=rString.GetChar( rString.Len()-1))
+while( !rString.isEmpty() 
+   ( ' '==(c=rString[rString.getLength()-1])
|| '\t'==c || '\r'==c || '\n'==c ) )
-rString.Erase( rString.Len()-1 );
+rString = rString.copy( 0, rString.getLength()-1 );
 
 
 // remove SGML comments
-if( rString.Len() = 4 
-rString.CompareToAscii( !--, 4 ) == COMPARE_EQUAL )
+if( rString.getLength() = 4 
+rString.startsWith( !-- ) )
 {
-xub_StrLen nPos = 3;
+sal_Int32 nPos = 3;
 if( bFull )
 {
 // the whole line
 nPos = 4;
-while( nPos  rString.Len() 
-( ( c = rString.GetChar( nPos )) != '\r'  c != '\n' ) )
+while( nPos  rString.getLength() 
+( ( c = rString[nPos] ) != '\r'  c != '\n' ) )
   

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

2013-08-05 Thread Palenik Mihály
 include/svtools/htmlout.hxx|6 
 svtools/source/svhtml/htmlout.cxx  |8 -
 sw/source/filter/html/htmlatr.cxx  |  238 ++---
 sw/source/filter/html/htmlbas.cxx  |   16 +-
 sw/source/filter/html/htmlfldw.cxx |2 
 sw/source/filter/html/htmlgrin.cxx |   12 -
 sw/source/filter/html/swhtml.hxx   |6 
 sw/source/filter/html/wrthtml.hxx  |4 
 8 files changed, 145 insertions(+), 147 deletions(-)

New commits:
commit bd19e78f62a71bfe7bb6c6634cb021b1e26ef71a
Author: Palenik Mihály palenik.mih...@gmail.com
Date:   Thu Jul 25 09:37:58 2013 +0200

Change String class to OUString class in two files.

I changed String class to OUString class in htmlatr.cxx and
htmlbas.cxx and their dependencies.

Change-Id: I3d05c9705d221b5abe02d09845cd3cdc5381e201
Reviewed-on: https://gerrit.libreoffice.org/5091

diff --git a/include/svtools/htmlout.hxx b/include/svtools/htmlout.hxx
index 52c9234..bc91591 100644
--- a/include/svtools/htmlout.hxx
+++ b/include/svtools/htmlout.hxx
@@ -88,11 +88,11 @@ struct HTMLOutFuncs
 SVT_DLLPUBLIC static SvStream OutScript( SvStream rStrm,
 const String rBaseURL,
 const String rSource,
-const String rLanguage,
+const OUString rLanguage,
 ScriptType eScriptType,
 const String rSrc,
-const String *pSBLibrary = 0,
-const String *pSBModule = 0,
+const OUString *pSBLibrary = 0,
+const OUString *pSBModule = 0,
 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
 String *pNonConvertableChars = 0 );
 
diff --git a/svtools/source/svhtml/htmlout.cxx 
b/svtools/source/svhtml/htmlout.cxx
index 37e6ba5..75568ee 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -783,11 +783,11 @@ SvStream HTMLOutFuncs::Out_ImageMap( SvStream rStream,
 SvStream HTMLOutFuncs::OutScript( SvStream rStrm,
const String rBaseURL,
const String rSource,
-   const String rLanguage,
+   const OUString rLanguage,
ScriptType eScriptType,
const String rSrc,
-   const String *pSBLibrary,
-   const String *pSBModule,
+   const OUString *pSBLibrary,
+   const OUString *pSBModule,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars )
 {
@@ -799,7 +799,7 @@ SvStream HTMLOutFuncs::OutScript( SvStream rStrm,
 sOut.append('')
 .append(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_script));
 
-if( rLanguage.Len() )
+if( !rLanguage.isEmpty() )
 {
 sOut.append(' ')
 
.append(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_O_language))
diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index 59084b1..819b6ac 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -87,7 +87,7 @@ HTMLOutEvent aAnchorEventTable[] =
 
 static Writer OutHTML_SvxAdjust( Writer rWrt, const SfxPoolItem rHt );
 
-sal_uInt16 SwHTMLWriter::GetDefListLvl( const String rNm, sal_uInt16 nPoolId )
+sal_uInt16 SwHTMLWriter::GetDefListLvl( const OUString rNm, sal_uInt16 
nPoolId )
 {
 if( nPoolId == RES_POOLCOLL_HTML_DD )
 {
@@ -98,17 +98,16 @@ sal_uInt16 SwHTMLWriter::GetDefListLvl( const String rNm, 
sal_uInt16 nPoolId )
 return 1 | HTML_DLCOLL_DT;
 }
 
-String sDTDD( OUString(OOO_STRING_SVTOOLS_HTML_dt) );
-sDTDD += ' ';
-if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) )
+OUString sDTDD( OOO_STRING_SVTOOLS_HTML_dt );
+sDTDD +=  ;
+if( rNm.startsWith(sDTDD) )
 // DefinitionList - term
-return (sal_uInt16)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DT;
+return (sal_uInt16)rNm.copy( sDTDD.getLength() ).toInt32() | 
HTML_DLCOLL_DT;
 
-sDTDD.AssignAscii( OOO_STRING_SVTOOLS_HTML_dd );
-sDTDD += ' ';
-if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) )
+sDTDD = OUString( OOO_STRING_SVTOOLS_HTML_dd ) +  ;
+if( rNm.startsWith(sDTDD) )
 // DefinitionList - definition
-return (sal_uInt16)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DD;
+return (sal_uInt16)rNm.copy( sDTDD.getLength() ).toInt32() | 
HTML_DLCOLL_DD;
 
 return 0;
 }
@@ -529,7 +528,7 @@ void OutHTML_SwFmt( Writer rWrt, const SwFmt rFmt,