[Libreoffice-commits] .: Branch 'feature/line-numbers-in-basicIDE' - basctl/source

2011-11-16 Thread August Sodora
 basctl/source/basicide/baside2.cxx  |5 +
 basctl/source/basicide/baside2.hxx  |5 +
 basctl/source/basicide/baside2b.cxx |   30 ++
 basctl/source/basicide/basides1.cxx |2 +-
 4 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit 4a0a577c6198d207b18efa7aaeb7eb847ff7be2b
Author: August Sodora aug...@gmail.com
Date:   Wed Nov 16 16:45:38 2011 -0500

Finished making it possible to toggle line numbers in the basic ide

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 98e1b74..e449ba9 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1401,6 +1401,11 @@ sal_Bool ModulWindow::IsReadOnly()
 return bReadOnly;
 }
 
+void ModulWindow::SetLineNumberDisplay(bool b)
+{
+aXEditorWindow.SetLineNumberDisplay(b);
+}
+
 sal_Bool ModulWindow::IsPasteAllowed()
 {
 sal_Bool bPaste = sal_False;
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 1de34d7..48a65c9 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -290,6 +290,7 @@ private:
 LineNumberWindowaLineNumberWindow;
 EditorWindowaEdtWindow;
 ScrollBar   aEWVScrollBar;
+boolbLineNumberDisplay;
 
 virtual void DataChanged(DataChangedEvent const  rDCEvt);
 
@@ -304,6 +305,8 @@ public:
 LineNumberWindow   GetLineNumberWindow() { return aLineNumberWindow; }
 EditorWindow   GetEdtWindow()  { return aEdtWindow; }
 ScrollBar  GetEWVScrollBar()   { return aEWVScrollBar; }
+
+void SetLineNumberDisplay(bool b);
 };
 
 
@@ -365,6 +368,8 @@ public:
 virtual voidSetReadOnly( sal_Bool bReadOnly );
 virtual sal_BoolIsReadOnly();
 
+void SetLineNumberDisplay(bool);
+
 StarBASIC*  GetBasic() { XModule(); return xBasic; }
 
 SbModule*   GetSbModule() { return xModule; }
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index be08268..2a4d8ce 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1630,13 +1630,13 @@ ComplexEditorWindow::ComplexEditorWindow( ModulWindow* 
pParent ) :
 aBrkWindow( this ),
 aLineNumberWindow( this, pParent ),
 aEdtWindow( this ),
-aEWVScrollBar( this, WB_VSCROLL | WB_DRAG )
+aEWVScrollBar( this, WB_VSCROLL | WB_DRAG ),
+bLineNumberDisplay(false)
 {
 aEdtWindow.SetModulWindow( pParent );
 aBrkWindow.SetModulWindow( pParent );
 aEdtWindow.Show();
 aBrkWindow.Show();
-aLineNumberWindow.Show();
 
 aEWVScrollBar.SetLineSize( SCROLL_LINE );
 aEWVScrollBar.SetPageSize( SCROLL_PAGE );
@@ -1659,8 +1659,16 @@ void ComplexEditorWindow::Resize()
 Size aLnSz(aLineNumberWindow.GetWidth(), aSz.Height());
 aLineNumberWindow.SetPosSizePixel(Point(DWBORDER+aBrkSz.Width() - 1, 
DWBORDER), aLnSz);
 
-Size aEWSz(aSz.Width() - nBrkWidth - aLineNumberWindow.GetWidth() - 
nSBWidth + 2, aSz.Height());
-aEdtWindow.SetPosSizePixel( Point( 
DWBORDER+aBrkSz.Width()+aLnSz.Width()-1, DWBORDER ), aEWSz );
+if(bLineNumberDisplay)
+{
+Size aEWSz(aSz.Width() - nBrkWidth - aLineNumberWindow.GetWidth() - 
nSBWidth + 2, aSz.Height());
+aEdtWindow.SetPosSizePixel( Point( 
DWBORDER+aBrkSz.Width()+aLnSz.Width()-1, DWBORDER ), aEWSz );
+}
+else
+{
+Size aEWSz(aSz.Width() - nBrkWidth - nSBWidth + 1, aSz.Height());
+aEdtWindow.SetPosSizePixel(Point(DWBORDER + aBrkSz.Width() - 1, 
DWBORDER), aEWSz);
+}
 
 aEWVScrollBar.SetPosSizePixel( Point( aOutSz.Width()-DWBORDER-nSBWidth, 
DWBORDER ), Size( nSBWidth, aSz.Height() ) );
 }
@@ -1696,6 +1704,20 @@ void ComplexEditorWindow::DataChanged(DataChangedEvent 
const  rDCEvt)
 }
 }
 
+void ComplexEditorWindow::SetLineNumberDisplay(bool b)
+{
+if(b == bLineNumberDisplay)
+return;
+
+if(b)
+aLineNumberWindow.Show();
+else
+aLineNumberWindow.Hide();
+
+bLineNumberDisplay = b;
+Resize();
+}
+
 uno::Reference awt::XWindowPeer 
 EditorWindow::GetComponentInterface(sal_Bool bCreate)
 {
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index c10ff6d..7a500fe 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -113,7 +113,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest rReq )
 lcl_GetSourceLinesEnabledValue() = bValue;
 if ( pCurWin  pCurWin-IsA( TYPE( ModulWindow ) ) )
 {
-//(ModuleWindow*)(pCurWin)-SetLineNumberDisplay( bValue );
+dynamic_castModulWindow*(pCurWin)-SetLineNumberDisplay( 
bValue );
 }
 }
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo

[Libreoffice-commits] .: Branch 'feature/line-numbers-in-basicIDE' - basctl/source

2011-11-16 Thread August Sodora
 basctl/source/basicide/baside2b.cxx |7 +++-
 basctl/source/basicide/linenumberwindow.cxx |   44 +---
 basctl/source/basicide/linenumberwindow.hxx |8 -
 3 files changed, 53 insertions(+), 6 deletions(-)

New commits:
commit 3ee2d7b864fcf3364dbf1b8270b4aa176ff7d062
Author: August Sodora aug...@gmail.com
Date:   Thu Nov 17 00:19:47 2011 -0500

Fixed scrolling bug

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 2a4d8ce..a80e9e4 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -333,6 +333,7 @@ void EditorWindow::Resize()
 pEditView-SetStartDocPos( aStartDocPos );
 pEditView-ShowCursor();
 pModulWindow-GetBreakPointWindow().GetCurYOffset() = 
aStartDocPos.Y();
+pModulWindow-GetLineNumberWindow().GetCurYOffset() = 
aStartDocPos.Y();
 }
 InitScrollBars();
 if ( nVisY != pEditView-GetStartDocPos().Y() )
@@ -574,6 +575,7 @@ void EditorWindow::CreateEditEngine()
 pEditView-SetStartDocPos( Point( 0, 0 ) );
 pEditView-SetSelection( TextSelection() );
 pModulWindow-GetBreakPointWindow().GetCurYOffset() = 0;
+pModulWindow-GetLineNumberWindow().GetCurYOffset() = 0;
 pEditEngine-SetUpdateMode( sal_True );
 Update();   // has only been invalidated at UpdateMode = sal_True
 
@@ -661,7 +663,9 @@ void EditorWindow::Notify( SfxBroadcaster /*rBC*/, const 
SfxHint rHint )
 pModulWindow-GetEditVScrollBar().SetThumbPos( 
pEditView-GetStartDocPos().Y() );
 pModulWindow-GetBreakPointWindow().DoScroll
 ( 0, pModulWindow-GetBreakPointWindow().GetCurYOffset() - 
pEditView-GetStartDocPos().Y() );
-pModulWindow-GetLineNumberWindow().Invalidate();
+pModulWindow-GetLineNumberWindow().DoScroll
+( 0, pModulWindow-GetLineNumberWindow().GetCurYOffset() - 
pEditView-GetStartDocPos().Y() );
+pModulWindow-Invalidate();
 }
 else if( rTextHint.GetId() == TEXT_HINT_TEXTHEIGHTCHANGED )
 {
@@ -1681,6 +1685,7 @@ IMPL_LINK( ComplexEditorWindow, ScrollHdl, ScrollBar *, 
pCurScrollBar )
 long nDiff = aEdtWindow.GetEditView()-GetStartDocPos().Y() - 
pCurScrollBar-GetThumbPos();
 aEdtWindow.GetEditView()-Scroll( 0, nDiff );
 aBrkWindow.DoScroll( 0, nDiff );
+aLineNumberWindow.DoScroll(0, nDiff);
 aEdtWindow.GetEditView()-ShowCursor( sal_False, sal_True );
 pCurScrollBar-SetThumbPos( 
aEdtWindow.GetEditView()-GetStartDocPos().Y() );
 }
diff --git a/basctl/source/basicide/linenumberwindow.cxx 
b/basctl/source/basicide/linenumberwindow.cxx
index 5168da1..deba85d 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -7,7 +7,8 @@
 LineNumberWindow::LineNumberWindow( Window* pParent, ModulWindow* pModulWin ) :
   Window( pParent, WB_BORDER ),
   pModulWindow(pModulWin),
-  nWidth(1)
+  nWidth(1),
+  nCurYOffset(0)
 {
   SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor()));
 }
@@ -16,6 +17,9 @@ LineNumberWindow::~LineNumberWindow() { }
 
 void LineNumberWindow::Paint( const Rectangle )
 {
+  if(SyncYOffset())
+return;
+
   ExtTextEngine* txtEngine = pModulWindow-GetEditEngine();
   if(!txtEngine)
 return;
@@ -27,9 +31,9 @@ void LineNumberWindow::Paint( const Rectangle )
   GetParent()-Resize();
 
   ulong windowHeight = GetOutputSize().Height();
-  ulong startY = txtView-GetStartDocPos().Y();
   ulong nLineHeight = GetTextHeight();
 
+  ulong startY = txtView-GetStartDocPos().Y();
   ulong nStartLine = startY / nLineHeight + 1;
   ulong nEndLine = (startY + windowHeight) / nLineHeight + 1;
 
@@ -38,8 +42,9 @@ void LineNumberWindow::Paint( const Rectangle )
 
   nWidth = String::CreateFromInt64(nEndLine).Len() * 10;
 
-  for(ulong i = nStartLine, y = 0; i  nEndLine; ++i, y += nLineHeight)
-DrawText(Point(0, y), String::CreateFromInt64(i));
+  sal_Int64 y = (nStartLine - 1) * nLineHeight;
+  for(ulong i = nStartLine; i = nEndLine; ++i, y += nLineHeight)
+DrawText(Point(0, y - nCurYOffset), String::CreateFromInt64(i));
 }
 
 void LineNumberWindow::DataChanged(DataChangedEvent const  rDCEvt)
@@ -56,3 +61,34 @@ void LineNumberWindow::DataChanged(DataChangedEvent const  
rDCEvt)
 }
   }
 }
+
+void LineNumberWindow::DoScroll(long nHorzScroll, long nVertScroll)
+{
+  nCurYOffset -= nVertScroll;
+  Window::Scroll(nHorzScroll, nVertScroll);
+}
+
+long LineNumberWindow::GetCurYOffset()
+{
+  return nCurYOffset;
+}
+
+bool LineNumberWindow::SyncYOffset()
+{
+  TextView* pView = pModulWindow-GetEditView();
+  if (!pView)
+return false;
+
+  long nViewYOffset = pView-GetStartDocPos().Y();
+  if (nCurYOffset == nViewYOffset)
+return false;
+
+  nCurYOffset = nViewYOffset;
+  Invalidate();
+  return true;
+}
+
+ulong LineNumberWindow::GetWidth()
+{
+  return (nWidth  20 ? 20

[Libreoffice-commits] .: Branch 'feature/line-numbers-in-basicIDE' - basctl/source

2011-11-16 Thread August Sodora
 basctl/source/basicide/baside2b.cxx |   42 +++-
 1 file changed, 18 insertions(+), 24 deletions(-)

New commits:
commit d78f9e76e9bf1d14ef1d087ade0de8c4ec58329e
Author: August Sodora aug...@gmail.com
Date:   Thu Nov 17 00:42:15 2011 -0500

Removed unused includes

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index a80e9e4..1fb174a 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -29,44 +29,38 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include precompiled_basctl.hxx
 
-#include vector
 #define _BASIC_TEXTPORTIONS
-#include basic/sbdef.hxx
-#include ide_pch.hxx
 
+#include helpid.hrc
+#include baside2.hrc
 
-#include tools/urlobj.hxx
-#include unotools/charclass.hxx
-#include svl/urihelper.hxx
-#include basic/sbx.hxx
+#include baside2.hxx
+#include basobj.hxx
+#include brkdlg.hxx
+#include iderdll.hxx
+#include iderdll2.hxx
+#include objdlg.hxx
+
+#include basic/sbmeth.hxx
+#include basic/sbuno.hxx
+#include com/sun/star/script/XLibraryContainer2.hpp
+#include comphelper/processfactory.hxx
+#include comphelper/string.hxx
+#include sfx2/dispatch.hxx
+#include sfx2/viewfrm.hxx
+#include vcl/msgbox.hxx
 #include vcl/sound.hxx
+#include svl/urihelper.hxx
 #include svtools/xtextedt.hxx
 #include svtools/txtattr.hxx
 #include svtools/textwindowpeer.hxx
-#include basic/sbuno.hxx
-
-#include helpid.hrc
-#include baside2.hrc
-#include baside2.hxx
-#include brkdlg.hxx
-#include objdlg.hxx
-#include basobj.hxx
-#include iderdll.hxx
-#include iderdll2.hxx
 #include vcl/taskpanelist.hxx
 #include vcl/help.hxx
-
 #include unotools/sourceviewconfig.hxx
 
-#include com/sun/star/script/XLibraryContainer2.hpp
-#include comphelper/processfactory.hxx
-#include comphelper/string.hxx
-
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
-
 long nVirtToolBoxHeight;// inited in WatchWindow, used in Stackwindow
 long nHeaderBarHeight;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-11-17 Thread August Sodora
 basic/source/comp/scanner.cxx |   13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

New commits:
commit f3098a52b93fe25af34e7edd5104c4e47370cfac
Author: August Sodora aug...@gmail.com
Date:   Thu Nov 17 23:06:47 2011 -0500

Removed unused headers

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 91f4a04..4305e8a 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -30,19 +30,8 @@
 #include precompiled_basic.hxx
 
 #include sbcomp.hxx
-#include stdio.h
-#include string.h
-#include ctype.h
-#if defined UNX
-#include stdlib.h
-#else
-#include math.h   // atof()
-#endif
-#include rtl/math.hxx
-#include vcl/svapp.hxx
-#include unotools/charclass.hxx
 
-#include runtime.hxx
+#include vcl/svapp.hxx
 
 SbiScanner::SbiScanner( const ::rtl::OUString rBuf, StarBASIC* p ) : aBuf( 
rBuf )
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/qa basic/source

2011-11-17 Thread August Sodora
 basic/qa/cppunit/test_scanner.cxx |   50 ++
 basic/source/comp/scanner.cxx |   22 +++-
 2 files changed, 65 insertions(+), 7 deletions(-)

New commits:
commit c8f0503a1b2ab399468125288803d16802064c94
Author: August Sodora aug...@gmail.com
Date:   Fri Nov 18 01:20:36 2011 -0500

Cleanup GetSuffixType in basic scanner

diff --git a/basic/qa/cppunit/test_scanner.cxx 
b/basic/qa/cppunit/test_scanner.cxx
index 25f5147..dd46b7a 100644
--- a/basic/qa/cppunit/test_scanner.cxx
+++ b/basic/qa/cppunit/test_scanner.cxx
@@ -36,6 +36,7 @@ namespace
 void testGoto();
 void testExclamation();
 void testNumbers();
+void testDataType();
 
 // Adds code needed to register the test suite
 CPPUNIT_TEST_SUITE(ScannerTest);
@@ -48,6 +49,7 @@ namespace
 CPPUNIT_TEST(testGoto);
 CPPUNIT_TEST(testExclamation);
 CPPUNIT_TEST(testNumbers);
+CPPUNIT_TEST(testDataType);
 
 // End of test suite definition
 CPPUNIT_TEST_SUITE_END();
@@ -564,6 +566,54 @@ namespace
 CPPUNIT_ASSERT(symbols[1].text == cr);
   }
 
+  void ScannerTest::testDataType()
+  {
+const rtl::OUString source1(RTL_CONSTASCII_USTRINGPARAM(asdf%));
+const rtl::OUString source2(RTL_CONSTASCII_USTRINGPARAM(asdf));
+const rtl::OUString source3(RTL_CONSTASCII_USTRINGPARAM(asdf!));
+const rtl::OUString source4(RTL_CONSTASCII_USTRINGPARAM(asdf#));
+const rtl::OUString source5(RTL_CONSTASCII_USTRINGPARAM(asdf@));
+const rtl::OUString source6(RTL_CONSTASCII_USTRINGPARAM(asdf$));
+const rtl::OUString source7(RTL_CONSTASCII_USTRINGPARAM(asdf ));
+
+std::vectorSymbol symbols;
+
+symbols = getSymbols(source1);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER);
+CPPUNIT_ASSERT(symbols[1].text == cr);
+
+symbols = getSymbols(source2);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].type == SbxLONG);
+CPPUNIT_ASSERT(symbols[1].text == cr);
+
+symbols = getSymbols(source3);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].type == SbxSINGLE);
+CPPUNIT_ASSERT(symbols[1].text == cr);
+
+symbols = getSymbols(source4);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE);
+CPPUNIT_ASSERT(symbols[1].text == cr);
+
+symbols = getSymbols(source5);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].type == SbxCURRENCY);
+CPPUNIT_ASSERT(symbols[1].text == cr);
+
+symbols = getSymbols(source6);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].type == SbxSTRING);
+CPPUNIT_ASSERT(symbols[1].text == cr);
+
+symbols = getSymbols(source7);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT);
+CPPUNIT_ASSERT(symbols[1].text == cr);
+  }
+
   // Put the test suite in the registry
   CPPUNIT_TEST_SUITE_REGISTRATION(ScannerTest);
 } // namespace
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 4305e8a..3c2ec97 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -125,17 +125,25 @@ sal_Bool SbiScanner::DoesColonFollow()
 }
 
 // test for legal suffix
-
 static SbxDataType GetSuffixType( sal_Unicode c )
 {
-static String aSuffixesStr = String::CreateFromAscii( %!#@ $ );
-if( c )
+switch (c)
 {
-sal_uInt32 n = aSuffixesStr.Search( c );
-if( STRING_NOTFOUND != n  c != ' ' )
-return SbxDataType( (sal_uInt16) n + SbxINTEGER );
+case '%':
+return SbxDataType(SbxINTEGER);
+case '':
+return SbxDataType(SbxLONG);
+case '!':
+return SbxDataType(SbxSINGLE);
+case '#':
+return SbxDataType(SbxDOUBLE);
+case '@':
+return SbxDataType(SbxCURRENCY);
+case '$':
+return SbxDataType(SbxSTRING);
+default:
+return SbxDataType(SbxVARIANT);
 }
-return SbxVARIANT;
 }
 
 // reading the next symbol into the variables aSym, nVal and eType
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-11-17 Thread August Sodora
 basic/source/comp/scanner.cxx |   53 +-
 basic/source/inc/scanner.hxx  |   34 +-
 2 files changed, 44 insertions(+), 43 deletions(-)

New commits:
commit 2edba1241274cc5eec1c9a5c440a15f8bda62aa6
Author: August Sodora aug...@gmail.com
Date:   Fri Nov 18 01:53:30 2011 -0500

sal_Bool to bool

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 3c2ec97..5d1f36b 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -80,14 +80,14 @@ void SbiScanner::GenError( SbError code )
 {
 if( GetSbData()-bBlockCompilerError )
 {
-bAbort = sal_True;
+bAbort = true;
 return;
 }
 if( !bError  bErrors )
 {
-sal_Bool bRes = sal_True;
+bool bRes = true;
 // report only one error per statement
-bError = sal_True;
+bError = true;
 if( pBasic )
 {
 // in case of EXPECTED or UNEXPECTED it always refers
@@ -114,14 +114,15 @@ void SbiScanner::GenError( SbError code )
 
 
 // used by SbiTokenizer::MayBeLabel() to detect a label
-
-sal_Bool SbiScanner::DoesColonFollow()
+bool SbiScanner::DoesColonFollow()
 {
 if( pLine  *pLine == ':' )
 {
-pLine++; nCol++; return sal_True;
+pLine++; nCol++;
+return true;
 }
-else return sal_False;
+else
+return false;
 }
 
 // test for legal suffix
@@ -160,19 +161,19 @@ inline bool lclIsWhitespace( sal_Unicode cChar )
 
 } // namespace
 
-sal_Bool SbiScanner::NextSym()
+bool SbiScanner::NextSym()
 {
 // memorize for the EOLN-case
 sal_uInt16 nOldLine = nLine;
 sal_uInt16 nOldCol1 = nCol1;
 sal_uInt16 nOldCol2 = nCol2;
 sal_Unicode buf[ BUF_SIZE ], *p = buf;
-bHash = sal_False;
+bHash = false;
 
 eScanType = SbxVARIANT;
 aSym = ::rtl::OUString();
 bSymbol =
-bNumber = bSpaces = sal_False;
+bNumber = bSpaces = false;
 
 // read in line?
 if( !pLine )
@@ -180,7 +181,7 @@ sal_Bool SbiScanner::NextSym()
 sal_Int32 n = nBufPos;
 sal_Int32 nLen = aBuf.getLength();
 if( nBufPos = nLen )
-return sal_False;
+return false;
 const sal_Unicode* p2 = aBuf.getStr();
 p2 += n;
 while( ( n  nLen )  ( *p2 != '\n' )  ( *p2 != '\r' ) )
@@ -206,7 +207,7 @@ sal_Bool SbiScanner::NextSym()
 
 
 while( lclIsWhitespace( *pLine ) )
-pLine++, nCol++, bSpaces = sal_True;
+pLine++, nCol++, bSpaces = true;
 
 nCol1 = nCol;
 
@@ -221,7 +222,7 @@ sal_Bool SbiScanner::NextSym()
 {
 pLine++;
 nCol++;
-bHash = sal_True;
+bHash = true;
 }
 
 // copy character if symbol
@@ -231,7 +232,7 @@ sal_Bool SbiScanner::NextSym()
 if( *pLine == '_'  !*(pLine+1) )
 {   pLine++;
 goto eoln;  }
-bSymbol = sal_True;
+bSymbol = true;
 short n = nCol;
 for ( ; (BasicSimpleCharClass::isAlphaNumeric( *pLine, bCompatible ) 
|| ( *pLine == '_' ) ); pLine++ )
 nCol++;
@@ -296,13 +297,13 @@ sal_Bool SbiScanner::NextSym()
 short ndig = 0;
 short ncdig = 0;
 eScanType = SbxDOUBLE;
-sal_Bool bBufOverflow = sal_False;
+bool bBufOverflow = false;
 while( strchr( 0123456789.DEde, *pLine )  *pLine )
 {
 // from 4.1.1996: buffer full? - go on scanning empty
 if( (p-buf) == (BUF_SIZE-1) )
 {
-bBufOverflow = sal_True;
+bBufOverflow = true;
 pLine++, nCol++;
 continue;
 }
@@ -337,7 +338,7 @@ sal_Bool SbiScanner::NextSym()
 if (!exp) ndig++;
 }
 *p = 0;
-aSym = p; bNumber = sal_True;
+aSym = p; bNumber = true;
 
 if( comma  1 || exp  1 )
 {   aError = '.';
@@ -390,10 +391,10 @@ sal_Bool SbiScanner::NextSym()
 aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM());
 return SYMBOL;
 }
-bNumber = sal_True;
+bNumber = true;
 long l = 0;
 int i;
-sal_Bool bBufOverflow = sal_False;
+bool bBufOverflow = false;
 while( BasicSimpleCharClass::isAlphaNumeric( *pLine  0xFF, 
bCompatible ) )
 {
 sal_Unicode ch = sal::static_int_cast sal_Unicode (
@@ -401,7 +402,7 @@ sal_Bool SbiScanner::NextSym()
 pLine++; nCol++;
 // from 4.1.1996: buffer full, go on scanning empty
 if( (p-buf) == (BUF_SIZE-1) )
-bBufOverflow = sal_True;
+bBufOverflow = true;
 else if( String( cmp ).Search( ch ) != STRING_NOTFOUND )
 //else if( strchr( cmp, ch ) )
 *p++ = ch;
@@ -434,7 +435,7 @@ sal_Bool SbiScanner::NextSym()
 {
 sal_Unicode cSep = *pLine;
 if( cSep == '[' )
-bSymbol = sal_True

[Libreoffice-commits] Changes to 'refs/remotes/origin/master'

2011-11-18 Thread August Sodora

___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'refs/remotes/origin/master' - sc/source

2011-11-18 Thread August Sodora
 sc/source/ui/cctrl/checklistmenu.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit ac4b051e3247ccc9dfc40ca0699537ce4256de35
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Fri Nov 18 21:38:09 2011 -0500

Check the empty set state after launching.

Sometimes we get empty set especially when all rows are filtered out.

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index e96e6d4..9b23197 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1220,6 +1220,10 @@ void ScCheckListMenuWindow::getResult(ResultType 
rResult)
 void ScCheckListMenuWindow::launch(const Rectangle rRect)
 {
 packWindow();
+if (!maConfig.mbAllowEmptySet)
+// We need to have at least one member selected.
+maBtnOk.Enable(maChecks.GetCheckedEntryCount() != 0);
+
 StartPopupMode(rRect, (FLOATWIN_POPUPMODE_DOWN | 
FLOATWIN_POPUPMODE_GRABFOCUS));
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basic/source

2011-11-18 Thread August Sodora
 basic/source/comp/scanner.cxx |   39 +++
 basic/source/inc/scanner.hxx  |2 ++
 2 files changed, 21 insertions(+), 20 deletions(-)

New commits:
commit 76f4712c7d1382752edfc153e3879fb447e70db5
Author: August Sodora aug...@gmail.com
Date:   Fri Nov 18 21:35:01 2011 -0500

Remove uses of pLine in scanner

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 2b594de..09e96bc 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -163,21 +163,17 @@ inline bool lclIsWhitespace( sal_Unicode cChar )
 
 void SbiScanner::scanGoto()
 {
-const sal_Unicode* pTestLine = pLine;
 short nTestCol = nCol;
-while( lclIsWhitespace( *pTestLine ) )
-{
-pTestLine++;
+while(nTestCol  aLine.getLength()  lclIsWhitespace(aLine[nTestCol]))
 nTestCol++;
-}
 
-if( *pTestLine  *(pTestLine + 1) )
+if(nTestCol + 1  aLine.getLength())
 {
-String aTestSym = aLine.copy( nTestCol, 2 );
-if( aTestSym.EqualsIgnoreCaseAscii( to ) )
+::rtl::OUString aTestSym = aLine.copy(nTestCol, 2);
+
if(aTestSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(to)))
 {
-aSym = String::CreateFromAscii( goto );
-pLine = pTestLine + 2;
+aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(goto));
+pLine = pLine + (nCol - nTestCol) + 2;
 nCol = nTestCol + 2;
 }
 }
commit 53a662f53055ea5f262d7e0358d1346bab7f353d
Author: August Sodora aug...@gmail.com
Date:   Fri Nov 18 21:27:44 2011 -0500

Refactoring in scanner

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 5d1f36b..2b594de 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -161,6 +161,28 @@ inline bool lclIsWhitespace( sal_Unicode cChar )
 
 } // namespace
 
+void SbiScanner::scanGoto()
+{
+const sal_Unicode* pTestLine = pLine;
+short nTestCol = nCol;
+while( lclIsWhitespace( *pTestLine ) )
+{
+pTestLine++;
+nTestCol++;
+}
+
+if( *pTestLine  *(pTestLine + 1) )
+{
+String aTestSym = aLine.copy( nTestCol, 2 );
+if( aTestSym.EqualsIgnoreCaseAscii( to ) )
+{
+aSym = String::CreateFromAscii( goto );
+pLine = pTestLine + 2;
+nCol = nTestCol + 2;
+}
+}
+}
+
 bool SbiScanner::NextSym()
 {
 // memorize for the EOLN-case
@@ -240,26 +262,7 @@ bool SbiScanner::NextSym()
 
 // Special handling for go to
 if( bCompatible  *pLine  aSym.equalsIgnoreAsciiCaseAsciiL( 
RTL_CONSTASCII_STRINGPARAM(go) ) )
-{
-const sal_Unicode* pTestLine = pLine;
-short nTestCol = nCol;
-while( lclIsWhitespace( *pTestLine ) )
-{
-pTestLine++;
-nTestCol++;
-}
-
-if( *pTestLine  *(pTestLine + 1) )
-{
-String aTestSym = aLine.copy( nTestCol, 2 );
-if( aTestSym.EqualsIgnoreCaseAscii( to ) )
-{
-aSym = String::CreateFromAscii( goto );
-pLine = pTestLine + 2;
-nCol = nTestCol + 2;
-}
-}
-}
+scanGoto();
 
 // replace closing '_' by space when end of line is following
 // (wrong line continuation otherwise)
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index c96387e..e98ebc3 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -45,6 +45,8 @@ class SbiScanner
 ::rtl::OUString   aLine;
 const sal_Unicode* pLine;
 const sal_Unicode* pSaveLine;
+
+void scanGoto();
 protected:
 ::rtl::OUString aSym;
 String aError;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/qa

2011-11-19 Thread August Sodora
 basic/qa/cppunit/test_scanner.cxx |   31 ++-
 1 file changed, 30 insertions(+), 1 deletion(-)

New commits:
commit b97774aefa122aebf20de4208a820953c39172b1
Author: August Sodora aug...@gmail.com
Date:   Sun Nov 20 00:44:53 2011 -0500

Added regression test for scanner

diff --git a/basic/qa/cppunit/test_scanner.cxx 
b/basic/qa/cppunit/test_scanner.cxx
index dd46b7a..95bbb47 100644
--- a/basic/qa/cppunit/test_scanner.cxx
+++ b/basic/qa/cppunit/test_scanner.cxx
@@ -34,6 +34,7 @@ namespace
 void testAlphanum();
 void testComments();
 void testGoto();
+void testGotoCompatible();
 void testExclamation();
 void testNumbers();
 void testDataType();
@@ -47,6 +48,7 @@ namespace
 CPPUNIT_TEST(testAlphanum);
 CPPUNIT_TEST(testComments);
 CPPUNIT_TEST(testGoto);
+CPPUNIT_TEST(testGotoCompatible);
 CPPUNIT_TEST(testExclamation);
 CPPUNIT_TEST(testNumbers);
 CPPUNIT_TEST(testDataType);
@@ -62,10 +64,11 @@ namespace
   const static rtl::OUString goto_(RTL_CONSTASCII_USTRINGPARAM(goto));
   const static rtl::OUString excl(RTL_CONSTASCII_USTRINGPARAM(!));
 
-  std::vectorSymbol getSymbols(const rtl::OUString source)
+  std::vectorSymbol getSymbols(const rtl::OUString source, bool bCompatible 
= false)
   {
 std::vectorSymbol symbols;
 SbiScanner scanner(source);
+scanner.SetCompatible(bCompatible);
 while(scanner.NextSym())
 {
   Symbol symbol;
@@ -449,6 +452,32 @@ namespace
 CPPUNIT_ASSERT(symbols[3].type == SbxVARIANT);
   }
 
+  void ScannerTest::testGotoCompatible()
+  {
+const rtl::OUString source1(RTL_CONSTASCII_USTRINGPARAM(goto));
+const rtl::OUString source2(RTL_CONSTASCII_USTRINGPARAM(go  to));
+const rtl::OUString source3(RTL_CONSTASCII_USTRINGPARAM(go\nto));
+
+std::vectorSymbol symbols;
+
+symbols = getSymbols(source1, true);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].text == goto_);
+CPPUNIT_ASSERT(symbols[1].text == cr);
+
+symbols = getSymbols(source2, true);
+CPPUNIT_ASSERT(symbols.size() == 2);
+CPPUNIT_ASSERT(symbols[0].text == rtl::OUString(goto_));
+CPPUNIT_ASSERT(symbols[1].text == cr);
+
+symbols = getSymbols(source3, true);
+CPPUNIT_ASSERT(symbols.size() == 4);
+CPPUNIT_ASSERT(symbols[0].text == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(go)));
+CPPUNIT_ASSERT(symbols[1].text == cr);
+CPPUNIT_ASSERT(symbols[2].text == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(to)));
+CPPUNIT_ASSERT(symbols[3].text == cr);
+  }
+
   void ScannerTest::testExclamation()
   {
 const rtl::OUString source1(RTL_CONSTASCII_USTRINGPARAM(asdf!asdf));
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-11-20 Thread August Sodora
 basic/source/comp/basiccharclass.cxx |  139 +++
 basic/source/inc/basiccharclass.hxx  |   51 
 2 files changed, 190 insertions(+)

New commits:
commit 25ade2f357f1cedf76919f61ae8d81fda7bdf88d
Author: August Sodora aug...@gmail.com
Date:   Sun Nov 20 17:15:33 2011 -0500

Refactor BasicCharClass out from scanner and make it a singleton

diff --git a/basic/source/comp/basiccharclass.cxx 
b/basic/source/comp/basiccharclass.cxx
new file mode 100644
index 000..eb11a39
--- /dev/null
+++ b/basic/source/comp/basiccharclass.cxx
@@ -0,0 +1,139 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * http://www.openoffice.org/license.html
+ * for a copy of the LGPLv3 License.
+ *
+ /
+
+#include basiccharclass.hxx
+
+#include unotools/charclass.hxx
+#include vcl/svapp.hxx
+
+BasicCharClass::BasicCharClass()
+{
+  for( sal_uInt16 i = 0; i  256; ++i )
+IsLetterTab[i] = false;
+
+  IsLetterTab[0xC0] = true;   // À , CAPITAL LETTER A WITH GRAVE ACCENT
+  IsLetterTab[0xC1] = true;   // Á , CAPITAL LETTER A WITH ACUTE ACCENT
+  IsLetterTab[0xC2] = true;   // Â , CAPITAL LETTER A WITH CIRCUMFLEX ACCENT
+  IsLetterTab[0xC3] = true;   // Ã , CAPITAL LETTER A WITH TILDE
+  IsLetterTab[0xC4] = true;   // Ä , CAPITAL LETTER A WITH DIAERESIS
+  IsLetterTab[0xC5] = true;   // Å , CAPITAL LETTER A WITH RING ABOVE
+  IsLetterTab[0xC6] = true;   // Æ , CAPITAL LIGATURE AE
+  IsLetterTab[0xC7] = true;   // Ç , CAPITAL LETTER C WITH CEDILLA
+  IsLetterTab[0xC8] = true;   // È , CAPITAL LETTER E WITH GRAVE ACCENT
+  IsLetterTab[0xC9] = true;   // É , CAPITAL LETTER E WITH ACUTE ACCENT
+  IsLetterTab[0xCA] = true;   // Ê , CAPITAL LETTER E WITH CIRCUMFLEX ACCENT
+  IsLetterTab[0xCB] = true;   // Ë , CAPITAL LETTER E WITH DIAERESIS
+  IsLetterTab[0xCC] = true;   // Ì , CAPITAL LETTER I WITH GRAVE ACCENT
+  IsLetterTab[0xCD] = true;   // Í , CAPITAL LETTER I WITH ACUTE ACCENT
+  IsLetterTab[0xCE] = true;   // Î , CAPITAL LETTER I WITH CIRCUMFLEX ACCENT
+  IsLetterTab[0xCF] = true;   // Ï , CAPITAL LETTER I WITH DIAERESIS
+  IsLetterTab[0xD0] = true;   // Ð , CAPITAL LETTER ETH
+  IsLetterTab[0xD1] = true;   // Ñ , CAPITAL LETTER N WITH TILDE
+  IsLetterTab[0xD2] = true;   // Ò , CAPITAL LETTER O WITH GRAVE ACCENT
+  IsLetterTab[0xD3] = true;   // Ó , CAPITAL LETTER O WITH ACUTE ACCENT
+  IsLetterTab[0xD4] = true;   // Ô , CAPITAL LETTER O WITH CIRCUMFLEX ACCENT
+  IsLetterTab[0xD5] = true;   // Õ , CAPITAL LETTER O WITH TILDE
+  IsLetterTab[0xD6] = true;   // Ö , CAPITAL LETTER O WITH DIAERESIS
+  IsLetterTab[0xD8] = true;   // Ø , CAPITAL LETTER O WITH STROKE
+  IsLetterTab[0xD9] = true;   // Ù , CAPITAL LETTER U WITH GRAVE ACCENT
+  IsLetterTab[0xDA] = true;   // Ú , CAPITAL LETTER U WITH ACUTE ACCENT
+  IsLetterTab[0xDB] = true;   // Û , CAPITAL LETTER U WITH CIRCUMFLEX ACCENT
+  IsLetterTab[0xDC] = true;   // Ü , CAPITAL LETTER U WITH DIAERESIS
+  IsLetterTab[0xDD] = true;   // Ý , CAPITAL LETTER Y WITH ACUTE ACCENT
+  IsLetterTab[0xDE] = true;   // Þ , CAPITAL LETTER THORN
+  IsLetterTab[0xDF] = true;   // ß , SMALL LETTER SHARP S
+  IsLetterTab[0xE0] = true;   // à , SMALL LETTER A WITH GRAVE ACCENT
+  IsLetterTab[0xE1] = true;   // á , SMALL LETTER A WITH ACUTE ACCENT
+  IsLetterTab[0xE2] = true;   // â , SMALL LETTER A WITH CIRCUMFLEX ACCENT
+  IsLetterTab[0xE3] = true;   // ã , SMALL LETTER A WITH TILDE
+  IsLetterTab[0xE4] = true;   // ä , SMALL LETTER A WITH DIAERESIS
+  IsLetterTab[0xE5] = true;   // å , SMALL LETTER A WITH RING ABOVE
+  IsLetterTab[0xE6] = true;   // æ , SMALL LIGATURE AE
+  IsLetterTab[0xE7] = true;   // ç , SMALL LETTER C WITH CEDILLA
+  IsLetterTab[0xE8] = true;   // è , SMALL LETTER E WITH GRAVE ACCENT
+  IsLetterTab[0xE9] = true;   // é , SMALL LETTER E WITH ACUTE ACCENT
+  IsLetterTab[0xEA] = true;   // ê , SMALL

[Libreoffice-commits] .: sw/source

2011-11-20 Thread August Sodora
 sw/source/filter/html/parcss1.hxx |8 
 1 file changed, 8 deletions(-)

New commits:
commit 58b1a6ccc64d08a8a2c63071c0081883648cd6cb
Author: August Sodora aug...@gmail.com
Date:   Sun Nov 20 22:48:30 2011 -0500

cppcheck: Unused private function 'CSS1Parser::SetLineNr'

diff --git a/sw/source/filter/html/parcss1.hxx 
b/sw/source/filter/html/parcss1.hxx
index 1bbcfae..f4a0474 100644
--- a/sw/source/filter/html/parcss1.hxx
+++ b/sw/source/filter/html/parcss1.hxx
@@ -233,7 +233,6 @@ class CSS1Parser
 
 sal_uInt32 IncLineNr() { return ++nlLineNr; }
 sal_uInt32 IncLinePos() { return ++nlLinePos; }
-inline sal_uInt32 SetLineNr( sal_uInt32 nlNum );// inline unten
 inline sal_uInt32 SetLinePos( sal_uInt32 nlPos );   // inline unten
 
 // Parsen von Teilen der Grammatik
@@ -276,13 +275,6 @@ public:
 inline sal_uInt32   GetLinePos() const  { return nlLinePos; }
 };
 
-inline sal_uInt32 CSS1Parser::SetLineNr( sal_uInt32 nlNum )
-{
-sal_uInt32 nlOld = nlLineNr;
-nlLineNr = nlNum;
-return nlOld;
-}
-
 inline sal_uInt32 CSS1Parser::SetLinePos( sal_uInt32 nlPos )
 {
 sal_uInt32 nlOld = nlLinePos;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2011-11-20 Thread August Sodora
 connectivity/source/drivers/dbase/dindexnode.cxx |   17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

New commits:
commit d46118d174c98fe24995c137e3db1bb9b0cfc09c
Author: August Sodora aug...@gmail.com
Date:   Sun Nov 20 22:55:43 2011 -0500

cppcheck: struct or union member 'NodeData::aDbl' is never used

diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx 
b/connectivity/source/drivers/dbase/dindexnode.cxx
index 83026f7..bccca3f 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -685,11 +685,8 @@ void ONDXNode::Read(SvStream rStream, ODbaseIndex rIndex)
 rStream  aChild;
 }
 
-union NodeData
-{
-double aDbl;
-char   aData[128];
-} aNodeData;
+char aData[128];
+
 //--
 void ONDXNode::Write(SvStream rStream, const ONDXPage rPage) const
 {
@@ -703,22 +700,22 @@ void ONDXNode::Write(SvStream rStream, const ONDXPage 
rPage) const
 {
 if (aKey.getValue().isNull())
 {
-memset(aNodeData.aData,0,rIndex.getHeader().db_keylen);
-
rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen);
+memset(aData,0,rIndex.getHeader().db_keylen);
+rStream.Write((sal_uInt8*)aData,rIndex.getHeader().db_keylen);
 }
 else
 rStream  (double) aKey.getValue();
 }
 else
 {
-memset(aNodeData.aData,0x20,rIndex.getHeader().db_keylen);
+memset(aData,0x20,rIndex.getHeader().db_keylen);
 if (!aKey.getValue().isNull())
 {
 ::rtl::OUString sValue = aKey.getValue();
 ByteString aText(sValue.getStr(), 
rIndex.m_pTable-getConnection()-getTextEncoding());
-
strncpy(aNodeData.aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen,
 aText.Len()));
+
strncpy(aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, 
aText.Len()));
 }
-
rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen);
+rStream.Write((sal_uInt8*)aData,rIndex.getHeader().db_keylen);
 }
 rStream  aChild;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-11-20 Thread August Sodora
 basic/source/comp/buffer.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit d71ffc855f02e186118c7e9ec59054e7aa0e4ecb
Author: August Sodora aug...@gmail.com
Date:   Sun Nov 20 23:26:31 2011 -0500

Remove unnecessary includes

diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 2e0fb54..218ce4f 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -29,9 +29,8 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include precompiled_basic.hxx
 
-#include sbcomp.hxx
 #include buffer.hxx
-#include string.h
+#include sbcomp.hxx
 
 const static sal_uInt32 UP_LIMIT=0xFF00L;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-11-20 Thread August Sodora
 basic/source/inc/symtbl.hxx |   15 +++
 1 file changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 7fc462044e6579aed96934d782e80d7a9e56f873
Author: August Sodora aug...@gmail.com
Date:   Sun Nov 20 23:32:13 2011 -0500

Remove unnecessary includes

diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index 60223ba..8e4540e 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -29,23 +29,14 @@
 #ifndef _SYMTBL_HXX
 #define _SYMTBL_HXX
 
-#include svl/svarray.hxx
-#include tools/string.hxx
-#include basic/sbxdef.hxx
-#include basic/sbdef.hxx
-
-class SbiSymDef;// base class
-class SbiProcDef;
 class SbiConstDef;
-class SbiSymPool;
-class SbiStringPool;
-
-class SvStream;
 class SbiParser;
+class SbiProcDef;
+class SbiStringPool;
+class SbiSymDef;// base class
 
 enum SbiSymScope { SbLOCAL, SbPARAM, SbPUBLIC, SbGLOBAL, SbRTL };
 
-
 // The string-pool collects string entries and
 // makes sure that they don't exist twice.
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-11-20 Thread August Sodora
 basic/source/comp/symtbl.cxx |   32 ++--
 basic/source/inc/symtbl.hxx  |   14 +++---
 2 files changed, 21 insertions(+), 25 deletions(-)

New commits:
commit ee3ad385fb3ca476e57e80d7b77c1e184e52e1d8
Author: August Sodora aug...@gmail.com
Date:   Sun Nov 20 23:44:21 2011 -0500

Convert to boost::ptr_vector

diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 4e6e932..22b31ea 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -34,7 +34,6 @@
 #include string.h
 #include ctype.h
 
-SV_IMPL_PTRARR(SbiStrings,String*)
 SV_IMPL_PTRARR(SbiSymbols,SbiSymDef*)
 
 // All symbol names are laid down int the symbol-pool's stringpool, so that
@@ -57,30 +56,27 @@ SbiStringPool::SbiStringPool( SbiParser* p )
 SbiStringPool::~SbiStringPool()
 {}
 
-
-const String SbiStringPool::Find( sal_uInt16 n ) const
+const rtl::OUString SbiStringPool::Find( sal_uInt32 n ) const
 {
-if( !n || n  aData.Count() )
-return aEmpty;
+if( n == 0 || n  aData.size() )
+return aEmpty; //hack, returning a reference to a simulation of null
 else
-return *aData.GetObject( n-1 );
+return aData[n - 1];
 }
 
-
-
-short SbiStringPool::Add( const String rVal, sal_Bool bNoCase )
+short SbiStringPool::Add( const rtl::OUString rVal, sal_Bool bNoCase )
 {
-sal_uInt16 n = aData.Count();
-for( sal_uInt16 i = 0; i  n; i++ )
+sal_uInt32 n = aData.size();
+for( sal_uInt32 i = 0; i  n; ++i )
 {
-String* p = aData.GetObject( i );
-if( (  bNoCase  p-Equals( rVal ) )
- || ( !bNoCase  p-EqualsIgnoreCaseAscii( rVal ) ) )
+rtl::OUString p = aData[i];
+if( (  bNoCase  p == rVal )
+|| ( !bNoCase  p.equalsIgnoreAsciiCase( rVal ) ) )
 return i+1;
 }
-const String* pNew = new String( rVal );
-aData.Insert( pNew, n++ );
-return (short) n;
+
+aData.push_back(new rtl::OUString(rVal));
+return (short) ++n;
 }
 
 short SbiStringPool::Add( double n, SbxDataType t )
@@ -94,7 +90,7 @@ short SbiStringPool::Add( double n, SbxDataType t )
 case SbxDOUBLE:  snprintf( buf, sizeof(buf), %.16g, n ); break;
 default: break;
 }
-return Add( String::CreateFromAscii( buf ) );
+return Add( rtl::OUString::createFromAscii( buf ) );
 }
 
 /***
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index 8e4540e..33da527 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -29,6 +29,8 @@
 #ifndef _SYMTBL_HXX
 #define _SYMTBL_HXX
 
+#include boost/ptr_container/ptr_vector.hpp
+
 class SbiConstDef;
 class SbiParser;
 class SbiProcDef;
@@ -40,21 +42,19 @@ enum SbiSymScope { SbLOCAL, SbPARAM, SbPUBLIC, SbGLOBAL, 
SbRTL };
 // The string-pool collects string entries and
 // makes sure that they don't exist twice.
 
-SV_DECL_PTRARR_DEL(SbiStrings,String*,5,5)
-
 class SbiStringPool {
-SbiStrings aData;
-String aEmpty;  // for convenience
+const rtl::OUString aEmpty;
+boost::ptr_vectorrtl::OUString aData;
 SbiParser* pParser;
 public:
 SbiStringPool( SbiParser* );
~SbiStringPool();
-sal_uInt16 GetSize() const { return aData.Count(); }
+sal_uInt32 GetSize() const { return aData.size(); }
 // From 8.4.1999: default changed to sal_True because of #64236 -
 // change it back to sal_False when the bug is cleanly removed.
-short Add( const String, sal_Bool=sal_True );
+short Add( const rtl::OUString, sal_Bool=sal_True );
 short Add( double, SbxDataType );
-const String Find( sal_uInt16 ) const;
+const rtl::OUString Find( sal_uInt32 ) const;
 SbiParser* GetParser() { return pParser; }
 };
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: framework/source

2011-11-21 Thread August Sodora
 framework/source/lomenubar/FrameJob.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 487968707f9ea36f3873a9349ebb87655f6abb3d
Author: August Sodora aug...@gmail.com
Date:   Mon Nov 21 19:56:51 2011 -0500

cppcheck: C-style pointer casting

diff --git a/framework/source/lomenubar/FrameJob.cxx 
b/framework/source/lomenubar/FrameJob.cxx
index 06af939..fd9d5da 100644
--- a/framework/source/lomenubar/FrameJob.cxx
+++ b/framework/source/lomenubar/FrameJob.cxx
@@ -153,7 +153,7 @@ on_registrar_available (GDBusConnection * /*connection*/,
 GError *error = NULL;
 GDBusProxy *proxy;
 
-FrameHelper *helper = (FrameHelper*)user_data;
+FrameHelper *helper = static_castFrameHelper*(user_data);
 unsigned long xid = helper-getXID();
 
 proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
@@ -207,7 +207,7 @@ on_registrar_unavailable (GDBusConnection * /*connection*/,
 //TODO: Unregister window?
 
 // Show menubar
-FrameHelper *helper = (FrameHelper*)user_data;
+FrameHelper *helper = static_castFrameHelper*(user_data);
 Reference  XFrame  xFrame  = helper-getFrame ();
 Reference XPropertySet  frameProps (xFrame, UNO_QUERY);
 Reference  XLayoutManager  
xLayoutManager(frameProps-getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(LayoutManager))),
@@ -343,8 +343,9 @@ FrameJob::getRootMenuitem (Reference  XMenu  xMenu, 
gpointer helper)
 {
 
 DbusmenuMenuitem *root = dbusmenu_menuitem_new_with_id (0);
-((FrameHelper*)helper)-setRootItem(root);
-((FrameHelper*)helper)-rebuildMenu (xMenu, root);
+FrameHelper* fHelper = static_castFrameHelper*(helper);
+fHelper-setRootItem(root);
+fHelper-rebuildMenu (xMenu, root);
 
 return root;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-11-21 Thread August Sodora
 basctl/source/basicide/basicbox.cxx |4 ++--
 basctl/source/basicide/baside2.hxx  |2 +-
 basctl/source/basicide/baside2b.cxx |   15 +++
 basctl/source/basicide/basobj2.cxx  |4 ++--
 basctl/source/basicide/moduldl2.cxx |2 +-
 5 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit ea1c1ad843d219bc2e6d99d72998eb8a00805493
Author: August Sodora aug...@gmail.com
Date:   Mon Nov 21 20:13:24 2011 -0500

cppcheck: C-style pointer casting

diff --git a/basctl/source/basicide/basicbox.cxx 
b/basctl/source/basicide/basicbox.cxx
index 2a5a7ca..7e20bca 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -328,7 +328,7 @@ void BasicLibBox::Select()
 void BasicLibBox::NotifyIDE()
 {
 sal_uInt16 nSelPos = GetSelectEntryPos();
-BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( nSelPos );
+BasicLibEntry* pEntry = static_castBasicLibEntry*(GetEntryData( nSelPos 
));
 if ( pEntry )
 {
 ScriptDocument aDocument( pEntry-GetDocument() );
@@ -352,7 +352,7 @@ void BasicLibBox::ClearBox()
 sal_uInt16 nCount = GetEntryCount();
 for ( sal_uInt16 i = 0; i  nCount; ++i )
 {
-BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( i );
+BasicLibEntry* pEntry = static_castBasicLibEntry*(GetEntryData( i ));
 delete pEntry;
 }
 ListBox::Clear();
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 48a65c9..ebf501e 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -148,7 +148,7 @@ public:
 EditorWindow( Window* pParent );
 ~EditorWindow();
 
-ExtTextEngine*  GetEditEngine() const   { return 
(ExtTextEngine*)pEditEngine; }
+ExtTextEngine*  GetEditEngine() const   { return pEditEngine; }
 ExtTextView*GetEditView() const { return pEditView; }
 ProgressInfo*   GetProgress() const { return pProgress; }
 
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 1fb174a..ac42db8 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -769,7 +769,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine )
 for ( size_t i = 0; i  aPortions.size(); i++ )
 {
 HighlightPortion r = aPortions[i];
-const Color rColor = 
((ModulWindowLayout*)pModulWindow-GetLayoutWindow())-getSyntaxColor(r.tokenType);
+const Color rColor = 
dynamic_castModulWindowLayout*(pModulWindow-GetLayoutWindow())-getSyntaxColor(r.tokenType);
 pEditEngine-SetAttrib( TextAttribFontColor( rColor ), nLine, 
r.nBegin, r.nEnd, sal_True );
 }
 
@@ -960,10 +960,10 @@ void BreakPointWindow::Paint( const Rectangle )
 Size aOutSz( GetOutputSize() );
 long nLineHeight = GetTextHeight();
 
-Image aBrk1(((ModulWindowLayout *) pModulWindow-GetLayoutWindow())-
-getImage(IMGID_BRKENABLED));
-Image aBrk0(((ModulWindowLayout *) pModulWindow-GetLayoutWindow())-
-getImage(IMGID_BRKDISABLED));
+ModulWindowLayout* pModulWindowLayout = 
dynamic_castModulWindowLayout*(pModulWindow-GetLayoutWindow());
+
+Image aBrk1(pModulWindowLayout-getImage(IMGID_BRKENABLED));
+Image aBrk0(pModulWindowLayout-getImage(IMGID_BRKDISABLED));
 Size aBmpSz( aBrk1.GetSizePixel() );
 aBmpSz = PixelToLogic( aBmpSz );
 Point aBmpOff( 0, 0 );
@@ -1009,9 +1009,8 @@ void BreakPointWindow::ShowMarker( sal_Bool bShow )
 Size aOutSz( GetOutputSize() );
 long nLineHeight = GetTextHeight();
 
-Image aMarker(((ModulWindowLayout*)pModulWindow-GetLayoutWindow())-
-  getImage(bErrorMarker
-   ? IMGID_ERRORMARKER : IMGID_STEPMARKER));
+ModulWindowLayout* pModulWindowLayout = 
dynamic_castModulWindowLayout*(pModulWindow-GetLayoutWindow());
+Image aMarker(pModulWindowLayout-getImage(bErrorMarker ? 
IMGID_ERRORMARKER : IMGID_STEPMARKER));
 
 Size aMarkerSz( aMarker.GetSizePixel() );
 aMarkerSz = PixelToLogic( aMarkerSz );
diff --git a/basctl/source/basicide/basobj2.cxx 
b/basctl/source/basicide/basobj2.cxx
index 7954b09..68a40f6 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -205,7 +205,7 @@ bool RenameModule( Window* pErrorParent, const 
ScriptDocument rDocument, const
 pWin-SetName( rNewName );
 
 // set new module in module window
-ModulWindow* pModWin = (ModulWindow*)pWin;
+ModulWindow* pModWin = dynamic_castModulWindow*(pWin);
 pModWin-SetSbModule( (SbModule*)pModWin-GetBasic()-FindModule( 
rNewName ) );
 
 // update tabwriter
@@ -308,7 +308,7 @@ namespace
 SbModule* pModule = pMethod-GetModule();
 ENSURE_OR_BREAK( pModule, BasicIDE::ChooseMacro: No Module 
found! );
 
-StarBASIC* pBasic = (StarBASIC

[Libreoffice-commits] .: basctl/source

2011-11-21 Thread August Sodora
 basctl/source/basicide/linenumberwindow.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit a7c455d10148f6562583f034147b600d61500af1
Author: August Sodora aug...@gmail.com
Date:   Mon Nov 21 20:15:25 2011 -0500

unused local variable

diff --git a/basctl/source/basicide/linenumberwindow.hxx 
b/basctl/source/basicide/linenumberwindow.hxx
index 39041b9..48c2414 100644
--- a/basctl/source/basicide/linenumberwindow.hxx
+++ b/basctl/source/basicide/linenumberwindow.hxx
@@ -38,7 +38,6 @@ private:
 ModulWindow* m_pModulWindow;
 int m_nWidth;
 long m_nCurYOffset;
-int m_nCharWidth;
 int m_nBaseWidth;
 virtual void DataChanged(DataChangedEvent const  rDCEvt);
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-11-21 Thread August Sodora
 basctl/source/dlged/dlgedobj.cxx |   33 ++---
 1 file changed, 10 insertions(+), 23 deletions(-)

New commits:
commit 59e4b21c6723066f30a1a34a8fd25eb01fb66fc4
Author: August Sodora aug...@gmail.com
Date:   Mon Nov 21 20:28:01 2011 -0500

Removed unnecessary includes

diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 11a892c..7b8bdc9 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -29,37 +29,25 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include precompiled_basctl.hxx
 
-#include vector
-#include dlgeddef.hxx
-#include dlgedobj.hxx
 #include dlged.hxx
-#include dlgedmod.hxx
+#include dlgeddef.hxx
+#include dlgedlist.hxx
+#include dlgedobj.hxx
 #include dlgedpage.hxx
 #include dlgedview.hxx
-#include dlgedlist.hxx
-#include iderid.hxx
-#include localizationmgr.hxx
+#include iderid.hxx
+#include localizationmgr.hxx
+
+#include dlgresid.hrc
 
-#include dlgresid.hrc
-#include tools/resmgr.hxx
-#include tools/shl.hxx
-#include unotools/sharedunocomponent.hxx
-#include com/sun/star/awt/XTabControllerModel.hpp
 #include com/sun/star/awt/XUnoControlContainer.hpp
 #include com/sun/star/awt/XVclContainerPeer.hpp
-#include com/sun/star/awt/XWindow.hpp
-#include com/sun/star/beans/XPropertySet.hpp
-#include com/sun/star/beans/PropertyAttribute.hpp
-#include com/sun/star/script/XScriptEventsSupplier.hpp
 #include com/sun/star/container/XContainer.hpp
 #include com/sun/star/lang/XServiceInfo.hpp
-#include comphelper/processfactory.hxx
-#include comphelper/types.hxx
-#include vcl/svapp.hxx
-
-#include algorithm
-#include functional
+#include com/sun/star/script/XScriptEventsSupplier.hpp
 #include o3tl/compat_functional.hxx
+#include unotools/sharedunocomponent.hxx
+#include vcl/svapp.hxx
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -68,7 +56,6 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::script;
 using ::rtl::OUString;
 
-
 TYPEINIT1(DlgEdObj, SdrUnoObj);
 DBG_NAME(DlgEdObj);
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-11-21 Thread August Sodora
 basctl/source/dlged/propbrw.cxx |   42 ++--
 1 file changed, 11 insertions(+), 31 deletions(-)

New commits:
commit 48ea07772907b7a6112b614b4f7216b357d6c43a
Author: August Sodora aug...@gmail.com
Date:   Mon Nov 21 20:36:23 2011 -0500

Removed unnecessary includes

diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index d192aba..50d5b03 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -29,42 +29,24 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include precompiled_basctl.hxx
 
-#include sal/macros.h
-#include propbrw.hxx
-#include dlgedobj.hxx
-
 #include basidesh.hxx
-#include iderid.hxx
-
-#include dlgresid.hrc
-#include tools/debug.hxx
-#include tools/diagnose_ex.h
-#include sfx2/bindings.hxx
-#include sfx2/childwin.hxx
-#include sfx2/objitem.hxx
+#include dlgedobj.hxx
+#include iderid.hxx
+#include propbrw.hxx
 
+#include dlgresid.hrc
 #include svx/svxids.hrc
-#include tools/shl.hxx
-#include vcl/stdtext.hxx
-#include svx/svdview.hxx
-#include svx/svdogrp.hxx
-#include svx/svdpage.hxx
-#include svx/svditer.hxx
-#include sfx2/viewsh.hxx
 
-#include toolkit/unohlp.hxx
-#include comphelper/property.hxx
-#include comphelper/stl_types.hxx
-#include comphelper/types.hxx
-#include com/sun/star/beans/PropertyValue.hpp
 #include com/sun/star/awt/PosSize.hpp
-#include com/sun/star/lang/XServiceInfo.hpp
 #include com/sun/star/inspection/XObjectInspector.hpp
-#include comphelper/processfactory.hxx
+#include com/sun/star/lang/XServiceInfo.hpp
+#include comphelper/types.hxx
 #include cppuhelper/component_context.hxx
-
-#include sfx2/dispatch.hxx
-#include sfx2/viewfrm.hxx
+#include svx/svditer.hxx
+#include svx/svdview.hxx
+#include toolkit/unohlp.hxx
+#include tools/diagnose_ex.h
+#include vcl/stdtext.hxx
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -74,10 +56,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace ::comphelper;
 
-
 SFX_IMPL_FLOATINGWINDOW(PropBrwMgr, SID_SHOW_PROPERTYBROWSER)
 
-
 PropBrwMgr::PropBrwMgr( Window* _pParent, sal_uInt16 nId,
 SfxBindings *pBindings, SfxChildWinInfo* pInfo)
   :SfxChildWindow( _pParent, nId )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basctl/source

2011-11-21 Thread August Sodora
 basctl/source/dlged/dlgedobj.cxx   |4 ++--
 basctl/source/dlged/managelang.cxx |   30 +++---
 basctl/source/dlged/propbrw.cxx|2 +-
 3 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit cbde0ff28bcf9cf0271324fae879df39c2710f48
Author: August Sodora aug...@gmail.com
Date:   Mon Nov 21 23:58:02 2011 -0500

String-OUString

diff --git a/basctl/source/dlged/managelang.cxx 
b/basctl/source/dlged/managelang.cxx
index f95bbb5..a286d7a 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -42,6 +42,7 @@
 
 #include com/sun/star/i18n/XBreakIterator.hpp
 #include com/sun/star/i18n/WordType.hpp
+#include comphelper/string.hxx
 #include editeng/unolingu.hxx
 #include sfx2/bindings.hxx
 #include svtools/langtab.hxx
@@ -63,7 +64,7 @@ bool localesAreEqual( const Locale rLocaleLeft, const 
Locale rLocaleRight )
 }
 
 namespace {
-long getLongestWordWidth( const String rText, const Window rWin )
+long getLongestWordWidth( const ::rtl::OUString rText, const Window rWin 
)
 {
 long nWidth = 0;
 Reference XBreakIterator  xBreakIter( 
vcl::unohelper::CreateBreakIterator() );
@@ -75,9 +76,7 @@ namespace {
 while ( aBoundary.startPos != aBoundary.endPos )
 {
 nStartPos = aBoundary.endPos;
-String sWord( rText.Copy(
-(sal_uInt16)aBoundary.startPos,
-(sal_uInt16)aBoundary.endPos - (sal_uInt16)aBoundary.startPos 
) );
+::rtl::OUString sWord(rText.copy(aBoundary.startPos, 
aBoundary.endPos - aBoundary.startPos));
 long nTemp = rWin.GetCtrlTextWidth( sWord );
 if ( nTemp  nWidth )
 nWidth = nTemp;
@@ -124,10 +123,10 @@ void ManageLanguageDialog::Init()
 {
 // get current IDE
 BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
-String sLibName = pIDEShell-GetCurLibName();
+::rtl::OUString sLibName = pIDEShell-GetCurLibName();
 // set dialog title with library name
-String sText = GetText();
-sText.SearchAndReplace( String::CreateFromAscii($1), sLibName );
+::rtl::OUString sText = GetText();
+::comphelper::string::replace(sText, 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM($1)), sLibName);
 SetText( sText );
 // set handler
 m_aAddPB.SetClickHdl( LINK( this, ManageLanguageDialog, AddHdl ) );
@@ -141,7 +140,7 @@ void ManageLanguageDialog::Init()
 
 void ManageLanguageDialog::CalcInfoSize()
 {
-String sInfoStr = m_aInfoFT.GetText();
+::rtl::OUString sInfoStr = m_aInfoFT.GetText();
 long nInfoWidth = m_aInfoFT.GetSizePixel().Width();
 long nLongWord = getLongestWordWidth( sInfoStr, m_aInfoFT );
 long nTxtWidth = m_aInfoFT.GetCtrlTextWidth( sInfoStr ) + nLongWord;
@@ -183,12 +182,13 @@ void ManageLanguageDialog::FillLanguageBox()
 {
 bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
 LanguageType eLangType = SvxLocaleToLanguage( pLocale[i] );
-String sLanguage = aLangTable.GetString( eLangType );
+::rtl::OUStringBuffer sLanguageBuf(aLangTable.GetString( eLangType 
));
 if ( bIsDefault )
 {
-sLanguage += ' ';
-sLanguage += m_sDefLangStr;
+sLanguageBuf.append(' ');
+sLanguageBuf.append(m_sDefLangStr);
 }
+::rtl::OUString sLanguage(sLanguageBuf.makeStringAndClear());
 sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage );
 m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, 
pLocale[i], bIsDefault ) );
 }
@@ -315,9 +315,9 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog( Window* 
pParent, Localizatio
 // change to Add Interface Language mode
 SetHelpId( HID_BASICIDE_ADDNEW_LANGUAGE );
 m_pCheckLangLB = new SvxCheckListBox( this, IDEResId( LB_ADD_LANGUAGE 
) );
-SetText( String( IDEResId( STR_ADDLANG_TITLE ) ) );
-m_aLanguageFT.SetText( String( IDEResId( STR_ADDLANG_LABEL ) ) );
-m_aInfoFT.SetText( String( IDEResId( STR_ADDLANG_INFO ) ) );
+SetText( ResId::toString( IDEResId( STR_ADDLANG_TITLE ) ) );
+m_aLanguageFT.SetText( ResId::toString( IDEResId( STR_ADDLANG_LABEL ) 
) );
+m_aInfoFT.SetText( ResId::toString( IDEResId( STR_ADDLANG_INFO ) ) );
 }
 
 FreeResource();
@@ -362,7 +362,7 @@ void SetDefaultLanguageDialog::FillLanguageBox()
 
 void SetDefaultLanguageDialog::CalcInfoSize()
 {
-String sInfoStr = m_aInfoFT.GetText();
+::rtl::OUString sInfoStr = m_aInfoFT.GetText();
 long nInfoWidth = m_aInfoFT.GetSizePixel().Width();
 long nLongWord = getLongestWordWidth( sInfoStr, m_aInfoFT );
 long nTxtWidth = m_aInfoFT.GetCtrlTextWidth( sInfoStr ) + nLongWord;
commit 89e27727c9b7cfd4e74a007a3390052cd1c13afb
Author: August Sodora aug...@gmail.com
Date:   Mon Nov 21 23:54:04 2011 -0500

String-OUString

[Libreoffice-commits] .: 2 commits - basctl/source

2011-11-21 Thread August Sodora
 basctl/source/accessibility/accessibledialogwindow.cxx |2 
 basctl/source/basicide/baside2.cxx |4 
 basctl/source/basicide/basides2.cxx|4 
 basctl/source/basicide/bastype2.cxx|   90 -
 basctl/source/basicide/bastype2.hxx|   48 -
 basctl/source/basicide/bastype3.cxx|7 -
 basctl/source/basicide/macrodlg.cxx|4 
 basctl/source/basicide/moduldlg.cxx|2 
 basctl/source/dlged/dlged.cxx  |6 -
 basctl/source/inc/bastypes.hxx |4 
 basctl/source/inc/dlged.hxx|4 
 11 files changed, 87 insertions(+), 88 deletions(-)

New commits:
commit 8061b40349c1251362c984b76aaa90b9510fba4f
Author: August Sodora aug...@gmail.com
Date:   Tue Nov 22 00:20:15 2011 -0500

String-OUString

diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx 
b/basctl/source/accessibility/accessibledialogwindow.cxx
index 8b4228f..3584e6e 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -243,7 +243,7 @@ sal_Bool AccessibleDialogWindow::IsChildVisible( const 
ChildDescriptor rDesc )
 const SdrLayer* pSdrLayer = rLayerAdmin.GetLayerPerID( 
nLayerId );
 if ( pSdrLayer )
 {
-String aLayerName = pSdrLayer-GetName();
+::rtl::OUString aLayerName = pSdrLayer-GetName();
 SdrView* pSdrView = m_pDialogWindow-GetView();
 if ( pSdrView  pSdrView-IsLayerVisible( aLayerName ) )
 {
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 101a8a8..8b57961 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1350,9 +1350,9 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor()
 uno::Reference container::XNameContainer  xLib = 
aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
 if( xLib.is() )
 {
-String sObjName;
+::rtl::OUString sObjName;
 ModuleInfoHelper::getObjectName( xLib, aModName, sObjName 
);
-if( sObjName.Len() )
+if( !sObjName.isEmpty() )
 {
 aModName.AppendAscii( 
().Append(sObjName).AppendAscii());
 }
diff --git a/basctl/source/basicide/basides2.cxx 
b/basctl/source/basicide/basides2.cxx
index 7754d9a..81e325c 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -248,9 +248,9 @@ ModulWindow* BasicIDEShell::CreateBasWin( const 
ScriptDocument rDocument, const
 {
 // display a nice friendly name in the ObjectModule tab,
 // combining the objectname and module name, e.g. Sheet1 ( Financials )
-String sObjName;
+::rtl::OUString sObjName;
 ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
-if( sObjName.Len() )
+if( !sObjName.isEmpty() )
 {
 aModName.AppendAscii( ().Append(sObjName).AppendAscii());
 }
diff --git a/basctl/source/basicide/bastype2.cxx 
b/basctl/source/basicide/bastype2.cxx
index 9820cc1..531dbbf 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -61,7 +61,7 @@
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
 
-void ModuleInfoHelper::getObjectName( const uno::Reference 
container::XNameContainer  rLib, const String rModName, String rObjName )
+void ModuleInfoHelper::getObjectName( const uno::Reference 
container::XNameContainer  rLib, const ::rtl::OUString rModName, 
::rtl::OUString rObjName )
 {
 try
 {
@@ -84,7 +84,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference 
container::XNameCont
 }
 }
 
-sal_Int32 ModuleInfoHelper::getModuleType(  const uno::Reference 
container::XNameContainer  rLib, const String rModName )
+sal_Int32 ModuleInfoHelper::getModuleType(  const uno::Reference 
container::XNameContainer  rLib, const ::rtl::OUString rModName )
 {
 sal_Int32 nType = script::ModuleType::NORMAL;
 uno::Reference script::vba::XVBAModuleInfo  xVBAModuleInfo( rLib, 
uno::UNO_QUERY );
@@ -112,7 +112,7 @@ BasicDocumentEntry::~BasicDocumentEntry()
 {
 }
 
-BasicLibEntry::BasicLibEntry( const ScriptDocument rDocument, LibraryLocation 
eLocation, const String rLibName, BasicEntryType eType )
+BasicLibEntry::BasicLibEntry( const ScriptDocument rDocument, LibraryLocation 
eLocation, const ::rtl::OUString rLibName, BasicEntryType eType )
 :BasicDocumentEntry( rDocument, eLocation, eType )
 ,m_aLibName( rLibName )
 {
@@ -129,7 +129,7 @@ BasicEntryDescriptor::BasicEntryDescriptor()
 {
 }
 
-BasicEntryDescriptor

[Libreoffice-commits] .: sw/source

2011-11-25 Thread August Sodora
 sw/source/ui/inc/tmplctrl.hxx  |1 -
 sw/source/ui/uno/swdetect.hxx  |1 -
 sw/source/ui/uno/unodoc.cxx|1 -
 sw/source/ui/vba/vbasystem.cxx |3 +--
 4 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 7d20dff1031b3c5325c09c541183131bdc15db57
Author: August Sodora aug...@gmail.com
Date:   Thu Nov 24 02:40:12 2011 -0500

Remove unnecessary tools/string includes

diff --git a/sw/source/ui/inc/tmplctrl.hxx b/sw/source/ui/inc/tmplctrl.hxx
index f0579d0..cc48a14 100644
--- a/sw/source/ui/inc/tmplctrl.hxx
+++ b/sw/source/ui/inc/tmplctrl.hxx
@@ -30,7 +30,6 @@
 
 // include ---
 #include sfx2/stbitem.hxx
-#include tools/string.hxx
 
 // class BookmarkToolBoxControl ---
 class SwTemplateControl : public SfxStatusBarControl
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index 124a443..1c72939 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -39,7 +39,6 @@
 #include com/sun/star/lang/XSingleServiceFactory.hpp
 #include cppuhelper/factory.hxx
 #include tools/link.hxx
-#include tools/string.hxx
 
 class SfxMedium;
 
diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx
index e85dfea..1b2d1fa 100644
--- a/sw/source/ui/uno/unodoc.cxx
+++ b/sw/source/ui/uno/unodoc.cxx
@@ -30,7 +30,6 @@
 #include precompiled_sw.hxx
 // System - Includes -
 
-#include tools/string.hxx
 #include sfx2/docfac.hxx
 #include sfx2/sfxmodelfactory.hxx
 #include swdll.hxx
diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx
index 4b5b5a6..d8be0e2 100644
--- a/sw/source/ui/vba/vbasystem.cxx
+++ b/sw/source/ui/vba/vbasystem.cxx
@@ -26,11 +26,10 @@
  *
  /
 #include vbasystem.hxx
-#include vbahelper/vbahelper.hxx
+
 #include ooo/vba/word/WdCursorType.hpp
 #include tools/diagnose_ex.h
 #include tools/config.hxx
-#include tools/string.hxx
 #include osl/file.hxx
 #include tools/urlobj.hxx
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-11-25 Thread August Sodora
 basic/source/comp/symtbl.cxx |2 +-
 basic/source/inc/symtbl.hxx  |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 0e8fd29c3139284fda47d6ea25b5661955ef
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 00:06:05 2011 -0500

Change boost::ptr_vector to std::vector

diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index c81a1f3..1aaeca4 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -75,7 +75,7 @@ short SbiStringPool::Add( const rtl::OUString rVal, sal_Bool 
bNoCase )
 return i+1;
 }
 
-aData.push_back(new rtl::OUString(rVal));
+aData.push_back(rVal);
 return (short) ++n;
 }
 
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index 33da527..efdc704 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -29,8 +29,6 @@
 #ifndef _SYMTBL_HXX
 #define _SYMTBL_HXX
 
-#include boost/ptr_container/ptr_vector.hpp
-
 class SbiConstDef;
 class SbiParser;
 class SbiProcDef;
@@ -44,7 +42,7 @@ enum SbiSymScope { SbLOCAL, SbPARAM, SbPUBLIC, SbGLOBAL, 
SbRTL };
 
 class SbiStringPool {
 const rtl::OUString aEmpty;
-boost::ptr_vectorrtl::OUString aData;
+std::vectorrtl::OUString aData;
 SbiParser* pParser;
 public:
 SbiStringPool( SbiParser* );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-11-25 Thread August Sodora
 basic/source/inc/symtbl.hxx |   54 ++--
 1 file changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 2de121e58879d511376dd725aa41e2f842f30c43
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 00:16:58 2011 -0500

sal_Bool-bool

diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index efdc704..310a238 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -111,16 +111,16 @@ protected:
 sal_uInt16 nProcId;
 sal_uInt16 nPos;
 sal_uInt32 nChain;
-sal_Bool   bNew : 1;// sal_True: Dim As New...
-sal_Bool   bChained : 1;// sal_True: symbol is defined in code
-sal_Bool   bByVal   : 1;// sal_True: ByVal-parameter
-sal_Bool   bOpt : 1;// sal_True: optional parameter
-sal_Bool   bStatic  : 1;// sal_True: STATIC variable
-sal_Bool   bAs  : 1;// sal_True: data type defined per AS 
XXX
-sal_Bool   bGlobal  : 1;// sal_True: global variable
-sal_Bool   bParamArray : 1; // sal_True: ParamArray parameter
-sal_Bool   bWithEvents : 1; // sal_True: Declared WithEvents
-sal_Bool   bWithBrackets : 1;   // sal_True: Followed by ()
+bool   bNew : 1;// true: Dim As New...
+bool   bChained : 1;// true: symbol is defined in code
+bool   bByVal   : 1;// true: ByVal-parameter
+bool   bOpt : 1;// true: optional parameter
+bool   bStatic  : 1;// true: STATIC variable
+bool   bAs  : 1;// true: data type defined per AS XXX
+bool   bGlobal  : 1;// true: global variable
+bool   bParamArray : 1; // true: ParamArray parameter
+bool   bWithEvents : 1; // true: Declared WithEvents
+bool   bWithBrackets : 1;   // true: Followed by ()
 sal_uInt16 nDefaultId;  // Symbol number of default value
 short  nFixedStringLength;  // String length in: Dim foo As 
String*Length
 public:
@@ -143,28 +143,28 @@ public:
 short  GetLen() const   { return nLen;  }
 void   SetDims( short n ) { nDims = n;  }
 short  GetDims() const  { return nDims; }
-sal_Bool   IsDefined() const{ return bChained;  }
-void   SetOptional(){ bOpt = sal_True;  }
-void   SetParamArray()  { bParamArray = sal_True;   }
-void   SetWithEvents()  { bWithEvents = sal_True;   }
-void   SetWithBrackets(){ bWithBrackets = sal_True; }
-void   SetByVal( sal_Bool bByVal_ = sal_True )
+bool   IsDefined() const{ return bChained;  }
+void   SetOptional(){ bOpt = true;  }
+void   SetParamArray()  { bParamArray = true;   }
+void   SetWithEvents()  { bWithEvents = true;   }
+void   SetWithBrackets(){ bWithBrackets = true; }
+void   SetByVal( bool bByVal_ = true )
 { bByVal = bByVal_; }
-void   SetStatic( sal_Bool bAsStatic = sal_True )   { bStatic = 
bAsStatic;  }
+void   SetStatic( bool bAsStatic = true )  { bStatic = bAsStatic;  
}
 void   SetNew() { bNew = sal_True;  }
 void   SetDefinedAs()   { bAs = sal_True;   }
-void   SetGlobal(sal_Bool b){ bGlobal = b;  }
+void   SetGlobal(bool b){ bGlobal = b;  }
 void   SetDefaultId( sal_uInt16 n ) { nDefaultId = n; }
 sal_uInt16 GetDefaultId( void ) { return nDefaultId; }
-sal_Bool   IsOptional() const{ return bOpt; }
-sal_Bool   IsParamArray() const{ return bParamArray; }
-sal_Bool   IsWithEvents() const{ return bWithEvents; }
-sal_Bool   IsWithBrackets() const{ return bWithBrackets; }
-sal_Bool   IsByVal() const  { return bByVal;}
-sal_Bool   IsStatic() const { return bStatic;   }
-sal_Bool   IsNew() const{ return bNew;  }
-sal_Bool   IsDefinedAs() const { return bAs;}
-sal_Bool   IsGlobal() const { return bGlobal;   }
+bool   IsOptional() const{ return bOpt; }
+bool   IsParamArray() const{ return bParamArray; }
+bool   IsWithEvents() const{ return bWithEvents; }
+bool   IsWithBrackets() const{ return bWithBrackets; }
+bool   IsByVal() const  { return bByVal;}
+bool   IsStatic() const { return bStatic;   }
+bool   IsNew() const{ return bNew;  }
+bool   IsDefinedAs() const { return bAs;}
+bool   IsGlobal() const { return bGlobal;   }
 short  GetFixedStringLength( void ) const { return nFixedStringLength; 
}
 void   SetFixedStringLength( short n ) { nFixedStringLength = n; }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman

[Libreoffice-commits] .: 3 commits - svl/CppunitTest_svl_lngmisc.mk svl/inc svl/Module_svl.mk svl/qa svl/source

2011-11-26 Thread August Sodora
 svl/CppunitTest_svl_lngmisc.mk |   36 +
 svl/Module_svl.mk  |4 +
 svl/inc/svl/lngmisc.hxx|   15 +++
 svl/qa/unit/test_lngmisc.cxx   |   83 +
 svl/source/misc/lngmisc.cxx|   12 +
 5 files changed, 134 insertions(+), 16 deletions(-)

New commits:
commit 091ba739bad456938d462d808f5a76927d884ed9
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 13:55:52 2011 -0500

Added test for linguistic::RemoveHyphen and some simplification

diff --git a/svl/CppunitTest_svl_lngmisc.mk b/svl/CppunitTest_svl_lngmisc.mk
new file mode 100644
index 000..89c211b
--- /dev/null
+++ b/svl/CppunitTest_svl_lngmisc.mk
@@ -0,0 +1,36 @@
+$(eval $(call gb_CppunitTest_CppunitTest,svl_lngmisc))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,svl_lngmisc, \
+svl/qa/unit/test_lngmisc \
+))
+
+# add a list of all needed libraries here
+$(eval $(call gb_CppunitTest_add_linked_libs,svl_lngmisc, \
+comphelper \
+cppu \
+cppuhelper \
+sal \
+salhelper \
+sb \
+sot \
+svl \
+svt \
+tl \
+utl \
+vcl \
+xcr \
+$(gb_STDLIBS) \
+))
+
+ifeq ($(GUI),WNT)
+$(eval $(call gb_CppunitTest_add_linked_libs,svl_lngmisc, \
+   oleaut32 \
+))
+endif
+
+$(eval $(call gb_CppunitTest_set_include,svl_lngmisc,\
+-I$(realpath $(SRCDIR)/svl/source/inc) \
+-I$(realpath $(SRCDIR)/svl/inc) \
+$$(INCLUDE) \
+-I$(OUTDIR)/inc \
+))
\ No newline at end of file
diff --git a/svl/Module_svl.mk b/svl/Module_svl.mk
index 880db26..6367ee7 100644
--- a/svl/Module_svl.mk
+++ b/svl/Module_svl.mk
@@ -36,6 +36,10 @@ $(eval $(call gb_Module_add_targets,svl,\
 Package_inc \
 ))
 
+$(eval $(call gb_Module_add_check_targets,svl,\
+   CppunitTest_svl_lngmisc \
+))
+
 $(eval $(call gb_Module_add_subsequentcheck_targets,svl,\
 JunitTest_svl_complex \
 ))
diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 176022f..5278aed 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -31,6 +31,8 @@
 
 #include svl/svldllapi.h
 
+#include rtl/ustring.hxx
+
 class String;
 
 ///
diff --git a/svl/qa/unit/test_lngmisc.cxx b/svl/qa/unit/test_lngmisc.cxx
new file mode 100644
index 000..47f671a
--- /dev/null
+++ b/svl/qa/unit/test_lngmisc.cxx
@@ -0,0 +1,83 @@
+#include sal/config.h
+#include sal/precppunit.hxx
+
+#include cppunit/TestAssert.h
+#include cppunit/TestFixture.h
+#include cppunit/extensions/HelperMacros.h
+#include cppunit/plugin/TestPlugIn.h
+
+#include svl/lngmisc.hxx
+
+#include rtl/ustrbuf.hxx
+
+namespace
+{
+  class LngMiscTest : public CppUnit::TestFixture
+  {
+  private:
+void testRemoveHyphens();
+//void testRemoveControlChars();
+//void testReplaceControlChars();
+//void testGetThesaurusReplaceText();
+
+CPPUNIT_TEST_SUITE(LngMiscTest);
+
+CPPUNIT_TEST(testRemoveHyphens);
+//CPPUNIT_TEST(testRemoveControlChars);
+//CPPUNIT_TEST(testReplaceControlChars);
+//CPPUNIT_TEST(testGetThesaurusReplaceText);
+
+CPPUNIT_TEST_SUITE_END();
+  };
+
+  void LngMiscTest::testRemoveHyphens()
+  {
+::rtl::OUString str1(RTL_CONSTASCII_USTRINGPARAM());
+::rtl::OUString str2(RTL_CONSTASCII_USTRINGPARAM(a-b--c---));
+
+::rtl::OUStringBuffer str3Buf;
+str3Buf.append(SVT_SOFT_HYPHEN);
+str3Buf.append(SVT_HARD_HYPHEN);
+str3Buf.append(SVT_HARD_HYPHEN);
+::rtl::OUString str3(str3Buf.makeStringAndClear());
+
+::rtl::OUString str4(RTL_CONSTASCII_USTRINGPARAM(asdf));
+
+bool bModified = linguistic::RemoveHyphens(str1);
+CPPUNIT_ASSERT(!bModified);
+CPPUNIT_ASSERT(str1.isEmpty());
+
+// Note that '-' isn't a hyphen to RemoveHyphens.
+bModified = linguistic::RemoveHyphens(str2);
+CPPUNIT_ASSERT(!bModified);
+CPPUNIT_ASSERT(str2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(a-b--c---)));
+
+bModified = linguistic::RemoveHyphens(str3);
+CPPUNIT_ASSERT(bModified);
+CPPUNIT_ASSERT(str3.isEmpty());
+
+bModified = linguistic::RemoveHyphens(str4);
+CPPUNIT_ASSERT(!bModified);
+CPPUNIT_ASSERT(str4.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(asdf)));
+  }
+
+  /*
+  void LngMiscTest::testRemoveControlChars()
+  {
+CPPUNIT_ASSERT(true);
+  }
+
+  void LngMiscTest::testReplaceControlChars()
+  {
+CPPUNIT_ASSERT(true);
+  }
+
+  void LngMiscTest::testGetThesaurusReplaceText()
+  {
+CPPUNIT_ASSERT(true);
+  }
+  */
+
+  CPPUNIT_TEST_SUITE_REGISTRATION(LngMiscTest);
+}
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index ca1b68a..f204f4b 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -58,14 +58,10 @@ sal_Int32 GetNumControlChars( const OUString rTxt )
 
 sal_Bool RemoveHyphens( OUString rTxt )
 {
-sal_Bool bModified = sal_False;
-if (HasHyphens(rTxt))
-{
-rTxt = comphelper::string::remove

[Libreoffice-commits] .: svl/inc

2011-11-26 Thread August Sodora
 svl/inc/svl/lngmisc.hxx |6 --
 1 file changed, 6 deletions(-)

New commits:
commit 38e0df5b2ece3c80c64beb2f0cc3a2abe6bd475f
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 13:57:29 2011 -0500

Remove newly unused code

diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 5278aed..cfa21ba 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -57,12 +57,6 @@ inline sal_Bool IsControlChar( sal_Unicode cChar )
 return cChar  static_castsal_Unicode(' ');
 }
 
-inline sal_Bool HasHyphens( const rtl::OUString rTxt )
-{
-return  rTxt.indexOf( SVT_SOFT_HYPHEN ) != -1  ||
-rTxt.indexOf( SVT_HARD_HYPHEN ) != -1;
-}
-
 SVL_DLLPUBLIC sal_Int32 GetNumControlChars( const rtl::OUString rTxt );
 SVL_DLLPUBLIC sal_Bool  RemoveHyphens( rtl::OUString rTxt );
 SVL_DLLPUBLIC sal_Bool  RemoveControlChars( rtl::OUString rTxt );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svl/inc

2011-11-26 Thread August Sodora
 svl/inc/svl/lngmisc.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2554f7a543c68f4175b042f15bf0aa3df2ddd608
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 14:29:28 2011 -0500

Mark as private

diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index cfa21ba..9d34083 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -57,7 +57,7 @@ inline sal_Bool IsControlChar( sal_Unicode cChar )
 return cChar  static_castsal_Unicode(' ');
 }
 
-SVL_DLLPUBLIC sal_Int32 GetNumControlChars( const rtl::OUString rTxt );
+SVL_DLLPRIVATE sal_Int32 GetNumControlChars( const rtl::OUString rTxt );
 SVL_DLLPUBLIC sal_Bool  RemoveHyphens( rtl::OUString rTxt );
 SVL_DLLPUBLIC sal_Bool  RemoveControlChars( rtl::OUString rTxt );
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svl/inc svl/source

2011-11-26 Thread August Sodora
 svl/inc/svl/lngmisc.hxx |   10 +-
 svl/source/misc/lngmisc.cxx |   14 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit f04882ba6a6d58ee45aa509359747f3c607a863b
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 14:31:55 2011 -0500

sal_Bool-bool

diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 9d34083..a473ab6 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -46,22 +46,22 @@ class String;
 namespace linguistic
 {
 
-inline sal_Bool IsHyphen( sal_Unicode cChar )
+inline bool IsHyphen( sal_Unicode cChar )
 {
 return cChar == SVT_SOFT_HYPHEN  ||  cChar == SVT_HARD_HYPHEN;
 }
 
 
-inline sal_Bool IsControlChar( sal_Unicode cChar )
+inline bool IsControlChar( sal_Unicode cChar )
 {
 return cChar  static_castsal_Unicode(' ');
 }
 
 SVL_DLLPRIVATE sal_Int32 GetNumControlChars( const rtl::OUString rTxt );
-SVL_DLLPUBLIC sal_Bool  RemoveHyphens( rtl::OUString rTxt );
-SVL_DLLPUBLIC sal_Bool  RemoveControlChars( rtl::OUString rTxt );
+SVL_DLLPUBLIC bool  RemoveHyphens( rtl::OUString rTxt );
+SVL_DLLPUBLIC bool  RemoveControlChars( rtl::OUString rTxt );
 
-SVL_DLLPUBLIC sal_Bool  ReplaceControlChars( rtl::OUString rTxt, sal_Char 
aRplcChar = ' ' );
+SVL_DLLPUBLIC bool  ReplaceControlChars( rtl::OUString rTxt, sal_Char 
aRplcChar = ' ' );
 
 SVL_DLLPUBLIC String GetThesaurusReplaceText( const String rText );
 
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index f204f4b..3c32099 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -56,7 +56,7 @@ sal_Int32 GetNumControlChars( const OUString rTxt )
 return nCnt;
 }
 
-sal_Bool RemoveHyphens( OUString rTxt )
+bool RemoveHyphens( OUString rTxt )
 {
 sal_Int32 n = rTxt.getLength();
 rTxt = comphelper::string::remove(rTxt, SVT_SOFT_HYPHEN);
@@ -64,9 +64,9 @@ sal_Bool RemoveHyphens( OUString rTxt )
 return n != rTxt.getLength();
 }
 
-sal_Bool RemoveControlChars( OUString rTxt )
+bool RemoveControlChars( OUString rTxt )
 {
-sal_Bool bModified = sal_False;
+bool bModified = false;
 sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
 if (nCtrlChars)
 {
@@ -86,7 +86,7 @@ sal_Bool RemoveControlChars( OUString rTxt )
 }
 DBG_ASSERT( nCnt == nSize, wrong size );
 rTxt = aBuf.makeStringAndClear();
-bModified = sal_True;
+bModified = true;
 }
 return bModified;
 }
@@ -95,13 +95,13 @@ sal_Bool RemoveControlChars( OUString rTxt )
 // non breaking field character
 #define CH_TXTATR_INWORD((sal_Char) 0x02)
 
-sal_Bool ReplaceControlChars( rtl::OUString rTxt, sal_Char /*aRplcChar*/ )
+bool ReplaceControlChars( rtl::OUString rTxt, sal_Char /*aRplcChar*/ )
 {
 // the resulting string looks like this:
 // 1. non breaking field characters get removed
 // 2. remaining control characters will be replaced by ' '
 
-sal_Bool bModified = sal_False;
+bool bModified = false;
 sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
 if (nCtrlChars)
 {
@@ -121,7 +121,7 @@ sal_Bool ReplaceControlChars( rtl::OUString rTxt, sal_Char 
/*aRplcChar*/ )
 }
 aBuf.setLength( nCnt );
 rTxt = aBuf.makeStringAndClear();
-bModified = sal_True;
+bModified = true;
 }
 return bModified;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - svl/inc svl/qa svl/source

2011-11-26 Thread August Sodora
 svl/inc/svl/lngmisc.hxx  |1 
 svl/qa/unit/test_lngmisc.cxx |   34 ++-
 svl/source/misc/lngmisc.cxx  |  185 ++-
 3 files changed, 112 insertions(+), 108 deletions(-)

New commits:
commit 82e5a0ddcbb9e367e60c772f4605df7fc9b63642
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 15:21:12 2011 -0500

Remove unnecessary includes and cosmetics

diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 56c1066..4065290 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -28,125 +28,115 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include precompiled_svl.hxx
+
+#include svl/lngmisc.hxx
+
 #include comphelper/string.hxx
-#include svl/lngmisc.hxx
-#include tools/solar.h
-#include tools/string.hxx
-#include tools/debug.hxx
 #include rtl/ustrbuf.hxx
-#include rtl/ustring.hxx
-
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
+#include tools/debug.hxx
+#include tools/string.hxx
 
 namespace linguistic
 {
+sal_Int32 GetNumControlChars(const rtl::OUString rTxt)
+{
+sal_Int32 nCnt = 0;
+for (sal_Int32 i = 0; i  rTxt.getLength(); ++i)
+if (IsControlChar(rTxt[i]))
+++nCnt;
+return nCnt;
+}
 
-///
-
-sal_Int32 GetNumControlChars( const OUString rTxt )
-{
-sal_Int32 nCnt = 0;
-for (sal_Int32 i = 0; i  rTxt.getLength(); ++i)
-if (IsControlChar(rTxt[i]))
-++nCnt;
-return nCnt;
-}
-
-bool RemoveHyphens( OUString rTxt )
-{
-sal_Int32 n = rTxt.getLength();
-rTxt = comphelper::string::remove(rTxt, SVT_SOFT_HYPHEN);
-rTxt = comphelper::string::remove(rTxt, SVT_HARD_HYPHEN);
-return n != rTxt.getLength();
-}
+bool RemoveHyphens(rtl::OUString rTxt)
+{
+sal_Int32 n = rTxt.getLength();
+rTxt = comphelper::string::remove(rTxt, SVT_SOFT_HYPHEN);
+rTxt = comphelper::string::remove(rTxt, SVT_HARD_HYPHEN);
+return n != rTxt.getLength();
+}
 
-bool RemoveControlChars( OUString rTxt )
-{
-sal_Int32 nSize = rTxt.getLength() - GetNumControlChars(rTxt);
-if(nSize == rTxt.getLength())
-return false;
+bool RemoveControlChars(rtl::OUString rTxt)
+{
+sal_Int32 nSize = rTxt.getLength() - GetNumControlChars(rTxt);
+if(nSize == rTxt.getLength())
+return false;
 
-OUStringBuffer aBuf(nSize);
-aBuf.setLength(nSize);
-for (sal_Int32 i = 0, j = 0; i  rTxt.getLength()  j  nSize; ++i)
-if (!IsControlChar(rTxt[i]))
-aBuf[j++] = rTxt[i];
+rtl::OUStringBuffer aBuf(nSize);
+aBuf.setLength(nSize);
+for (sal_Int32 i = 0, j = 0; i  rTxt.getLength()  j  nSize; ++i)
+if (!IsControlChar(rTxt[i]))
+aBuf[j++] = rTxt[i];
 
-rTxt = aBuf.makeStringAndClear();
-DBG_ASSERT(rTxt.getLength() == nSize, GetNumControlChars returned a 
different number of control characters than were actually removed.);
+rTxt = aBuf.makeStringAndClear();
+DBG_ASSERT(rTxt.getLength() == nSize, GetNumControlChars returned a 
different number of control characters than were actually removed.);
 
-return true;
-}
+return true;
+}
 
-// non breaking field character
+// non breaking field character
 #define CH_TXTATR_INWORD((sal_Char) 0x02)
 
-bool ReplaceControlChars( rtl::OUString rTxt, sal_Char /*aRplcChar*/ )
-{
-// the resulting string looks like this:
-// 1. non breaking field characters get removed
-// 2. remaining control characters will be replaced by ' '
-
-bool bModified = false;
-sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
-if (nCtrlChars)
+bool ReplaceControlChars( rtl::OUString rTxt, sal_Char /*aRplcChar*/ )
 {
-sal_Int32 nLen  = rTxt.getLength();
-OUStringBuffer aBuf( nLen );
-sal_Int32 nCnt = 0;
-for (sal_Int32 i = 0;  i  nLen;  ++i)
+// the resulting string looks like this:
+// 1. non breaking field characters get removed
+// 2. remaining control characters will be replaced by ' '
+
+bool bModified = false;
+sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
+if (nCtrlChars)
 {
-sal_Unicode cChar = rTxt[i];
-if (CH_TXTATR_INWORD != cChar)
+sal_Int32 nLen  = rTxt.getLength();
+rtl::OUStringBuffer aBuf( nLen );
+sal_Int32 nCnt = 0;
+for (sal_Int32 i = 0;  i  nLen;  ++i)
 {
-if (IsControlChar( cChar ))
-cChar = ' ';
-DBG_ASSERT( nCnt  nLen, index out of range );
-aBuf.setCharAt( nCnt++, cChar );
+sal_Unicode cChar = rTxt[i];
+if (CH_TXTATR_INWORD != cChar)
+{
+if (IsControlChar( cChar

[Libreoffice-commits] .: 3 commits - svl/inc svl/qa svl/source

2011-11-26 Thread August Sodora
 svl/inc/svl/lngmisc.hxx  |2 -
 svl/qa/unit/test_lngmisc.cxx |   36 
 svl/source/misc/lngmisc.cxx  |   48 ---
 3 files changed, 56 insertions(+), 30 deletions(-)

New commits:
commit 83345ff8d8b709d6558238cd8e4f08323f3c97bc
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 18:13:06 2011 -0500

Simplification and accompanying tests

diff --git a/svl/qa/unit/test_lngmisc.cxx b/svl/qa/unit/test_lngmisc.cxx
index 6411e20..d982f44 100644
--- a/svl/qa/unit/test_lngmisc.cxx
+++ b/svl/qa/unit/test_lngmisc.cxx
@@ -17,14 +17,14 @@ namespace
   private:
 void testRemoveHyphens();
 void testRemoveControlChars();
-//void testReplaceControlChars();
+void testReplaceControlChars();
 //void testGetThesaurusReplaceText();
 
 CPPUNIT_TEST_SUITE(LngMiscTest);
 
 CPPUNIT_TEST(testRemoveHyphens);
 CPPUNIT_TEST(testRemoveControlChars);
-//CPPUNIT_TEST(testReplaceControlChars);
+CPPUNIT_TEST(testReplaceControlChars);
 //CPPUNIT_TEST(testGetThesaurusReplaceText);
 
 CPPUNIT_TEST_SUITE_END();
@@ -92,12 +92,40 @@ namespace
 CPPUNIT_ASSERT(str4.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( )));
   }
 
-  /*
   void LngMiscTest::testReplaceControlChars()
   {
-CPPUNIT_ASSERT(true);
+::rtl::OUString str1(RTL_CONSTASCII_USTRINGPARAM());
+::rtl::OUString str2(RTL_CONSTASCII_USTRINGPARAM(asdf));
+::rtl::OUString str3(RTL_CONSTASCII_USTRINGPARAM(asdf\nasdf));
+
+::rtl::OUStringBuffer str4Buf(33);
+str4Buf.setLength(33);
+for(int i = 0; i  33; i++)
+  str4Buf[i] = static_castsal_Unicode(i);
+//TODO: is this a bug? shouldn't RemoveControlChars remove this?
+//str4Buf[33] = static_castsal_Unicode(0x7F);
+::rtl::OUString str4(str4Buf.makeStringAndClear());
+
+bool bModified = linguistic::ReplaceControlChars(str1);
+CPPUNIT_ASSERT(!bModified);
+CPPUNIT_ASSERT(str1.isEmpty());
+
+bModified = linguistic::ReplaceControlChars(str2);
+CPPUNIT_ASSERT(!bModified);
+CPPUNIT_ASSERT(str2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(asdf)));
+
+bModified = linguistic::ReplaceControlChars(str3);
+CPPUNIT_ASSERT(bModified);
+CPPUNIT_ASSERT(str3.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(asdf asdf)));
+
+bModified = linguistic::ReplaceControlChars(str4);
+CPPUNIT_ASSERT(bModified);
+CPPUNIT_ASSERT(str4.getLength() == 32);
+for(int i = 0; i  32; i++)
+  CPPUNIT_ASSERT(str4[i] == ' ');
   }
 
+  /*
   void LngMiscTest::testGetThesaurusReplaceText()
   {
 CPPUNIT_ASSERT(true);
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 5821db6..49a4433 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -82,29 +82,27 @@ namespace linguistic
 // 1. non breaking field characters get removed
 // 2. remaining control characters will be replaced by ' '
 
-bool bModified = false;
-sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
-if (nCtrlChars)
+if (GetNumControlChars(rTxt) == 0)
+return false;
+
+sal_Int32 n = rTxt.getLength();
+
+rtl::OUStringBuffer aBuf(n);
+aBuf.setLength(n);
+
+sal_Int32 j = 0;
+for (sal_Int32 i = 0; i  n  j  n; ++i)
 {
-sal_Int32 nLen  = rTxt.getLength();
-rtl::OUStringBuffer aBuf( nLen );
-sal_Int32 nCnt = 0;
-for (sal_Int32 i = 0;  i  nLen;  ++i)
-{
-sal_Unicode cChar = rTxt[i];
-if (CH_TXTATR_INWORD != cChar)
-{
-if (IsControlChar( cChar ))
-cChar = ' ';
-DBG_ASSERT( nCnt  nLen, index out of range );
-aBuf.setCharAt( nCnt++, cChar );
-}
-}
-aBuf.setLength( nCnt );
-rTxt = aBuf.makeStringAndClear();
-bModified = true;
+if (CH_TXTATR_INWORD == rTxt[i])
+continue;
+
+aBuf[j++] = IsControlChar(rTxt[i]) ? ' ' : rTxt[i];
 }
-return bModified;
+
+aBuf.setLength(j);
+rTxt = aBuf.makeStringAndClear();
+
+return true;
 }
 
 String GetThesaurusReplaceText(const String rText)
commit e280ff03f3a2fdcd452123f206007bac804d6799
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 15:26:46 2011 -0500

Remove unused parameter

diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 6c71b45..4a94bc7 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -62,7 +62,7 @@ SVL_DLLPRIVATE sal_Int32 GetNumControlChars( const 
rtl::OUString rTxt );
 SVL_DLLPUBLIC bool  RemoveHyphens( rtl::OUString rTxt );
 SVL_DLLPUBLIC bool  RemoveControlChars( rtl::OUString rTxt );
 
-SVL_DLLPUBLIC bool  ReplaceControlChars( rtl::OUString rTxt, sal_Char 
aRplcChar = ' ' );
+SVL_DLLPUBLIC bool

[Libreoffice-commits] .: 5 commits - svl/inc svl/qa svl/source

2011-11-26 Thread August Sodora
 svl/inc/svl/lngmisc.hxx  |   42 +-
 svl/qa/unit/test_lngmisc.cxx |   40 +++-
 svl/source/misc/lngmisc.cxx  |   33 ++---
 3 files changed, 70 insertions(+), 45 deletions(-)

New commits:
commit 69ee7654fa662a577890d594214cba1b0cbfea6f
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 22:56:51 2011 -0500

Remove unnecessary includes

diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index c24ed4d..d3521bc 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -33,10 +33,6 @@
 
 #include rtl/ustring.hxx
 
-class String;
-
-///
-
 #define SVT_SOFT_HYPHEN (static_castsal_Unicode(0x00AD))
 #define SVT_HARD_HYPHEN (static_castsal_Unicode(0x2011))
 
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 1c42160..2e6a0a4 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -34,7 +34,6 @@
 #include comphelper/string.hxx
 #include rtl/ustrbuf.hxx
 #include tools/debug.hxx
-#include tools/string.hxx
 
 namespace linguistic
 {
commit a627ec05ce7ea85acaeab68aee925c4c295e9c4a
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 22:56:17 2011 -0500

Cosmetic

diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 72d829c..c24ed4d 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -45,27 +45,23 @@ class String;
 
 namespace linguistic
 {
-
-inline bool IsHyphen( sal_Unicode cChar )
-{
-return cChar == SVT_SOFT_HYPHEN  ||  cChar == SVT_HARD_HYPHEN;
-}
-
-
-inline bool IsControlChar( sal_Unicode cChar )
-{
-// TODO: why doesn't this include 0x0F DEL?
-return cChar  static_castsal_Unicode(' ');
-}
-
-SVL_DLLPRIVATE sal_Int32 GetNumControlChars( const rtl::OUString rTxt );
-SVL_DLLPUBLIC bool  RemoveHyphens( rtl::OUString rTxt );
-SVL_DLLPUBLIC bool  RemoveControlChars( rtl::OUString rTxt );
-
-SVL_DLLPUBLIC bool ReplaceControlChars(rtl::OUString rTxt);
-
-SVL_DLLPUBLIC ::rtl::OUString GetThesaurusReplaceText( const ::rtl::OUString 
rText );
-
+inline bool IsHyphen(sal_Unicode cChar)
+{
+return cChar == SVT_SOFT_HYPHEN  ||  cChar == SVT_HARD_HYPHEN;
+}
+
+inline bool IsControlChar(sal_Unicode cChar)
+{
+// TODO: why doesn't this include 0x0F DEL?
+return cChar  static_castsal_Unicode(' ');
+}
+
+SVL_DLLPRIVATE sal_Int32 GetNumControlChars( const rtl::OUString rTxt );
+
+SVL_DLLPUBLIC bool RemoveHyphens(rtl::OUString rTxt);
+SVL_DLLPUBLIC bool RemoveControlChars(rtl::OUString rTxt);
+SVL_DLLPUBLIC bool ReplaceControlChars(rtl::OUString rTxt);
+SVL_DLLPUBLIC ::rtl::OUString GetThesaurusReplaceText(const 
::rtl::OUString rText);
 } // namespace linguistic
 
 #endif
commit d5737d5b4c5b350b7b08e848b9d30f4ea9c8063b
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 22:55:20 2011 -0500

Remove unnecessary casts

diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 2372e81..1c42160 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -114,10 +114,10 @@ namespace linguistic
 
 ::rtl::OUString aText(rText);
 
-sal_Int32 nPos = aText.indexOf(sal_Unicode('('));
+sal_Int32 nPos = aText.indexOf('(');
 while (nPos = 0)
 {
-sal_Int32 nEnd = aText.indexOf(sal_Unicode(')'), nPos);
+sal_Int32 nEnd = aText.indexOf(')', nPos);
 if (nEnd = 0)
 {
 ::rtl::OUStringBuffer aTextBuf(aText);
@@ -126,12 +126,12 @@ namespace linguistic
 }
 else
 break;
-nPos = aText.indexOf(sal_Unicode('('));
+nPos = aText.indexOf('(');
 }
 
-nPos = aText.indexOf(sal_Unicode('*'));
+nPos = aText.indexOf('*');
 if(nPos == 0)
-aText = ::rtl::OUString();
+return ::rtl::OUString();
 else if(nPos  0)
 aText = aText.copy(0, nPos);
 
commit 38ba2f002b6fe76273b3abc1092a93e10551057a
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 22:53:32 2011 -0500

String-OUString

diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 4a94bc7..72d829c 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -64,7 +64,7 @@ SVL_DLLPUBLIC bool  RemoveControlChars( rtl::OUString rTxt );
 
 SVL_DLLPUBLIC bool ReplaceControlChars(rtl::OUString rTxt);
 
-SVL_DLLPUBLIC String GetThesaurusReplaceText( const String rText );
+SVL_DLLPUBLIC ::rtl::OUString GetThesaurusReplaceText( const ::rtl::OUString 
rText );
 
 } // namespace linguistic
 
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 49a4433..2372e81 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -105,35 +105,39 @@ namespace linguistic
 return true

[Libreoffice-commits] .: filter/source

2011-11-26 Thread August Sodora
 filter/source/msfilter/powerpoint/pptcom.hxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit aa0cca15073bc59e379a1e1754c8e7be1a93dd05
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 23:00:50 2011 -0500

Remove unnecessary tools includes

diff --git a/filter/source/msfilter/powerpoint/pptcom.hxx 
b/filter/source/msfilter/powerpoint/pptcom.hxx
index 92e80cb..8660c19 100644
--- a/filter/source/msfilter/powerpoint/pptcom.hxx
+++ b/filter/source/msfilter/powerpoint/pptcom.hxx
@@ -30,11 +30,6 @@
 #define _PPTCOM_HXX
 
 #include rtl/ustring.hxx
-#include tools/debug.hxx
-#include tools/stream.hxx
-#include tools/string.hxx
-#include tools/urlobj.hxx
-#include tools/stack.hxx
 
 #include com/sun/star/uno/Reference.h
 #include com/sun/star/uno/RuntimeException.hpp
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - filter/source rsc/inc svtools/source svx/source

2011-11-26 Thread August Sodora
 filter/source/filtertracer/filtertracer.hxx   |9 ++---
 rsc/inc/rsclex.hxx|1 -
 svtools/source/filter/wmf/winmtf.hxx  |8 
 svx/source/customshapes/EnhancedCustomShapeEngine.hxx |4 
 4 files changed, 2 insertions(+), 20 deletions(-)

New commits:
commit 17dc1712da6d1d83aa8b0fdb31c9294da7a7bc67
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 23:14:53 2011 -0500

Remove unnecessary tools includes

diff --git a/svtools/source/filter/wmf/winmtf.hxx 
b/svtools/source/filter/wmf/winmtf.hxx
index 28c19c0..6f5e778 100644
--- a/svtools/source/filter/wmf/winmtf.hxx
+++ b/svtools/source/filter/wmf/winmtf.hxx
@@ -35,22 +35,14 @@
 
 #include sot/object.hxx
 #include boost/shared_ptr.hpp
-#include tools/debug.hxx
-#include tools/stack.hxx
-#include tools/table.hxx
 #include vcl/graph.hxx
 #include vcl/virdev.hxx
-#include tools/poly.hxx
 #include basegfx/tools/b2dclipstate.hxx
 #include vcl/font.hxx
 #include vcl/bmpacc.hxx
 #include vcl/lineinfo.hxx
 #include svtools/fltcall.hxx
 
-#include vector
-#include math.h
-#include stdlib.h
-
 #define ERROR   0
 #define NULLREGION  1
 #define SIMPLEREGION2
commit 3dc1172426d18e2b611703092227ae95a934163b
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 23:10:51 2011 -0500

Remove unnecessary tools includes

diff --git a/filter/source/filtertracer/filtertracer.hxx 
b/filter/source/filtertracer/filtertracer.hxx
index 12649da..f343f87 100644
--- a/filter/source/filtertracer/filtertracer.hxx
+++ b/filter/source/filtertracer/filtertracer.hxx
@@ -29,13 +29,6 @@
 #ifndef _FILTERTRACER_HXX
 #define _FILTERTRACER_HXX
 
-#include rtl/ustring.hxx
-#include tools/debug.hxx
-#include tools/stream.hxx
-#include tools/string.hxx
-#include tools/urlobj.hxx
-#include tools/stack.hxx
-
 #include com/sun/star/uno/Reference.h
 #include com/sun/star/uno/RuntimeException.hpp
 #include com/sun/star/lang/XMultiServiceFactory.hpp
@@ -54,6 +47,8 @@
 #include com/sun/star/util/SearchResult.hpp
 #include com/sun/star/xml/sax/XDocumentHandler.hpp
 
+class SvStream;
+
 // 
-
 
 #define NMSP_IO com::sun::star::io
commit 6d3b871ee4c201569cbd171a18f3dd38675494fe
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 23:06:28 2011 -0500

Remove unnecessary includes

diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx 
b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
index d209e4f..a806522 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
@@ -29,10 +29,6 @@
 #ifndef _ENHANCED_CUSTOMSHAPE_ENGINE_HXX
 #define _ENHANCED_CUSTOMSHAPE_ENGINE_HXX
 
-#include tools/debug.hxx
-#include tools/string.hxx
-#include tools/stack.hxx
-
 #include com/sun/star/uno/Reference.h
 #include com/sun/star/uno/RuntimeException.hpp
 #include com/sun/star/lang/XMultiServiceFactory.hpp
commit a6cc570e5cbc455f0f1626ab9e904cee290b9081
Author: August Sodora aug...@gmail.com
Date:   Sat Nov 26 23:03:36 2011 -0500

Remove unnecessary tools/stack.hxx include

diff --git a/rsc/inc/rsclex.hxx b/rsc/inc/rsclex.hxx
index c861e89..fed44dd 100644
--- a/rsc/inc/rsclex.hxx
+++ b/rsc/inc/rsclex.hxx
@@ -25,7 +25,6 @@
  * for a copy of the LGPLv3 License.
  *
  /
-#include tools/stack.hxx
 
 #include boost/unordered_set.hpp
 #include rtl/strbuf.hxx
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svl/qa

2011-11-26 Thread August Sodora
 svl/qa/unit/test_lngmisc.cxx |   27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 641d8928f89120637a4348092dc8400440770320
Author: August Sodora aug...@gmail.com
Date:   Sun Nov 27 01:31:44 2011 -0500

String-OUString

diff --git a/svl/qa/unit/test_lngmisc.cxx b/svl/qa/unit/test_lngmisc.cxx
index d9c6ef3..561fde3 100644
--- a/svl/qa/unit/test_lngmisc.cxx
+++ b/svl/qa/unit/test_lngmisc.cxx
@@ -9,7 +9,6 @@
 #include svl/lngmisc.hxx
 
 #include rtl/ustrbuf.hxx
-#include tools/string.hxx
 
 namespace
 {
@@ -128,17 +127,17 @@ namespace
 
   void LngMiscTest::testGetThesaurusReplaceText()
   {
-const static String str1(RTL_CONSTASCII_USTRINGPARAM());
-const static String str2(RTL_CONSTASCII_USTRINGPARAM(asdf));
-const static String str3(RTL_CONSTASCII_USTRINGPARAM(asdf (abc)));
-const static String str4(RTL_CONSTASCII_USTRINGPARAM(asdf*));
-const static String str5(RTL_CONSTASCII_USTRINGPARAM(asdf * ));
-const static String str6(RTL_CONSTASCII_USTRINGPARAM(asdf (abc) *));
-const static String str7(RTL_CONSTASCII_USTRINGPARAM(asdf asdf * (abc)));
-const static String str8(RTL_CONSTASCII_USTRINGPARAM( * (abc) asdf *));
-
-String r = linguistic::GetThesaurusReplaceText(str1);
-CPPUNIT_ASSERT(!r.Len());
+const static ::rtl::OUString str1(RTL_CONSTASCII_USTRINGPARAM());
+const static ::rtl::OUString str2(RTL_CONSTASCII_USTRINGPARAM(asdf));
+const static ::rtl::OUString str3(RTL_CONSTASCII_USTRINGPARAM(asdf 
(abc)));
+const static ::rtl::OUString str4(RTL_CONSTASCII_USTRINGPARAM(asdf*));
+const static ::rtl::OUString str5(RTL_CONSTASCII_USTRINGPARAM(asdf * ));
+const static ::rtl::OUString str6(RTL_CONSTASCII_USTRINGPARAM(asdf (abc) 
*));
+const static ::rtl::OUString str7(RTL_CONSTASCII_USTRINGPARAM(asdf asdf * 
(abc)));
+const static ::rtl::OUString str8(RTL_CONSTASCII_USTRINGPARAM( * (abc) 
asdf *));
+
+::rtl::OUString r = linguistic::GetThesaurusReplaceText(str1);
+CPPUNIT_ASSERT(r.isEmpty());
 
 r = linguistic::GetThesaurusReplaceText(str2);
 CPPUNIT_ASSERT(r == str2);
@@ -156,10 +155,10 @@ namespace
 CPPUNIT_ASSERT(r == str2);
 
 r = linguistic::GetThesaurusReplaceText(str7);
-CPPUNIT_ASSERT(r == String::CreateFromAscii(asdf asdf));
+CPPUNIT_ASSERT(r == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(asdf 
asdf)));
 
 r = linguistic::GetThesaurusReplaceText(str8);
-CPPUNIT_ASSERT(!r.Len());
+CPPUNIT_ASSERT(r.isEmpty());
   }
 
   CPPUNIT_TEST_SUITE_REGISTRATION(LngMiscTest);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-11-28 Thread August Sodora
 basctl/source/basicide/localizationmgr.cxx |   14 +++---
 basctl/source/inc/localizationmgr.hxx  |8 
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit a82a87315033e416d267242002b6722051deb8a4
Author: August Sodora aug...@gmail.com
Date:   Mon Nov 28 22:16:47 2011 -0500

String-OUString

diff --git a/basctl/source/basicide/localizationmgr.cxx 
b/basctl/source/basicide/localizationmgr.cxx
index d6cd053..cf034d8 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -50,7 +50,7 @@ static ::rtl::OUString aSemi( RTL_CONSTASCII_USTRINGPARAM( 
; ));
 
 
 LocalizationMgr::LocalizationMgr( BasicIDEShell* pIDEShell,
-const ScriptDocument rDocument, String aLibName,
+const ScriptDocument rDocument, ::rtl::OUString aLibName,
 const Reference XStringResourceManager  xStringResourceManager )
 : m_xStringResourceManager( xStringResourceManager )
 , m_pIDEShell( pIDEShell )
@@ -927,8 +927,8 @@ void 
LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
 BasicIDE::MarkDocumentModified( aDocument );
 }
 
-void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument 
rDocument, const String aLibName,
-const String aDlgName, Reference container::XNameContainer  
xDialogModel )
+void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument 
rDocument, const ::rtl::OUString aLibName,
+const ::rtl::OUString aDlgName, Reference container::XNameContainer  
xDialogModel )
 {
 static ::rtl::OUString aResourceResolverPropName( 
RTL_CONSTASCII_USTRINGPARAM( ResourceResolver ));
 
@@ -959,8 +959,8 @@ void LocalizationMgr::setStringResourceAtDialog( const 
ScriptDocument rDocument
 }
 }
 
-void LocalizationMgr::renameStringResourceIDs( const ScriptDocument 
rDocument, const String aLibName,
-const String aDlgName, Reference container::XNameContainer  
xDialogModel )
+void LocalizationMgr::renameStringResourceIDs( const ScriptDocument 
rDocument, const ::rtl::OUString aLibName,
+const ::rtl::OUString aDlgName, Reference container::XNameContainer  
xDialogModel )
 {
 // Get library
 Reference container::XNameContainer  xDialogLib( rDocument.getLibrary( 
E_DIALOGS, aLibName, sal_True ) );
@@ -990,8 +990,8 @@ void LocalizationMgr::renameStringResourceIDs( const 
ScriptDocument rDocument,
 }
 }
 
-void LocalizationMgr::removeResourceForDialog( const ScriptDocument 
rDocument, const String aLibName,
-const String aDlgName, Reference container::XNameContainer  
xDialogModel )
+void LocalizationMgr::removeResourceForDialog( const ScriptDocument 
rDocument, const ::rtl::OUString aLibName,
+const ::rtl::OUString aDlgName, Reference container::XNameContainer  
xDialogModel )
 {
 // Get library
 Reference container::XNameContainer  xDialogLib( rDocument.getLibrary( 
E_DIALOGS, aLibName, sal_True ) );
diff --git a/basctl/source/inc/localizationmgr.hxx 
b/basctl/source/inc/localizationmgr.hxx
index 6942b8e..67a0131 100644
--- a/basctl/source/inc/localizationmgr.hxx
+++ b/basctl/source/inc/localizationmgr.hxx
@@ -75,7 +75,7 @@ class LocalizationMgr
 void implEnableDisableResourceForAllLibraryDialogs( HandleResourceMode 
eMode );
 
 public:
-LocalizationMgr( BasicIDEShell* pIDEShell, const ScriptDocument 
rDocument, String aLibName,
+LocalizationMgr( BasicIDEShell* pIDEShell, const ScriptDocument 
rDocument, ::rtl::OUString aLibName,
 const ::com::sun::star::uno::Reference
  ::com::sun::star::resource::XStringResourceManager  
xStringResourceManager );
 ::com::sun::star::uno::Reference
@@ -111,13 +111,13 @@ public:
 static void deleteControlResourceIDsForDeletedEditorObject( DlgEditor* 
pEditor,
 ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString 
aCtrlName );
 
-static void setStringResourceAtDialog( const ScriptDocument rDocument, 
const String aLibName, const String aDlgName,
+static void setStringResourceAtDialog( const ScriptDocument rDocument, 
const ::rtl::OUString aLibName, const ::rtl::OUString aDlgName,
 ::com::sun::star::uno::Reference 
::com::sun::star::container::XNameContainer  xDialogModel );
 
-static void renameStringResourceIDs( const ScriptDocument rDocument, 
const String aLibName, const String aDlgName,
+static void renameStringResourceIDs( const ScriptDocument rDocument, 
const ::rtl::OUString aLibName, const ::rtl::OUString aDlgName,
 ::com::sun::star::uno::Reference 
::com::sun::star::container::XNameContainer  xDialogModel );
 
-static void removeResourceForDialog( const ScriptDocument rDocument, 
const String aLibName, const String aDlgName,
+static void removeResourceForDialog( const ScriptDocument rDocument, 
const ::rtl::OUString aLibName, const ::rtl::OUString aDlgName,
 ::com::sun::star::uno::Reference 
::com::sun::star::container::XNameContainer  xDialogModel );
 
 static ::com::sun

[Libreoffice-commits] .: basctl/source

2011-11-29 Thread August Sodora
 basctl/source/basicide/bastypes.cxx |4 ++--
 basctl/source/inc/sbxitem.hxx   |   24 +++-
 2 files changed, 13 insertions(+), 15 deletions(-)

New commits:
commit e007d3f3b93235be8dfd328db6cf38475acb49a7
Author: August Sodora aug...@gmail.com
Date:   Wed Nov 30 01:41:45 2011 -0500

String-OUString

diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 91d2576..4dcc710 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -886,7 +886,7 @@ LibInfoItem* LibInfos::GetInfo( const LibInfoKey rKey )
 return pItem;
 }
 
-SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument rDocument, const 
String aLibName, const String aName, sal_uInt16 nType )
+SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument rDocument, const 
::rtl::OUString aLibName, const ::rtl::OUString aName, sal_uInt16 nType )
 :SfxPoolItem( nWhich_ )
 ,m_aDocument(rDocument)
 ,m_aLibName(aLibName)
@@ -895,7 +895,7 @@ SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument 
rDocument, const Stri
 {
 }
 
-SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument rDocument, const 
String aLibName, const String aName, const String aMethodName, sal_uInt16 
nType )
+SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument rDocument, const 
::rtl::OUString aLibName, const ::rtl::OUString aName, const ::rtl::OUString 
aMethodName, sal_uInt16 nType )
 :SfxPoolItem( nWhich_ )
 ,m_aDocument(rDocument)
 ,m_aLibName(aLibName)
diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx
index d1efe51..94a8b51 100644
--- a/basctl/source/inc/sbxitem.hxx
+++ b/basctl/source/inc/sbxitem.hxx
@@ -38,19 +38,18 @@ const sal_uInt16 BASICIDE_TYPE_MODULE   =   3;
 const sal_uInt16 BASICIDE_TYPE_DIALOG   =   4;
 const sal_uInt16 BASICIDE_TYPE_METHOD   =   5;
 
-
 class SbxItem : public SfxPoolItem
 {
 ScriptDocument  m_aDocument;
-String  m_aLibName;
-String  m_aName;
-String  m_aMethodName;
+::rtl::OUString m_aLibName;
+::rtl::OUString m_aName;
+::rtl::OUString m_aMethodName;
 sal_uInt16  m_nType;
 
 public:
 TYPEINFO();
-SbxItem( sal_uInt16 nWhich, const ScriptDocument rDocument, const String 
aLibName, const String aName, sal_uInt16 nType );
-SbxItem( sal_uInt16 nWhich, const ScriptDocument rDocument, const String 
aLibName, const String aName, const String aMethodName, sal_uInt16 nType );
+SbxItem( sal_uInt16 nWhich, const ScriptDocument rDocument, const 
::rtl::OUString aLibName, const ::rtl::OUString aName, sal_uInt16 nType );
+SbxItem( sal_uInt16 nWhich, const ScriptDocument rDocument, const 
::rtl::OUString aLibName, const ::rtl::OUString aName, const ::rtl::OUString 
aMethodName, sal_uInt16 nType );
 SbxItem( const SbxItem );
 
 virtual SfxPoolItem*Clone( SfxItemPool *pPool = 0 ) const;
@@ -60,20 +59,19 @@ public:
 GetDocument() const { return m_aDocument; }
 voidSetDocument( const ScriptDocument rDocument ) { 
m_aDocument = rDocument; }
 
-const String   GetLibName() const { return m_aLibName; }
-voidSetLibName( const String aLibName ) { m_aLibName 
= aLibName; }
+const ::rtl::OUString  GetLibName() const { return m_aLibName; }
+voidSetLibName( const ::rtl::OUString aLibName ) { 
m_aLibName = aLibName; }
 
-const String   GetName() const { return m_aName; }
-voidSetName( const String aName ) { m_aName = aName; }
+const ::rtl::OUString  GetName() const { return m_aName; }
+voidSetName( const ::rtl::OUString aName ) { m_aName 
= aName; }
 
-const String   GetMethodName() const { return m_aMethodName; }
-voidSetMethodName( const String aMethodName ) { 
m_aMethodName = aMethodName; }
+const ::rtl::OUString  GetMethodName() const { return m_aMethodName; }
+voidSetMethodName( const ::rtl::OUString aMethodName 
) { m_aMethodName = aMethodName; }
 
 sal_uInt16  GetType() const { return m_nType; }
 voidSetType( sal_uInt16 nType ) { m_nType = nType; }
 };
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-11-29 Thread August Sodora
 basctl/source/basicide/basides1.cxx |   20 ++--
 basctl/source/basicide/basidesh.cxx |6 +++---
 basctl/source/basicide/basobj2.cxx  |2 +-
 basctl/source/basicide/basobj3.cxx  |2 +-
 basctl/source/basicide/bastype2.hxx |2 +-
 basctl/source/basicide/bastype3.cxx |   14 +++---
 basctl/source/basicide/bastypes.cxx |4 ++--
 basctl/source/basicide/moduldl2.cxx |2 +-
 basctl/source/basicide/moduldlg.cxx |4 ++--
 basctl/source/inc/basidesh.hxx  |2 +-
 basctl/source/inc/sbxitem.hxx   |   25 ++---
 11 files changed, 43 insertions(+), 40 deletions(-)

New commits:
commit 1eb974c1429967ce76db4b16192a9a95b3e8cc6f
Author: August Sodora aug...@gmail.com
Date:   Wed Nov 30 02:11:15 2011 -0500

Convert group of consts to enum

diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 8d184e2..2aff96e 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -615,9 +615,9 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest rReq )
 String aName( rSbxItem.GetName() );
 if ( !m_aCurLibName.Len() || ( aDocument == m_aCurDocument  
aLibName == m_aCurLibName ) )
 {
-if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
+if ( rSbxItem.GetType() == BasicIDEType::Module )
 FindBasWin( aDocument, aLibName, aName, sal_True );
-else if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
+else if ( rSbxItem.GetType() == BasicIDEType::Dialog )
 FindDlgWin( aDocument, aLibName, aName, sal_True );
 }
 }
@@ -641,15 +641,15 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest rReq )
 String aName( rSbxItem.GetName() );
 SetCurLib( aDocument, aLibName );
 IDEBaseWindow* pWin = 0;
-if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
+if ( rSbxItem.GetType() == BasicIDEType::Dialog )
 {
 pWin = FindDlgWin( aDocument, aLibName, aName, sal_True );
 }
-else if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
+else if ( rSbxItem.GetType() == BasicIDEType::Module )
 {
 pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
 }
-else if ( rSbxItem.GetType() == BASICIDE_TYPE_METHOD )
+else if ( rSbxItem.GetType() == BasicIDEType::Method )
 {
 pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
 ((ModulWindow*)pWin)-EditMacro( rSbxItem.GetMethodName() );
@@ -1137,7 +1137,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, 
sal_Bool bUpdateTabBar
 BasicIDEData* pData = BasicIDEGlobals::GetExtraData();
 if ( pData )
 {
-sal_uInt16 nCurrentType = pCurWin-IsA( TYPE( ModulWindow 
) ) ? BASICIDE_TYPE_MODULE : BASICIDE_TYPE_DIALOG;
+sal_uInt16 nCurrentType = pCurWin-IsA( TYPE( ModulWindow 
) ) ? BasicIDEType::Module : BasicIDEType::Dialog;
 LibInfoItem* pLibInfoItem = new LibInfoItem( 
pCurWin-GetDocument(), pCurWin-GetLibName(), pCurWin-GetName(), nCurrentType 
);
 pData-GetLibInfos().InsertInfo( pLibInfoItem );
 }
@@ -1240,21 +1240,21 @@ IDEBaseWindow* BasicIDEShell::FindApplicationWindow()
 return FindWindow( ScriptDocument::getApplicationScriptDocument() );
 }
 
-IDEBaseWindow* BasicIDEShell::FindWindow( const ScriptDocument rDocument, 
const String rLibName, const String rName, sal_uInt16 nType, sal_Bool 
bFindSuspended )
+IDEBaseWindow* BasicIDEShell::FindWindow( const ScriptDocument rDocument, 
const String rLibName, const String rName, BasicIDEType nType, sal_Bool 
bFindSuspended )
 {
 IDEBaseWindow* pWin = aIDEWindowTable.First();
 while ( pWin )
 {
 if ( !pWin-IsSuspended() || bFindSuspended )
 {
-if ( !rLibName.Len() || !rName.Len() || nType == 
BASICIDE_TYPE_UNKNOWN )
+if ( !rLibName.Len() || !rName.Len() || nType == 
BasicIDEType::Unknown )
 {
 // return any non-suspended window
 return pWin;
 }
 else if ( pWin-IsDocument( rDocument )  pWin-GetLibName() == 
rLibName  pWin-GetName() == rName 
-  ( ( pWin-IsA( TYPE( ModulWindow ) )   nType == 
BASICIDE_TYPE_MODULE ) ||
-( pWin-IsA( TYPE( DialogWindow ) )  nType == 
BASICIDE_TYPE_DIALOG ) ) )
+  ( ( pWin-IsA( TYPE( ModulWindow ) )   nType == 
BasicIDEType::Module ) ||
+( pWin-IsA( TYPE( DialogWindow ) )  nType == 
BasicIDEType::Dialog ) ) )
 {
 return pWin;
 }
diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index b9d2dc2

[Libreoffice-commits] .: basctl/Library_basctl.mk basctl/source

2011-11-30 Thread August Sodora
 basctl/Library_basctl.mk|1 
 basctl/source/basicide/bastypes.cxx |   48 -
 basctl/source/basicide/sbxitem.cxx  |  126 
 basctl/source/inc/sbxitem.hxx   |   31 
 4 files changed, 142 insertions(+), 64 deletions(-)

New commits:
commit 93e3a86977cb8a2d60db7cf3489564c95d18ee80
Author: August Sodora aug...@gmail.com
Date:   Wed Nov 30 21:35:07 2011 -0500

Refactor sbxitem

diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk
index 521a577..45403ec 100644
--- a/basctl/Library_basctl.mk
+++ b/basctl/Library_basctl.mk
@@ -97,6 +97,7 @@ $(eval $(call gb_Library_add_exception_objects,basctl,\
basctl/source/basicide/moduldlg \
basctl/source/basicide/objdlg \
basctl/source/basicide/register \
+   basctl/source/basicide/sbxitem \
basctl/source/basicide/scriptdocument \
basctl/source/basicide/tbxctl \
basctl/source/basicide/unomodel \
diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index b1a6709..7c79bec 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -26,14 +26,10 @@
  *
  /
 
-
 #include vcl/msgbox.hxx
-#include vector
-#include algorithm
 
 #include ide_pch.hxx
 
-
 #include basic/sbx.hxx
 #include helpid.hrc
 #include basidesh.hrc
@@ -886,50 +882,6 @@ LibInfoItem* LibInfos::GetInfo( const LibInfoKey rKey )
 return pItem;
 }
 
-SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument rDocument, const 
::rtl::OUString aLibName, const ::rtl::OUString aName, BasicIDEType nType )
-:SfxPoolItem( nWhich_ )
-,m_aDocument(rDocument)
-,m_aLibName(aLibName)
-,m_aName(aName)
-,m_nType(nType)
-{
-}
-
-SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument rDocument, const 
::rtl::OUString aLibName, const ::rtl::OUString aName, const ::rtl::OUString 
aMethodName, BasicIDEType nType )
-:SfxPoolItem( nWhich_ )
-,m_aDocument(rDocument)
-,m_aLibName(aLibName)
-,m_aName(aName)
-,m_aMethodName(aMethodName)
-,m_nType(nType)
-{
-}
-
-SbxItem::SbxItem(const SbxItem rCopy)
-:SfxPoolItem( rCopy )
-,m_aDocument( rCopy.m_aDocument )
-{
-m_aLibName = rCopy.m_aLibName;
-m_aName = rCopy.m_aName;
-m_aMethodName = rCopy.m_aMethodName;
-m_nType = rCopy.m_nType;
-}
-
-int SbxItem::operator==( const SfxPoolItem rCmp) const
-{
-DBG_ASSERT( rCmp.ISA( SbxItem ), ==: Kein SbxItem! );
-return ( SfxPoolItem::operator==( rCmp )  ( m_aDocument == ((const 
SbxItem)rCmp).m_aDocument )
-  ( m_aLibName == ((const 
SbxItem)rCmp).m_aLibName )
-  ( m_aName == ((const 
SbxItem)rCmp).m_aName )
-  ( m_aMethodName == ((const 
SbxItem)rCmp).m_aMethodName )
-  ( m_nType == ((const 
SbxItem)rCmp).m_nType ) );
-}
-
-SfxPoolItem *SbxItem::Clone( SfxItemPool* ) const
-{
-return new SbxItem(*this);
-}
-
 sal_Bool QueryDel( const String rName, const ResId rId, Window* pParent )
 {
 String aQuery( rId );
diff --git a/basctl/source/basicide/sbxitem.cxx 
b/basctl/source/basicide/sbxitem.cxx
new file mode 100644
index 000..e1837c6
--- /dev/null
+++ b/basctl/source/basicide/sbxitem.cxx
@@ -0,0 +1,126 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * http://www.openoffice.org/license.html
+ * for a copy of the LGPLv3 License.
+ *
+ /
+
+#include sbxitem.hxx
+
+SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument rDocument, const 
::rtl::OUString aLibName, const ::rtl::OUString aName, BasicIDEType nType)
+:SfxPoolItem( nWhich_ )
+,m_aDocument(rDocument)
+,m_aLibName(aLibName)
+,m_aName(aName

[Libreoffice-commits] .: basctl/source

2011-11-30 Thread August Sodora
 basctl/source/basicide/bastypes.cxx |   35 +++
 1 file changed, 15 insertions(+), 20 deletions(-)

New commits:
commit 8ceae013e9664bfc86d4f95d00b2c7fb1f42be76
Author: August Sodora aug...@gmail.com
Date:   Wed Nov 30 21:48:32 2011 -0500

Remove unnecessary includes

diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 7c79bec..f7dc4e5 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -26,29 +26,24 @@
  *
  /
 
-#include vcl/msgbox.hxx
-
-#include ide_pch.hxx
-
-#include basic/sbx.hxx
-#include helpid.hrc
-#include basidesh.hrc
-#include bastypes.hxx
-#include bastype2.hxx
-#include baside2.hxx  // unfortunately pModulWindow is needed partly...
-#include baside3.hxx
-#include baside2.hrc
-#include svtools/textview.hxx
-#include svtools/texteng.hxx
-#include basobj.hxx
-#include sbxitem.hxx
-#include iderdll.hxx
+#include baside2.hrc
+#include basidesh.hrc
+#include helpid.hrc
 
-#include sfx2/passwd.hxx
+#include baside2.hxx // unfortunately pModulWindow is needed partly...
+#include baside3.hxx
+#include basobj.hxx
+#include iderdll.hxx
 
-#include com/sun/star/script/XLibraryContainer2.hpp
-#include com/sun/star/script/XLibraryContainerPassword.hpp
+#include basic/basmgr.hxx
 #include com/sun/star/script/ModuleType.hpp
+#include com/sun/star/script/XLibraryContainerPassword.hpp
+#include sfx2/dispatch.hxx
+#include sfx2/passwd.hxx
+#include sfx2/viewfrm.hxx
+#include svl/intitem.hxx
+#include svl/stritem.hxx
+#include vcl/msgbox.hxx
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basctl/source

2011-11-30 Thread August Sodora
 basctl/source/dlged/managelang.cxx |   14 ++
 basctl/source/inc/managelang.hxx   |   12 ++--
 2 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit 98fd966d0c2c46b51b84da26cdb4bc5ac81e0372
Author: August Sodora aug...@gmail.com
Date:   Wed Nov 30 22:03:58 2011 -0500

Remove unnecessary includes

diff --git a/basctl/source/dlged/managelang.cxx 
b/basctl/source/dlged/managelang.cxx
index feeabbd..d41ed42 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -26,24 +26,23 @@
  *
  /
 
-
 #include basidesh.hxx
 #include basobj.hxx
-#include dlgresid.hrc
 #include iderdll.hxx
 #include iderid.hxx
 #include localizationmgr.hxx
 #include managelang.hxx
 
-#include managelang.hrc
+#include dlgresid.hrc
 #include helpid.hrc
+#include managelang.hrc
 
-#include com/sun/star/i18n/XBreakIterator.hpp
 #include com/sun/star/i18n/WordType.hpp
 #include comphelper/string.hxx
 #include editeng/unolingu.hxx
 #include sfx2/bindings.hxx
 #include svtools/langtab.hxx
+#include svx/langbox.hxx
 #include vcl/unohelp.hxx
 #include vcl/svapp.hxx
 #include vcl/msgbox.hxx
diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx
index 6d81efd..f9f9dba 100644
--- a/basctl/source/inc/managelang.hxx
+++ b/basctl/source/inc/managelang.hxx
@@ -29,13 +29,13 @@
 #ifndef _BASCTL_MANAGELANG_HXX
 #define _BASCTL_MANAGELANG_HXX
 
-#include svx/langbox.hxx
 #include svx/checklbx.hxx
 #include vcl/button.hxx
 #include vcl/dialog.hxx
 #include vcl/fixed.hxx
 
 class LocalizationMgr;
+class SvxLanguageBox;
 
 struct LanguageEntry
 {
commit b291c3a1f2d0595096d671c8f6d2812caa993f83
Author: August Sodora aug...@gmail.com
Date:   Wed Nov 30 21:56:20 2011 -0500

String-OUString

diff --git a/basctl/source/dlged/managelang.cxx 
b/basctl/source/dlged/managelang.cxx
index a83c62c..feeabbd 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -100,10 +100,9 @@ ManageLanguageDialog::ManageLanguageDialog( Window* 
pParent, LocalizationMgr* _p
 m_aHelpBtn  ( this, IDEResId( PB_HELP ) ),
 m_aCloseBtn ( this, IDEResId( PB_CLOSE ) ),
 m_pLocalizationMgr  ( _pLMgr ),
-m_sDefLangStr   (   IDEResId( STR_DEF_LANG ) ),
-m_sDeleteStr(   IDEResId( STR_DELETE ) ),
-m_sCreateLangStr(   IDEResId( STR_CREATE_LANG ) )
-
+m_sDefLangStr   (ResId::toString(IDEResId(STR_DEF_LANG))),
+m_sDeleteStr(ResId::toString(IDEResId(STR_DELETE))),
+m_sCreateLangStr(ResId::toString(IDEResId(STR_CREATE_LANG)))
 {
 FreeResource();
 
diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx
index d31188f..6d81efd 100644
--- a/basctl/source/inc/managelang.hxx
+++ b/basctl/source/inc/managelang.hxx
@@ -39,11 +39,11 @@ class LocalizationMgr;
 
 struct LanguageEntry
 {
-String  m_sLanguage;
+::rtl::OUString m_sLanguage;
 ::com::sun::star::lang::Locale  m_aLocale;
 boolm_bIsDefault;
 
-LanguageEntry( const String _rLanguage,
+LanguageEntry( const ::rtl::OUString _rLanguage,
const ::com::sun::star::lang::Locale _rLocale,
bool _bIsDefault ) :
 m_sLanguage( _rLanguage ),
@@ -70,9 +70,9 @@ private:
 
 LocalizationMgr*m_pLocalizationMgr;
 
-String  m_sDefLangStr;
-String  m_sDeleteStr;
-String  m_sCreateLangStr;
+::rtl::OUString m_sDefLangStr;
+::rtl::OUString m_sDeleteStr;
+::rtl::OUString m_sCreateLangStr;
 
 voidInit();
 voidCalcInfoSize();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-11-30 Thread August Sodora
 basctl/source/basicide/basdoc.cxx |7 ++-
 basctl/source/basicide/tbxctl.cxx |   16 +++-
 2 files changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 49da4d5da016f8a5cce52014b64362e8daa1bffe
Author: August Sodora aug...@gmail.com
Date:   Wed Nov 30 22:34:22 2011 -0500

Remove unnecessary includes

diff --git a/basctl/source/basicide/basdoc.cxx 
b/basctl/source/basicide/basdoc.cxx
index 4e8db31..01f8535 100644
--- a/basctl/source/basicide/basdoc.cxx
+++ b/basctl/source/basicide/basdoc.cxx
@@ -26,7 +26,12 @@
  *
  /
 
-#include ide_pch.hxx
+#include sfx2/app.hxx
+#include sfx2/docfac.hxx
+#include sfx2/printer.hxx
+#include sfx2/objface.hxx
+#include sfx2/objsh.hxx
+#include svl/itemset.hxx
 
 #include unomodel.hxx
 
diff --git a/basctl/source/basicide/tbxctl.cxx 
b/basctl/source/basicide/tbxctl.cxx
index 02f9176..985ed2d 100644
--- a/basctl/source/basicide/tbxctl.cxx
+++ b/basctl/source/basicide/tbxctl.cxx
@@ -26,24 +26,22 @@
  *
  /
 
+#define _BASIDE_POPUPWINDOWTBX
 
+#include tbxctl.hrc
+#include svx/svxids.hrc
 
-#include ide_pch.hxx
-
+#include idetemp.hxx
+#include tbxctl.hxx
 
-#define _BASIDE_POPUPWINDOWTBX
-#include tbxctl.hxx
-#include svx/svxids.hrc
-#include iderid.hxx
-#include tbxctl.hrc
-#include idetemp.hxx
+#include sfx2/dispatch.hxx
 #include sfx2/imagemgr.hxx
+#include sfx2/viewfrm.hxx
 #include svl/aeitem.hxx
 #include vcl/toolbox.hxx
 
 using namespace ::com::sun::star::uno;
 
-
 static ::rtl::OUString aSubToolBarResName( RTL_CONSTASCII_USTRINGPARAM( 
private:resource/toolbar/insertcontrolsbar ) );
 
 SFX_IMPL_TOOLBOX_CONTROL( TbxControls, SfxAllEnumItem )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/JunitTest_sw_complex.mk

2011-11-30 Thread August Sodora
 sw/JunitTest_sw_complex.mk |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 96a5d372f3e2d84522e68407e1061a1c4bfecdb5
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 00:16:23 2011 -0500

fdo#35657: reenable subsequent test

diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
index 3c330b6..4ed426d 100644
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@ -63,9 +63,7 @@ $(eval $(call gb_JunitTest_add_classes,sw_complex,\
 complex.writer.CheckFlies \
 complex.writer.CheckIndexedPropertyValues \
 complex.writer.CheckNamedPropertyValues \
+complex.writer.TextPortionEnumerationTest \
 ))
-# fd#35657 test disabled - reenable if fixed
-#complex.writer.TextPortionEnumerationTest \
-
 
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/source

2011-12-01 Thread August Sodora
 dbaccess/source/filter/xml/xmlExport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ecbed27f6a2b61a6544c92178367eacfa2ea0b50
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 11:23:42 2011 -0500

Check length before operator[]

diff --git a/dbaccess/source/filter/xml/xmlExport.cxx 
b/dbaccess/source/filter/xml/xmlExport.cxx
index 50bf0b1..9da1a0e 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -565,7 +565,7 @@ void ODBExport::exportConnectionData()
 {
 ::svt::OFileNotation aTransformer( sFileName );
 ::rtl::OUStringBuffer sURL( aTransformer.get( 
::svt::OFileNotation::N_URL ) );
-if (sURL[sURL.getLength() - 1] != '/')
+if (sURL.getLength() == 0 || sURL[sURL.getLength() - 1] != 
'/')
 sURL.append('/');
 
 
AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,GetRelativeReference(sURL.makeStringAndClear()));
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source lingucomponent/source sal/inc sal/qa

2011-12-01 Thread August Sodora
 connectivity/source/parse/sqlbison.y |   10 
 lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx |   12 
 sal/inc/rtl/strbuf.hxx   |   36 -
 sal/inc/rtl/ustrbuf.hxx  |   36 -
 sal/qa/OStringBuffer/rtl_OStringBuffer.cxx   |  321 ---
 sal/qa/rtl_strings/rtl_OUStringBuffer.cxx|  172 -
 6 files changed, 11 insertions(+), 576 deletions(-)

New commits:
commit 9ee19c8fad2c3c29c4ff4cc6c37ba8d24d641ccc
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 16:21:54 2011 -0500

fdo#41474: remove setCharAt and charAt from O[U]StringBuffer

diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
index 062b46c..19bb494 100755
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -4529,15 +4529,15 @@ const double fMilliSecondsPerDay = 8640.0;

for (sal_Int32 i = 0; i  nLen; i++)
{
-   const sal_Unicode c = aMatchStr.charAt(i);
-   if (c == sSearch.charAt(0) || c == sSearch.charAt(1))
+   const sal_Unicode c = aMatchStr[i];
+   if (c == sSearch[0] || c == sSearch[1])
{
-   if (i  0  aMatchStr.charAt(i-1) == cEscape)
+   if (i  0  aMatchStr[i - 1] == cEscape)
continue;
else
{
-   const sal_Unicode cCharacter = 
sReplace.charAt( (c == sSearch.charAt(0)) ? 0 : 1);
-   aMatchStr.setCharAt(i , cCharacter);
+   const sal_Unicode cCharacter = 
sReplace[(c == sSearch[0] ? 0 : 1)];
+   aMatchStr[i] = cCharacter;
}
}
}
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx 
b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
index 92aecc5..5baf4d4 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
@@ -248,9 +248,9 @@ sal_Int16 MacSpellChecker::GetSpellFailure( const OUString 
rWord, const Locale
 sal_Int32 n = rBuf.getLength();
 sal_Unicode c;
 for (sal_Int32 ix=0; ix  n; ix++) {
-c = rBuf.charAt(ix);
-if ((c == 0x201C) || (c == 0x201D)) 
rBuf.setCharAt(ix,(sal_Unicode)0x0022);
-if ((c == 0x2018) || (c == 0x2019)) 
rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+c = rBuf[ix];
+if ((c == 0x201C) || (c == 0x201D)) rBuf[ix] = (sal_Unicode)0x0022;
+if ((c == 0x2018) || (c == 0x2019)) rBuf[ix] = (sal_Unicode)0x0027;
 }
 OUString nWord(rBuf.makeStringAndClear());
 
@@ -356,9 +356,9 @@ Reference XSpellAlternatives 
 sal_Int32 n = rBuf.getLength();
 sal_Unicode c;
 for (sal_Int32 ix=0; ix  n; ix++) {
- c = rBuf.charAt(ix);
- if ((c == 0x201C) || (c == 0x201D)) 
rBuf.setCharAt(ix,(sal_Unicode)0x0022);
- if ((c == 0x2018) || (c == 0x2019)) 
rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+ c = rBuf[ix];
+ if ((c == 0x201C) || (c == 0x201D)) rBuf[ix] = (sal_Unicode)0x0022;
+ if ((c == 0x2018) || (c == 0x2019)) rBuf[ix] = (sal_Unicode)0x0027;
 }
 OUString nWord(rBuf.makeStringAndClear());
 
diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index 5f0b9b3..e3ae74b 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -269,25 +269,6 @@ public:
 }
 
 /**
-Returns the character at a specific index in this string buffer.
-
-The first character of a string buffer is at index
-code0/code, the next at index code1/code, and so on, for
-array indexing.
-p
-The index argument must be greater than or equal to
-code0/code, and less than the length of this string buffer.
-
-@param  index   the index of the desired character.
-@return the character at the specified index of this string buffer.
- */
-sal_Char charAt( sal_Int32 index )
-{
-assert(index = 0  index  pData-length);
-return pData-buffer[ index ];
-}
-
-/**
 Return a null terminated character array.
  */
 const sal_Char* getStr() const { return pData-buffer; }
@@ -313,23 +294,6 @@ public:
 }
 
 /**
-The character at the specified index of this string buffer is set
-to codech/code.
-
-The index argument must be greater than or equal to
-code0/code, and less than the length of this string buffer.
-
-@param  index   the index of the character to modify

[Libreoffice-commits] .: sal/qa

2011-12-01 Thread August Sodora
 sal/qa/rtl_strings/rtl_String_Const.h |5 -
 1 file changed, 5 deletions(-)

New commits:
commit c351b1e19f1b1207949b70386640dc06ef0144ad
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 16:41:45 2011 -0500

WaE: unused variables

diff --git a/sal/qa/rtl_strings/rtl_String_Const.h 
b/sal/qa/rtl_strings/rtl_String_Const.h
index 2b14b46..2c2e4b7 100644
--- a/sal/qa/rtl_strings/rtl_String_Const.h
+++ b/sal/qa/rtl_strings/rtl_String_Const.h
@@ -59,7 +59,6 @@ static const sal_uInt32 kConvertFlagsOStringToOUString = 
OSTRING_TO_OUSTRING_CVT
 
 static const sal_Char *kTestStr1  = Sun Microsystems;
 static const sal_Char *kTestStr2  = Sun Microsystems Java Technology;
-static const sal_Char *kTestStr3  = Sun microsystems;
 static const sal_Char *kTestStr4  = SUN MICROSYSTEMS;
 static const sal_Char *kTestStr5  = sun microsystems;
 static const sal_Char *kTestStr6  = Java Technology;
@@ -88,10 +87,6 @@ static const sal_Char *kTestStr28 = 
\50\3\5\7\11\13\15\17sun;
 static const sal_Char *kTestStr29 = 
\50\3\5\7\11\13\15\17sun\21\23\25\27\31\33\50;
 static const sal_Char *kTestStr30 = sun\21\23\25\27\31\33\50;
 static const sal_Char *kTestStr31 = sun Microsystems;
-static const sal_Char *kTestStr32 = Sun Microsystem ;
-static const sal_Char *kTestStr33 =  ;
-static const sal_Char *kTestStr34 = \50\5\5\7\11\13\15\17sun;
-static const sal_Char *kTestStr35 = \50\373\5\7\11\13\15\17sun;
 static const sal_Char *kTestStr36 = Microsystems Java Technology;
 static const sal_Char *kTestStr37 = Sun  Java Technology;
 static const sal_Char *kTestStr38 = \21\23\25\27\31\33\50;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2011-12-01 Thread August Sodora
 vcl/aqua/source/gdi/aquaprintaccessoryview.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1722c68c81974e509fe11910a5190c01e455d39e
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 17:44:41 2011 -0500

Fix build in macosx

diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm 
b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index 3a7fc59..17ee5a4 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -774,7 +774,7 @@ static void linebreakCell( NSCell* pBtn, const 
rtl::OUString i_rText )
 if( nIndex  nLen )
 {
 rtl::OUStringBuffer aBuf( i_rText );
-aBuf.setCharAt( nIndex, '\n' );
+aBuf[nIndex] = '\n';
 pText = CreateNSString( aBuf.makeStringAndClear() );
 [pBtn setTitle: pText];
 [pText release];
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: binfilter/bf_sw binfilter/bf_xmloff

2011-12-01 Thread August Sodora
 binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx |2 -
 binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx |   26 +--
 binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx|4 +-
 3 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 43e9388234d6294c67f399be86e6acd308f7b386
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 18:53:37 2011 -0500

Remove charAt/setCharAt from binfilter

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx 
b/binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx
index 83fef26..4fd84db 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx
@@ -72,7 +72,7 @@ void Crypter::Encrypt( rtl::OStringBuffer r ) const
 
 while( nLen-- )
 {
-r.setCharAt(i, r[i] ^ ( *p ^ (BYTE) ( cBuf[ 0 ] * nCryptPtr ) ));
+r[i] = r[i] ^ ( *p ^ (BYTE) ( cBuf[ 0 ] * nCryptPtr ) );
 *p += ( nCryptPtr  (PASSWDLEN-1) ) ? *(p+1) : cBuf[ 0 ];
 if( !*p )
 *p += 1;
diff --git a/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx 
b/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
index 3ca6af4..7875e96 100644
--- a/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
+++ b/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
@@ -795,10 +795,10 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer 
rContent, sal_uInt16 nFormat
 sal_Int32 nLength = rContent.getLength();
 
 if ( ( nLength == 1 
-lcl_ValidChar( rContent.charAt(0), nFormatType ) ) ||
+lcl_ValidChar( rContent[0], nFormatType ) ) ||
  ( nLength == 2 
- lcl_ValidChar( rContent.charAt(0), nFormatType ) 
- rContent.charAt(1) == ' ' ) )
+ lcl_ValidChar( rContent[0], nFormatType ) 
+ rContent[1] == ' ' ) )
 {
 //  don't quote single separator characters like space or percent,
 //  or separator characters followed by space (used in date formats)
@@ -815,7 +815,7 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer 
rContent, sal_uInt16 nFormat
 {
 if ( nPos + 1  nLength )
 {
-if ( nPos + 2 == nLength  lcl_ValidChar( 
rContent.charAt(nPos + 1), nFormatType ) )
+if ( nPos + 2 == nLength  lcl_ValidChar( rContent[nPos + 1], 
nFormatType ) )
 {
 //  single character that doesn't need quoting
 }
@@ -828,7 +828,7 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer 
rContent, sal_uInt16 nFormat
 }
 if ( nPos  0 )
 {
-if ( nPos == 1  lcl_ValidChar( rContent.charAt(0), 
nFormatType ) )
+if ( nPos == 1  rContent.getLength()  0  lcl_ValidChar( 
rContent[0], nFormatType ) )
 {
 //  single character that doesn't need quoting
 }
@@ -858,7 +858,7 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer 
rContent, sal_uInt16 nFormat
 sal_Int32 nPos = 0;
 while ( nPos  rContent.getLength() )
 {
-if ( rContent.charAt( nPos ) == (sal_Unicode) '' )
+if ( rContent[nPos] == (sal_Unicode) '' )
 {
 rContent.insert( nPos, aInsert );
 nPos += aInsert.getLength();
@@ -875,8 +875,8 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer 
rContent, sal_uInt16 nFormat
 if ( bEscape )
 {
 if ( rContent.getLength()  2 
- rContent.charAt(0) == (sal_Unicode) '' 
- rContent.charAt(1) == (sal_Unicode) '' )
+ rContent[0] == (sal_Unicode) '' 
+ rContent[1] == (sal_Unicode) '' )
 {
 String aTrimmed( rContent.makeStringAndClear().copy(2) );
 rContent = rtl::OUStringBuffer( aTrimmed );
@@ -884,8 +884,8 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer 
rContent, sal_uInt16 nFormat
 
 sal_Int32 nLen = rContent.getLength();
 if ( nLen  2 
- rContent.charAt(nLen-1) == (sal_Unicode) '' 
- rContent.charAt(nLen-2) == (sal_Unicode) '' )
+ rContent[nLen - 1] == (sal_Unicode) '' 
+ rContent[nLen - 2] == (sal_Unicode) '' )
 {
 String aTrimmed( rContent.makeStringAndClear().copy( 0, nLen - 
2 ) );
 rContent = rtl::OUStringBuffer( aTrimmed );
@@ -1827,14 +1827,14 @@ void SvXMLNumFormatContext::AddCurrency( const 
::rtl::OUString rContent, Langua
 //  otherwise the currency symbol isn't recognized (#94048#)
 
 sal_Int32 nLength = aFormatCode.getLength();
-if ( nLength  1  aFormatCode.charAt( nLength-1 ) == '' )
+if ( nLength  1  aFormatCode[nLength - 1] == '' )
 {
 //  find start of quoted string
 //  When SvXMLNumFmtElementContext::EndElement

[Libreoffice-commits] .: sal/inc

2011-12-01 Thread August Sodora
 sal/inc/rtl/strbuf.hxx  |   36 
 sal/inc/rtl/ustrbuf.hxx |   36 
 2 files changed, 72 deletions(-)

New commits:
commit 1820e7f575dffe53062f50f08cebf0efa37e2cc2
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 18:58:46 2011 -0500

Remove charAt/setCharAt once and for all

diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index 3ea6bc0..e3ae74b 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -269,42 +269,6 @@ public:
 }
 
 /**
-Returns the character at a specific index in this string buffer.
-
-The first character of a string buffer is at index
-code0/code, the next at index code1/code, and so on, for
-array indexing.
-p
-The index argument must be greater than or equal to
-code0/code, and less than the length of this string buffer.
-
-@param  index   the index of the desired character.
-@return the character at the specified index of this string buffer.
-*/
-sal_Char charAt( sal_Int32 index )
-{
-assert(index = 0  index  pData-length);
-return pData-buffer[ index ];
-}
-
-/**
-The character at the specified index of this string buffer is set
-to codech/code.
-
-The index argument must be greater than or equal to
-code0/code, and less than the length of this string buffer.
-
-@param  index   the index of the character to modify.
-@param  ch  the new character.
- */
-OStringBuffer  setCharAt(sal_Int32 index, sal_Char ch)
-{
-assert(index = 0  index  pData-length);
-pData-buffer[ index ] = ch;
-return *this;
-}
-
-/**
 Return a null terminated character array.
  */
 const sal_Char* getStr() const { return pData-buffer; }
diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx
index b4d4871..624b6f0 100644
--- a/sal/inc/rtl/ustrbuf.hxx
+++ b/sal/inc/rtl/ustrbuf.hxx
@@ -248,42 +248,6 @@ public:
 }
 
 /**
-Returns the character at a specific index in this string buffer.
-
-The first character of a string buffer is at index
-code0/code, the next at index code1/code, and so on, for
-array indexing.
-p
-The index argument must be greater than or equal to
-code0/code, and less than the length of this string buffer.
-
-@param  index   the index of the desired character.
-@return the character at the specified index of this string buffer.
- */
-sal_Unicode charAt( sal_Int32 index ) const
-{
-assert(index = 0  index  pData-length);
-return pData-buffer[ index ];
-}
-
-/**
-The character at the specified index of this string buffer is set
-to codech/code.
-
-The index argument must be greater than or equal to
-code0/code, and less than the length of this string buffer.
-
-@param  index   the index of the character to modify.
-@param  ch  the new character.
- */
-OUStringBuffer  setCharAt(sal_Int32 index, sal_Unicode ch)
-{
-assert(index = 0  index  pData-length);
-pData-buffer[ index ] = ch;
-return *this;
-}
-
-/**
 Return a null terminated unicode character array.
  */
 const sal_Unicode*  getStr() const { return pData-buffer; }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2011-12-03 Thread August Sodora
 sfx2/source/view/viewfrm.cxx |   15 ---
 1 file changed, 15 deletions(-)

New commits:
commit f4b3bd91ca177101d90f522e81163dc6421e14c9
Author: August Sodora aug...@gmail.com
Date:   Sat Dec 3 18:24:06 2011 -0500

fdo#41865: Make macro recording work without experimental features

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 36b1e3e..a158f53 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3037,14 +3037,6 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet rSet)
 case SID_RECORDMACRO :
 {
 SvtMiscOptions aMiscOptions;
-const char* pName = 
GetObjectShell()-GetFactory().GetShortName();
-if ( !aMiscOptions.IsExperimentalMode() ||
- ( strcmp(pName,swriter)  strcmp(pName,scalc) ) )
-{
-rSet.DisableItem( nWhich );
-rSet.Put(SfxVisibilityItem(nWhich, sal_False));
-break;
-}
 
 ::rtl::OUString 
sProperty(RTL_CONSTASCII_USTRINGPARAM(DispatchRecorderSupplier));
 com::sun::star::uno::Reference 
com::sun::star::beans::XPropertySet  xSet(
@@ -3063,13 +3055,6 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet rSet)
 case SID_STOP_RECORDING :
 {
 SvtMiscOptions aMiscOptions;
-const char* pName = 
GetObjectShell()-GetFactory().GetShortName();
-if ( !aMiscOptions.IsExperimentalMode() ||
- ( strcmp(pName,swriter)  strcmp(pName,scalc) ) )
-{
-rSet.DisableItem( nWhich );
-break;
-}
 
 ::rtl::OUString 
sProperty(RTL_CONSTASCII_USTRINGPARAM(DispatchRecorderSupplier));
 com::sun::star::uno::Reference 
com::sun::star::beans::XPropertySet  xSet(
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2011-12-03 Thread August Sodora
 sfx2/source/view/viewfrm.cxx |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 2561e3f7860e79817658e536b91192cedaa4aab7
Author: August Sodora aug...@gmail.com
Date:   Sat Dec 3 19:53:47 2011 -0500

Revert fdo#41865: Make macro recording work without experimental features

This reverts commit f4b3bd91ca177101d90f522e81163dc6421e14c9.

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index a158f53..36b1e3e 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3037,6 +3037,14 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet rSet)
 case SID_RECORDMACRO :
 {
 SvtMiscOptions aMiscOptions;
+const char* pName = 
GetObjectShell()-GetFactory().GetShortName();
+if ( !aMiscOptions.IsExperimentalMode() ||
+ ( strcmp(pName,swriter)  strcmp(pName,scalc) ) )
+{
+rSet.DisableItem( nWhich );
+rSet.Put(SfxVisibilityItem(nWhich, sal_False));
+break;
+}
 
 ::rtl::OUString 
sProperty(RTL_CONSTASCII_USTRINGPARAM(DispatchRecorderSupplier));
 com::sun::star::uno::Reference 
com::sun::star::beans::XPropertySet  xSet(
@@ -3055,6 +3063,13 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet rSet)
 case SID_STOP_RECORDING :
 {
 SvtMiscOptions aMiscOptions;
+const char* pName = 
GetObjectShell()-GetFactory().GetShortName();
+if ( !aMiscOptions.IsExperimentalMode() ||
+ ( strcmp(pName,swriter)  strcmp(pName,scalc) ) )
+{
+rSet.DisableItem( nWhich );
+break;
+}
 
 ::rtl::OUString 
sProperty(RTL_CONSTASCII_USTRINGPARAM(DispatchRecorderSupplier));
 com::sun::star::uno::Reference 
com::sun::star::beans::XPropertySet  xSet(
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-12-04 Thread August Sodora
 basic/source/comp/scanner.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit cc744ef568fed0529da133a9d97e1dec19daab10
Author: August Sodora aug...@gmail.com
Date:   Sun Dec 4 17:29:16 2011 -0500

Use sal_uInt16 here

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 3b57781..dabeffe 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -152,7 +152,7 @@ static SbxDataType GetSuffixType( sal_Unicode c )
 
 void SbiScanner::scanGoto()
 {
-short nTestCol = nCol;
+sal_uInt16 nTestCol = nCol;
 while(nTestCol  aLine.getLength()  
theBasicCharClass::get().isWhitespace(aLine[nTestCol]))
 nTestCol++;
 
@@ -162,7 +162,7 @@ void SbiScanner::scanGoto()
 
if(aTestSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(to)))
 {
 aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(goto));
-pLine += (nTestCol - nCol) + 2;
+pLine += nTestCol + 2 - nCol;
 nCol = nTestCol + 2;
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-12-04 Thread August Sodora
 basic/source/comp/scanner.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0bcc6c93b8dbd92f7f13ea40c464636b00be0d6f
Author: August Sodora aug...@gmail.com
Date:   Sun Dec 4 18:08:28 2011 -0500

Use appropriate datatypes here too

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index dabeffe..cc17fd5 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -240,7 +240,7 @@ bool SbiScanner::NextSym()
 {   pLine++;
 goto eoln;  }
 bSymbol = true;
-short n = nCol;
+sal_uInt16 n = nCol;
 for ( ; (theBasicCharClass::get().isAlphaNumeric( *pLine, bCompatible 
) || ( *pLine == '_' ) ); pLine++ )
 nCol++;
 aSym = aLine.copy( n, nCol - n );
@@ -424,7 +424,7 @@ bool SbiScanner::NextSym()
 sal_Unicode cSep = *pLine;
 if( cSep == '[' )
 bSymbol = true, cSep = ']';
-short n = nCol+1;
+sal_uInt16 n = nCol + 1;
 while( *pLine )
 {
 do pLine++, nCol++;
@@ -460,7 +460,7 @@ bool SbiScanner::NextSym()
 // other groups:
 else
 {
-short n = 1;
+sal_uInt8 n = 1;
 switch( *pLine++ )
 {
 case '': if( *pLine == '' || *pLine == '=' ) n = 2; break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-12-04 Thread August Sodora
 basctl/source/inc/bastypes.hxx |   18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 71de946a1a2f5479667abd0e8cd0446b1db3ee96
Author: August Sodora aug...@gmail.com
Date:   Sun Dec 4 18:55:49 2011 -0500

sal_Bool to bool

diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 25b276a..8684fe5 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -53,14 +53,16 @@ sal_Int32 searchEOL( const ::rtl::OUString rStr, sal_Int32 
fromIndex );
 
 struct BasicStatus
 {
-sal_BoolbIsRunning  : 1;
-sal_BoolbError  : 1;
-sal_BoolbIsInReschedule : 1;
-sal_uInt16  nBasicFlags;
-
-BasicStatus()   {
-bIsRunning = sal_False; bError = sal_False;
-nBasicFlags = 0; bIsInReschedule = sal_False; }
+bool bIsRunning : 1;
+bool bError : 1;
+bool bIsInReschedule : 1;
+sal_uInt16 nBasicFlags;
+
+BasicStatus():
+bIsRunning(false),
+bError(false),
+bIsInReschedule(false),
+nBasicFlags(0) { }
 };
 
 struct BreakPoint
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basctl/Library_basctl.mk basctl/source

2011-12-04 Thread August Sodora
 basctl/Library_basctl.mk  |1 
 basctl/source/basicide/baside2.hxx|1 
 basctl/source/basicide/baside2b.cxx   |2 
 basctl/source/basicide/basidesh.cxx   |4 
 basctl/source/basicide/bastypes.cxx   |  125 ---
 basctl/source/basicide/breakpoint.cxx |  179 ++
 basctl/source/basicide/breakpoint.hxx |   79 +++
 basctl/source/basicide/brkdlg.cxx |   15 +-
 basctl/source/inc/bastypes.hxx|   73 +
 9 files changed, 279 insertions(+), 200 deletions(-)

New commits:
commit f81a7438409ee9cede09b0395d8af0943220a4ea
Author: August Sodora aug...@gmail.com
Date:   Sun Dec 4 22:01:35 2011 -0500

Refactor BreakPoint

diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk
index 45403ec..438c8c3 100644
--- a/basctl/Library_basctl.mk
+++ b/basctl/Library_basctl.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_Library_add_exception_objects,basctl,\
basctl/source/basicide/bastype2 \
basctl/source/basicide/bastype3 \
basctl/source/basicide/bastypes \
+   basctl/source/basicide/breakpoint \
basctl/source/basicide/brkdlg \
basctl/source/basicide/doceventnotifier \
basctl/source/basicide/docsignature \
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 119aa60..e9378ab 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -51,6 +51,7 @@ class SvxSearchItem;
 #include sfx2/progress.hxx
 #include svtools/syntaxhighlight.hxx
 
+#include breakpoint.hxx
 #include linenumberwindow.hxx
 
 DBG_NAMEEX( ModulWindow )
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 4ad4eea..dfef385 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -26,14 +26,12 @@
  *
  /
 
-
 #define _BASIC_TEXTPORTIONS
 
 #include helpid.hrc
 #include baside2.hrc
 
 #include baside2.hxx
-#include basobj.hxx
 #include brkdlg.hxx
 #include iderdll.hxx
 #include iderdll2.hxx
diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 2ced841..21dfce9 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -252,127 +252,6 @@ Window* IDEBaseWindow::GetLayoutWindow()
 return NULL;
 }
 
-BreakPointList::BreakPointList()
-{}
-
-BreakPointList::BreakPointList(BreakPointList const  rList)
-{
-for (size_t i = 0; i  rList.size(); ++i)
-maBreakPoints.push_back( new BreakPoint(*rList.at( i ) ) );
-}
-
-BreakPointList::~BreakPointList()
-{
-reset();
-}
-
-void BreakPointList::reset()
-{
-for ( size_t i = 0, n = maBreakPoints.size(); i  n; ++i )
-delete maBreakPoints[ i ];
-maBreakPoints.clear();
-}
-
-void BreakPointList::transfer(BreakPointList  rList)
-{
-reset();
-for (size_t i = 0; i  rList.size(); ++i)
-maBreakPoints.push_back( rList.at( i ) );
-rList.clear();
-}
-
-void BreakPointList::InsertSorted( BreakPoint* pNewBrk )
-{
-for ( vector BreakPoint* ::iterator i = maBreakPoints.begin(); i  
maBreakPoints.end(); ++i )
-{
-if ( pNewBrk-nLine = (*i)-nLine )
-{
-DBG_ASSERT( ( (*i)-nLine != pNewBrk-nLine ) || pNewBrk-bTemp, 
BreakPoint existiert schon! );
-maBreakPoints.insert( i, pNewBrk );
-return;
-}
-}
-// no insert position found = LIST_APPEND
-maBreakPoints.push_back( pNewBrk );
-}
-
-void BreakPointList::SetBreakPointsInBasic( SbModule* pModule )
-{
-pModule-ClearAllBP();
-
-for ( size_t i = 0, n = maBreakPoints.size(); i  n; ++i )
-{
-BreakPoint* pBrk = maBreakPoints[ i ];
-if ( pBrk-bEnabled )
-pModule-SetBP( (sal_uInt16)pBrk-nLine );
-}
-}
-
-BreakPoint* BreakPointList::FindBreakPoint( size_t nLine )
-{
-for ( size_t i = 0, n = maBreakPoints.size(); i  n; ++i )
-{
-BreakPoint* pBrk = maBreakPoints[ i ];
-if ( pBrk-nLine == nLine )
-return pBrk;
-}
-return NULL;
-}
-
-void BreakPointList::AdjustBreakPoints( size_t nLine, bool bInserted )
-{
-for ( size_t i = 0; i  maBreakPoints.size(); )
-{
-BreakPoint* pBrk = maBreakPoints[ i ];
-bool bDelBrk = false;
-if ( pBrk-nLine == nLine )
-{
-if ( bInserted )
-pBrk-nLine++;
-else
-bDelBrk = true;
-}
-else if ( pBrk-nLine  nLine )
-{
-if ( bInserted )
-pBrk-nLine++;
-else
-pBrk-nLine--;
-}
-
-if ( bDelBrk )
-{
-delete remove( pBrk );
-}
-else
-{
-++i;
-}
-}
-}
-
-void BreakPointList::ResetHitCount()
-{
-for ( size_t i = 0, n = maBreakPoints.size(); i  n; ++i

[Libreoffice-commits] .: basic/source

2011-12-04 Thread August Sodora
 basic/source/comp/scanner.cxx |   17 +
 basic/source/inc/scanner.hxx  |1 +
 2 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 40be618fb31754611dbd4241322004b205774976
Author: August Sodora aug...@gmail.com
Date:   Sun Dec 4 22:13:24 2011 -0500

Refactor scanAlphanumeric

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index cc17fd5..4b4ba23 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -150,6 +150,17 @@ static SbxDataType GetSuffixType( sal_Unicode c )
 // return value is sal_False at EOF or errors
 #define BUF_SIZE 80
 
+void SbiScanner::scanAlphanumeric()
+{
+sal_uInt16 n = nCol;
+while(theBasicCharClass::get().isAlphaNumeric(*pLine, bCompatible) || 
*pLine == '_')
+{
+pLine++;
+nCol++;
+}
+aSym = aLine.copy(n, nCol - n);
+}
+
 void SbiScanner::scanGoto()
 {
 sal_uInt16 nTestCol = nCol;
@@ -240,10 +251,8 @@ bool SbiScanner::NextSym()
 {   pLine++;
 goto eoln;  }
 bSymbol = true;
-sal_uInt16 n = nCol;
-for ( ; (theBasicCharClass::get().isAlphaNumeric( *pLine, bCompatible 
) || ( *pLine == '_' ) ); pLine++ )
-nCol++;
-aSym = aLine.copy( n, nCol - n );
+
+scanAlphanumeric();
 
 // Special handling for go to
 if( bCompatible  *pLine  aSym.equalsIgnoreAsciiCaseAsciiL( 
RTL_CONSTASCII_STRINGPARAM(go) ) )
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index c254cf2..abda26b 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -46,6 +46,7 @@ class SbiScanner
 const sal_Unicode* pLine;
 const sal_Unicode* pSaveLine;
 
+void scanAlphanumeric();
 void scanGoto();
 protected:
 ::rtl::OUString aSym;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basctl/source

2011-12-04 Thread August Sodora
 basctl/source/basicide/baside2.cxx|   20 +++-
 basctl/source/basicide/breakpoint.cxx |2 ++
 2 files changed, 13 insertions(+), 9 deletions(-)

New commits:
commit ebf168f59f64b868002c10a49448e02939074755
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 5 00:52:02 2011 -0500

So size_t is recognized on windows

diff --git a/basctl/source/basicide/breakpoint.cxx 
b/basctl/source/basicide/breakpoint.cxx
index b763174..6bbfdf9 100644
--- a/basctl/source/basicide/breakpoint.cxx
+++ b/basctl/source/basicide/breakpoint.cxx
@@ -31,6 +31,8 @@
 #include basic/sbmod.hxx
 #include tools/debug.hxx
 
+#include stddef.h
+
 BreakPointList::BreakPointList()
 {}
 
commit 5ca762a9caf9b89f225d2c8ddd32d265d4bddb61
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 5 00:47:35 2011 -0500

String-OUString

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 0f425cf..ddb3781 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -82,7 +82,7 @@ DBG_NAME( ModulWindow )
 
 TYPEINIT1( ModulWindow , IDEBaseWindow );
 
-void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 
nCurPage, const String rTitle, bool bOutput )
+void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 
nCurPage, const ::rtl::OUString rTitle, bool bOutput )
 {
 short nLeftMargin   = LMARGPRN;
 Size aSz = pPrinter-GetOutputSize();
@@ -122,17 +122,20 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 
nPages, sal_uInt16 nCurPage,
 {
 aFont.SetWeight( WEIGHT_NORMAL );
 pPrinter-SetFont( aFont );
-String aPageStr( RTL_CONSTASCII_USTRINGPARAM(  [ ) );
-aPageStr += String( IDEResId( RID_STR_PAGE ) );
-aPageStr += ' ';
-aPageStr += String::CreateFromInt32( nCurPage );
-aPageStr += ']';
 aPos.X() += pPrinter-GetTextWidth( rTitle );
+
 if( bOutput )
-pPrinter-DrawText( aPos, aPageStr );
+{
+::rtl::OUStringBuffer aPageStr;
+aPageStr.appendAscii( RTL_CONSTASCII_STRINGPARAM(  [ ) );
+aPageStr.append(ResId::toString( IDEResId( RID_STR_PAGE ) ));
+aPageStr.append(' ');
+aPageStr.append( nCurPage );
+aPageStr.append(']');
+pPrinter-DrawText( aPos, aPageStr.makeStringAndClear() );
+}
 }
 
-
 nY = TMARGPRN-nBorder;
 
 if( bOutput )
@@ -165,7 +168,6 @@ void lcl_ConvertTabsToSpaces( String rLine )
 }
 }
 
-
 ModulWindow::ModulWindow( ModulWindowLayout* pParent, const ScriptDocument 
rDocument, String aLibName,
   String aName, ::rtl::OUString aModule )
 :IDEBaseWindow( pParent, rDocument, aLibName, aName )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2011-12-05 Thread August Sodora
 basic/source/comp/scanner.cxx |   18 +-
 basic/source/inc/scanner.hxx  |   26 +-
 2 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 971bf1aa4c043ef49e4857204ea49de48707a86a
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 5 17:41:28 2011 -0500

Use sal_Int32 in all these places

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 4b4ba23..e1a5c75 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -91,7 +91,7 @@ void SbiScanner::GenError( SbError code )
 {
 // in case of EXPECTED or UNEXPECTED it always refers
 // to the last token, so take the Col1 over
-sal_uInt16 nc = nColLock ? nSavedCol1 : nCol1;
+sal_Int32 nc = nColLock ? nSavedCol1 : nCol1;
 switch( code )
 {
 case SbERR_EXPECTED:
@@ -152,7 +152,7 @@ static SbxDataType GetSuffixType( sal_Unicode c )
 
 void SbiScanner::scanAlphanumeric()
 {
-sal_uInt16 n = nCol;
+sal_Int32 n = nCol;
 while(theBasicCharClass::get().isAlphaNumeric(*pLine, bCompatible) || 
*pLine == '_')
 {
 pLine++;
@@ -163,7 +163,7 @@ void SbiScanner::scanAlphanumeric()
 
 void SbiScanner::scanGoto()
 {
-sal_uInt16 nTestCol = nCol;
+sal_Int32 nTestCol = nCol;
 while(nTestCol  aLine.getLength()  
theBasicCharClass::get().isWhitespace(aLine[nTestCol]))
 nTestCol++;
 
@@ -182,9 +182,9 @@ void SbiScanner::scanGoto()
 bool SbiScanner::NextSym()
 {
 // memorize for the EOLN-case
-sal_uInt16 nOldLine = nLine;
-sal_uInt16 nOldCol1 = nCol1;
-sal_uInt16 nOldCol2 = nCol2;
+sal_Int32 nOldLine = nLine;
+sal_Int32 nOldCol1 = nCol1;
+sal_Int32 nOldCol2 = nCol2;
 sal_Unicode buf[ BUF_SIZE ], *p = buf;
 bHash = false;
 
@@ -433,7 +433,7 @@ bool SbiScanner::NextSym()
 sal_Unicode cSep = *pLine;
 if( cSep == '[' )
 bSymbol = true, cSep = ']';
-sal_uInt16 n = nCol + 1;
+sal_Int32 n = nCol + 1;
 while( *pLine )
 {
 do pLine++, nCol++;
@@ -469,7 +469,7 @@ bool SbiScanner::NextSym()
 // other groups:
 else
 {
-sal_uInt8 n = 1;
+sal_Int32 n = 1;
 switch( *pLine++ )
 {
 case '': if( *pLine == '' || *pLine == '=' ) n = 2; break;
@@ -489,7 +489,7 @@ PrevLineCommentLbl:
 {
 bPrevLineExtentsComment = false;
 aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(REM));
-sal_uInt16 nLen = String( pLine ).Len();
+sal_Int32 nLen = String( pLine ).Len();
 if( bCompatible  pLine[ nLen - 1 ] == '_'  pLine[ nLen - 2 ] == ' 
' )
 bPrevLineExtentsComment = true;
 nCol2 = nCol2 + nLen;
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index abda26b..1bb554b 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -54,14 +54,14 @@ protected:
 SbxDataType eScanType;
 StarBASIC* pBasic;  // instance for error callbacks
 double nVal;// numeric value
-short  nCurCol1;
-short  nSavedCol1;
-short  nCol;
-short  nErrors;
-short  nColLock;// lock counter for Col1
-sal_Int32  nBufPos;
-sal_uInt16 nLine;
-sal_uInt16 nCol1, nCol2;
+sal_Int32 nCurCol1;
+sal_Int32 nSavedCol1;
+sal_Int32 nCol;
+sal_Int32 nErrors;
+sal_Int32 nColLock;// lock counter for Col1
+sal_Int32 nBufPos;
+sal_Int32 nLine;
+sal_Int32 nCol1, nCol2;
 bool   bSymbol; // sal_True: symbol scanned
 bool   bNumber; // sal_True: number scanned
 bool   bSpaces; // sal_True: whitespace before token
@@ -86,11 +86,11 @@ public:
 bool  IsVBASupportOn()  { return bVBASupportOn; }
 void  SetVBASupportOn( bool b ) { bVBASupportOn = b; }
 bool  WhiteSpace()  { return bSpaces; }
-short GetErrors()   { return nErrors; }
-short GetLine() { return nLine;   }
-short GetCol1() { return nCol1;   }
-short GetCol2() { return nCol2;   }
-void  SetCol1( short n ){ nCol1 = n;  }
+sal_Int32 GetErrors()   { return nErrors; }
+sal_Int32 GetLine() { return nLine;   }
+sal_Int32 GetCol1() { return nCol1;   }
+sal_Int32 GetCol2() { return nCol2;   }
+void  SetCol1( sal_Int32 n ){ nCol1 = n;  }
 StarBASIC* GetBasic()   { return pBasic;  }
 void  SaveLine(void){ pSaveLine = pLine; }
 void  RestoreLine(void) { pLine = pSaveLine; }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] .: basic/qa

2011-12-05 Thread August Sodora
 basic/qa/cppunit/test_scanner.cxx |  113 +-
 1 file changed, 101 insertions(+), 12 deletions(-)

New commits:
commit df46bad0d1db25a6530da597242c7b9df1d3dd82
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 5 19:00:14 2011 -0500

Added some tests for basic/scanner

diff --git a/basic/qa/cppunit/test_scanner.cxx 
b/basic/qa/cppunit/test_scanner.cxx
index 95bbb47..99422ad 100644
--- a/basic/qa/cppunit/test_scanner.cxx
+++ b/basic/qa/cppunit/test_scanner.cxx
@@ -64,10 +64,11 @@ namespace
   const static rtl::OUString goto_(RTL_CONSTASCII_USTRINGPARAM(goto));
   const static rtl::OUString excl(RTL_CONSTASCII_USTRINGPARAM(!));
 
-  std::vectorSymbol getSymbols(const rtl::OUString source, bool bCompatible 
= false)
+  std::vectorSymbol getSymbols(const rtl::OUString source, sal_Int32 
errors, bool bCompatible = false)
   {
 std::vectorSymbol symbols;
 SbiScanner scanner(source);
+scanner.EnableErrors();
 scanner.SetCompatible(bCompatible);
 while(scanner.NextSym())
 {
@@ -80,9 +81,16 @@ namespace
   symbol.type = scanner.GetType();
   symbols.push_back(symbol);
 }
+errors = scanner.GetErrors();
 return symbols;
   }
 
+  std::vectorSymbol getSymbols(const rtl::OUString source, bool bCompatible 
= false)
+  {
+sal_Int32 i;
+return getSymbols(source, i, bCompatible);
+  }
+
   void ScannerTest::testBlankLines()
   {
 const rtl::OUString source1(RTL_CONSTASCII_USTRINGPARAM());
@@ -539,60 +547,141 @@ namespace
 const rtl::OUString source8(RTL_CONSTASCII_USTRINGPARAM(-0.0));
 const rtl::OUString source9(RTL_CONSTASCII_USTRINGPARAM(12dE3));
 const rtl::OUString source10(RTL_CONSTASCII_USTRINGPARAM(12e3));
+const rtl::OUString source11(RTL_CONSTASCII_USTRINGPARAM(12D+3));
+const rtl::OUString source12(RTL_CONSTASCII_USTRINGPARAM(12e++3));
+const rtl::OUString source13(RTL_CONSTASCII_USTRINGPARAM(12e-3));
+const rtl::OUString source14(RTL_CONSTASCII_USTRINGPARAM(12e-3+));
+const rtl::OUString source15(RTL_CONSTASCII_USTRINGPARAM(1,2,3));
+const rtl::OUString 
source16(RTL_CONSTASCII_USTRINGPARAM(1.));
 
 std::vectorSymbol symbols;
+sal_Int32 errors;
 
-symbols = getSymbols(source1);
+symbols = getSymbols(source1, errors);
 CPPUNIT_ASSERT(symbols.size() == 2);
 CPPUNIT_ASSERT(symbols[0].number == 12345);
+CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER);
 CPPUNIT_ASSERT(symbols[1].text == cr);
+CPPUNIT_ASSERT(errors == 0);
 
-symbols = getSymbols(source2);
+symbols = getSymbols(source2, errors);
 CPPUNIT_ASSERT(symbols.size() == 2);
 CPPUNIT_ASSERT(symbols[0].number == 1.23);
+CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE);
 CPPUNIT_ASSERT(symbols[1].text == cr);
+CPPUNIT_ASSERT(errors == 1);
 
-symbols = getSymbols(source3);
+symbols = getSymbols(source3, errors);
 CPPUNIT_ASSERT(symbols.size() == 2);
-CPPUNIT_ASSERT(symbols[0].number = 123.4);
+CPPUNIT_ASSERT(symbols[0].number == 123.4);
+CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE);
 CPPUNIT_ASSERT(symbols[1].text == cr);
+CPPUNIT_ASSERT(errors == 0);
 
-symbols = getSymbols(source4);
+symbols = getSymbols(source4, errors);
 CPPUNIT_ASSERT(symbols.size() == 2);
 CPPUNIT_ASSERT(symbols[0].number == .5);
+CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE);
 CPPUNIT_ASSERT(symbols[1].text == cr);
+CPPUNIT_ASSERT(errors == 0);
 
-symbols = getSymbols(source5);
+symbols = getSymbols(source5, errors);
 CPPUNIT_ASSERT(symbols.size() == 2);
 CPPUNIT_ASSERT(symbols[0].number == 5);
+CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE);
 CPPUNIT_ASSERT(symbols[1].text == cr);
+CPPUNIT_ASSERT(errors == 0);
 
-symbols = getSymbols(source6);
+symbols = getSymbols(source6, errors);
 CPPUNIT_ASSERT(symbols.size() == 2);
 CPPUNIT_ASSERT(symbols[0].number == 0);
+CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE);
 CPPUNIT_ASSERT(symbols[1].text == cr);
+CPPUNIT_ASSERT(errors == 0);
 
-symbols = getSymbols(source7);
+symbols = getSymbols(source7, errors);
 CPPUNIT_ASSERT(symbols.size() == 3);
 CPPUNIT_ASSERT(symbols[0].text == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(-)));
 CPPUNIT_ASSERT(symbols[1].number == 3);
+CPPUNIT_ASSERT(symbols[1].type == SbxINTEGER);
 CPPUNIT_ASSERT(symbols[2].text == cr);
+CPPUNIT_ASSERT(errors == 0);
 
-symbols = getSymbols(source8);
+symbols = getSymbols(source8, errors);
 CPPUNIT_ASSERT(symbols.size() == 3);
 CPPUNIT_ASSERT(symbols[0].text == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(-)));
 CPPUNIT_ASSERT(symbols[1].number == 0);
+CPPUNIT_ASSERT(symbols[1].type == SbxDOUBLE);
 CPPUNIT_ASSERT(symbols[2].text == cr);
+CPPUNIT_ASSERT(errors == 0);
 
-symbols = getSymbols

[Libreoffice-commits] .: desktop/source

2011-12-07 Thread August Sodora
 desktop/source/app/app.cxx |   56 -
 1 file changed, 56 deletions(-)

New commits:
commit d697ecf6a0a69ffa929de38f2ef7e779a2d7360e
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 8 00:59:57 2011 -0500

Remove unnecessary includes

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 49a060e..381508c 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -26,22 +26,12 @@
  *
  /
 
-
-#include cstdlib
-#include vector
-
-#include memory
-#include unistd.h
 #include app.hxx
 #include desktop.hrc
-#include appinit.hxx
-#include officeipcthread.hxx
 #include cmdlineargs.hxx
-#include desktopresid.hxx
 #include dispatchwatcher.hxx
 #include configinit.hxx
 #include lockfile.hxx
-#include cmdlinehelp.hxx
 #include userinstall.hxx
 #include desktopcontext.hxx
 #include exithelper.hxx
@@ -53,101 +43,55 @@
 #include com/sun/star/document/CorruptedFilterConfigurationException.hpp
 #include com/sun/star/configuration/CorruptedConfigurationException.hpp
 #include com/sun/star/configuration/theDefaultProvider.hpp
-#include com/sun/star/frame/XStorable.hpp
-#include com/sun/star/util/XModifiable.hpp
 #include com/sun/star/util/XFlushable.hpp
-#include com/sun/star/system/XSystemShellExecute.hpp
 #include com/sun/star/system/SystemShellExecuteFlags.hpp
-#include com/sun/star/beans/XPropertySet.hpp
-#include com/sun/star/lang/XComponent.hpp
-#include com/sun/star/uno/RuntimeException.hpp
-#include com/sun/star/io/IOException.hpp
-#include com/sun/star/lang/IllegalArgumentException.hpp
-#include com/sun/star/lang/WrappedTargetException.hpp
 #include com/sun/star/frame/XDesktop.hpp
 #include com/sun/star/frame/XComponentLoader.hpp
 #include com/sun/star/view/XPrintable.hpp
-#include com/sun/star/lang/XInitialization.hpp
-#include com/sun/star/frame/XFramesSupplier.hpp
 #include com/sun/star/awt/XTopWindow.hpp
 #include com/sun/star/util/XURLTransformer.hpp
-#include com/sun/star/util/URL.hpp
 #include com/sun/star/util/XCloseable.hpp
-#include com/sun/star/frame/XDispatch.hpp
 #include com/sun/star/frame/XDispatchProvider.hpp
 #include com/sun/star/lang/ServiceNotRegisteredException.hpp
-#include com/sun/star/lang/XSingleServiceFactory.hpp
 #include com/sun/star/configuration/MissingBootstrapFileException.hpp
 #include com/sun/star/configuration/InvalidBootstrapFileException.hpp
 #include com/sun/star/configuration/InstallationIncompleteException.hpp
 #include com/sun/star/configuration/backend/BackendSetupException.hpp
 #include com/sun/star/configuration/backend/BackendAccessException.hpp
-#include com/sun/star/container/XEnumeration.hpp
-#include com/sun/star/ui/dialogs/XExecutableDialog.hpp
-#include com/sun/star/ui/dialogs/ExecutableDialogResults.hpp
 #include com/sun/star/task/XJobExecutor.hpp
 #include com/sun/star/task/XRestartManager.hpp
-#include com/sun/star/task/XJob.hpp
-#include com/sun/star/beans/XPropertySet.hpp
-#include com/sun/star/beans/NamedValue.hpp
-#include com/sun/star/task/XJob.hpp
 #include com/sun/star/document/XEventListener.hpp
 #include com/sun/star/ui/XUIElementFactoryRegistration.hpp
 #include com/sun/star/frame/XUIControllerRegistration.hpp
 
-#include com/sun/star/java/XJavaVM.hpp
-#include tools/solar.h
 #include toolkit/unohlp.hxx
-#include osl/security.hxx
-#include rtl/ref.hxx
 #include comphelper/processfactory.hxx
 #include comphelper/componentcontext.hxx
 #include comphelper/configurationhelper.hxx
 #include unotools/configmgr.hxx
-#include unotools/configitem.hxx
 #include unotools/confignode.hxx
-#include unotools/ucbhelper.hxx
-#include tools/tempfile.hxx
-#include tools/urlobj.hxx
 #include unotools/moduleoptions.hxx
-#include osl/module.h
 #include osl/file.hxx
 #include osl/process.h
-#include osl/signal.h
-#include osl/thread.hxx
-#include rtl/uuid.h
 #include rtl/uri.hxx
 #include unotools/pathoptions.hxx
-#include svl/languageoptions.hxx
 #include unotools/internaloptions.hxx
 #include svtools/miscopt.hxx
 #include svtools/menuoptions.hxx
-#include unotools/syslocaleoptions.hxx
-#include unotools/syslocale.hxx
 #include svl/folderrestriction.hxx
-#include unotools/tempfile.hxx
 #include rtl/logfile.hxx
-#include rtl/ustrbuf.hxx
-#include rtl/strbuf.hxx
 #include rtl/bootstrap.hxx
-#include rtl/instance.hxx
 #include vcl/help.hxx
 #include vcl/msgbox.hxx
-#include vcl/bitmap.hxx
-#include vcl/stdtext.hxx
-#include vcl/msgbox.hxx
 #include sfx2/sfx.hrc
 #include sfx2/app.hxx
 #include svl/itemset.hxx
 #include svl/eitem.hxx
 #include ucbhelper/contentbroker.hxx
-#include unotools/bootstrap.hxx
-#include cppuhelper/bootstrap.hxx
 
 #include svtools/fontsubstconfig.hxx
 #include svtools/accessibilityoptions.hxx
 #include svtools/apearcfg.hxx
-#include unotools/misccfg.hxx
 #include svtools/filter.hxx
 
 #include langselect.hxx
___
Libreoffice-commits mailing list

[Libreoffice-commits] .: basic/inc basic/Package_inc.mk

2011-12-07 Thread August Sodora
 basic/Package_inc.mk|1 
 basic/inc/basic/basicrt.hxx |   82 
 2 files changed, 83 deletions(-)

New commits:
commit f5ba057f24c322d32614b1f040cd9c8255c92255
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 8 01:26:09 2011 -0500

Remove basic/basicrt.hxx

diff --git a/basic/Package_inc.mk b/basic/Package_inc.mk
index 26fb8df..28817fb 100644
--- a/basic/Package_inc.mk
+++ b/basic/Package_inc.mk
@@ -30,7 +30,6 @@ $(eval $(call 
gb_Package_Package,basic_inc,$(SRCDIR)/basic/inc))
 
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basicdllapi.h,basic/basicdllapi.h))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basicmanagerrepository.hxx,basic/basicmanagerrepository.hxx))
-$(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basicrt.hxx,basic/basicrt.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basmgr.hxx,basic/basmgr.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basrdll.hxx,basic/basrdll.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/dispdefs.hxx,basic/dispdefs.hxx))
diff --git a/basic/inc/basic/basicrt.hxx b/basic/inc/basic/basicrt.hxx
deleted file mode 100644
index 4e6b4de..000
--- a/basic/inc/basic/basicrt.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * http://www.openoffice.org/license.html
- * for a copy of the LGPLv3 License.
- *
- /
-#ifndef _BASICRT_HXX
-#define _BASICRT_HXX
-
-#include tools/string.hxx
-#include basic/sbxdef.hxx
-#include basicdllapi.h
-
-class SbiRuntime;
-class SbErrorStackEntry;
-
-class BasicRuntime
-{
-SbiRuntime* pRun;
-public:
-BasicRuntime( SbiRuntime* p ) : pRun ( p ){;}
-const String GetSourceRevision();
-const String GetModuleName( SbxNameType nType );
-const String GetMethodName( SbxNameType nType );
-xub_StrLen GetLine();
-xub_StrLen GetCol1();
-xub_StrLen GetCol2();
-sal_Bool IsRun();
-sal_Bool IsValid() { return pRun != NULL; }
-BasicRuntime GetNextRuntime();
-};
-
-class BasicErrorStackEntry
-{
-SbErrorStackEntry *pEntry;
-public:
-BasicErrorStackEntry( SbErrorStackEntry *p ) : pEntry ( p ){;}
-const String GetSourceRevision();
-const String GetModuleName( SbxNameType nType );
-const String GetMethodName( SbxNameType nType );
-xub_StrLen GetLine();
-xub_StrLen GetCol1();
-xub_StrLen GetCol2();
-};
-
-class BasicRuntimeAccess
-{
-public:
-static BasicRuntime GetRuntime();
-static bool HasRuntime();
-static sal_uInt16 GetStackEntryCount();
-static BasicErrorStackEntry GetStackEntry( sal_uInt16 nIndex );
-static sal_Bool HasStack();
-static void DeleteStack();
-
-static sal_Bool IsRunInit();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/inc basic/Package_inc.mk

2011-12-07 Thread August Sodora
 basic/Package_inc.mk|1 
 basic/inc/basic/mybasic.hxx |  104 
 2 files changed, 105 deletions(-)

New commits:
commit 003dbb74921f09c29528357340ac8f26f1de2513
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 8 01:29:19 2011 -0500

Remove basic/mybasic.hxx

diff --git a/basic/Package_inc.mk b/basic/Package_inc.mk
index 28817fb..0f6b253 100644
--- a/basic/Package_inc.mk
+++ b/basic/Package_inc.mk
@@ -34,7 +34,6 @@ $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basmgr.hxx,basic/basmgr.hx
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basrdll.hxx,basic/basrdll.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/dispdefs.hxx,basic/dispdefs.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/modsizeexceeded.hxx,basic/modsizeexceeded.hxx))
-$(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/mybasic.hxx,basic/mybasic.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/process.hxx,basic/process.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/sbdef.hxx,basic/sbdef.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/sberrors.hxx,basic/sberrors.hxx))
diff --git a/basic/inc/basic/mybasic.hxx b/basic/inc/basic/mybasic.hxx
deleted file mode 100644
index aae5fd7..000
--- a/basic/inc/basic/mybasic.hxx
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * http://www.openoffice.org/license.html
- * for a copy of the LGPLv3 License.
- *
- /
-
-#ifndef _MYBASIC_HXX
-#define _MYBASIC_HXX
-
-#include basic/sbstar.hxx
-#include vector
-#include basicdllapi.h
-
-class BasicApp;
-class AppBasEd;
-class ErrorEntry;
-
-#define SBXID_MYBASIC   0x594D  // MyBasic: MY
-#define SBXCR_TEST  0x54534554  // TEST
-
-//-
-class BasicError {
-AppBasEd* pWin;
-sal_uInt16  nLine, nCol1, nCol2;
-String aText;
-public:
-BasicError( AppBasEd*, sal_uInt16, const String, sal_uInt16, sal_uInt16, 
sal_uInt16 );
-void Show();
-};
-
-//-
-class MyBasic : public StarBASIC
-{
-SbError nError;
-virtual sal_Bool ErrorHdl();
-virtual sal_uInt16 BreakHdl();
-
-protected:
-::std::vector BasicError*  aErrors;
-size_t CurrentError;
-Link GenLogHdl();
-Link GenWinInfoHdl();
-Link GenModuleWinExistsHdl();
-Link GenWriteStringHdl();
-
-virtual void StartListeningTT( SfxBroadcaster rBroadcaster );
-
-String GenRealString( const String aResString );
-
-public:
-SBX_DECL_PERSIST_NODATA(SBXCR_TEST,SBXID_MYBASIC,1);
-TYPEINFO();
-MyBasic();
-virtual ~MyBasic();
-virtual sal_Bool Compile( SbModule* );
-void Reset();
-SbError GetErrors() { return nError; }
-size_t GetCurrentError() { return CurrentError; }
-BasicError* FirstError();
-BasicError* NextError();
-BasicError* PrevError();
-
-// Do not use #ifdefs here because this header file is both used for 
testtool and basic
-SbxObject *pTestObject; // for Testool; otherwise NULL
-
-virtual void LoadIniFile();
-
-// Determines the extended symbol type for syntax highlighting
-virtual SbTextType GetSymbolType( const String Symbol, sal_Bool 
bWasTTControl );
-virtual const String GetSpecialErrorText();
-virtual void ReportRuntimeError( AppBasEd *pEditWin );
-virtual void DebugFindNoErrors( sal_Bool bDebugFindNoErrors );
-
-static void SetCompileModule( SbModule *pMod );
-static SbModule *GetCompileModule();
-};
-
-SV_DECL_IMPL_REF(MyBasic)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman

[Libreoffice-commits] .: basic/Module_basic.mk basic/source basic/StaticLibrary_sample.mk basic/workben

2011-12-08 Thread August Sodora
 basic/Module_basic.mk|1 
 basic/StaticLibrary_sample.mk|   48 ---
 basic/source/inc/collelem.hxx|   50 ---
 basic/source/sample/collelem.cxx |   79 -
 basic/source/sample/object.cxx   |  258 -
 basic/source/sample/sample.bas   |   39 --
 basic/workben/mgrtest.cxx|  591 ---
 7 files changed, 1066 deletions(-)

New commits:
commit 99ec322768053a6341ec7b5b6c6e533fb478bbfa
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 8 23:59:57 2011 -0500

Remove archaic tests

diff --git a/basic/Module_basic.mk b/basic/Module_basic.mk
index 58ac035..0fafc6c 100644
--- a/basic/Module_basic.mk
+++ b/basic/Module_basic.mk
@@ -32,7 +32,6 @@ $(eval $(call gb_Module_add_targets,basic,\
AllLangResTarget_sb \
Library_sb \
Package_inc \
-   StaticLibrary_sample \
 ))
 
 $(eval $(call gb_Module_add_check_targets,basic,\
diff --git a/basic/StaticLibrary_sample.mk b/basic/StaticLibrary_sample.mk
deleted file mode 100644
index 2173a42..000
--- a/basic/StaticLibrary_sample.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# http://www.openoffice.org/license.html
-# for a copy of the LGPLv3 License.
-#
-#*
-
-$(eval $(call gb_StaticLibrary_StaticLibrary,sample))
-
-$(eval $(call gb_StaticLibrary_add_package_headers,sample,basic_inc))
-
-$(eval $(call gb_StaticLibrary_set_include,sample,\
-   $$(INCLUDE) \
-   -I$(realpath $(SRCDIR)/basic/source/inc) \
-))
-
-$(eval $(call gb_StaticLibrary_add_api,sample,\
-   udkapi \
-   offapi \
-))
-
-$(eval $(call gb_StaticLibrary_add_exception_objects,sample,\
-   basic/source/sample/collelem \
-   basic/source/sample/object \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/basic/source/inc/collelem.hxx b/basic/source/inc/collelem.hxx
deleted file mode 100644
index 8465fd4..000
--- a/basic/source/inc/collelem.hxx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * http://www.openoffice.org/license.html
- * for a copy of the LGPLv3 License.
- *
- /
-
-#ifndef _SAMPLE_COLLELEM_HXX
-#define _SAMPLE_COLLELEM_HXX
-
-#include basic/sbxobj.hxx
-
-// The sample-element is a small object that contains the
-// properties name and value and the method Say which couples
-// the passed text with its own name. The name can be set from
-// outside. Implementation works with dynamic elements only.
-
-class SampleElement : public SbxObject
-{
-// Broadcaster Notification
-virtual void SFX_NOTIFY( SfxBroadcaster rBC, const TypeId rBCType,
- const SfxHint rHint, const TypeId rHintType );
-public:
-SampleElement( const String );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic

[Libreoffice-commits] .: basic/win

2011-12-08 Thread August Sodora
 dev/null |binary
 1 file changed

New commits:
commit 5a61ac273bff26d7ddbbd4fa0ea8099f486168f3
Author: August Sodora aug...@gmail.com
Date:   Fri Dec 9 00:04:33 2011 -0500

Remove old testtool icons

diff --git a/basic/win/res/basic.ico b/basic/win/res/basic.ico
deleted file mode 100644
index c453a0f..000
Binary files a/basic/win/res/basic.ico and /dev/null differ
diff --git a/basic/win/res/testtool.ico b/basic/win/res/testtool.ico
deleted file mode 100644
index db880c8..000
Binary files a/basic/win/res/testtool.ico and /dev/null differ
diff --git a/basic/win/res/work.ico b/basic/win/res/work.ico
deleted file mode 100644
index 43e3b5b..000
Binary files a/basic/win/res/work.ico and /dev/null differ
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-12-08 Thread August Sodora
 basctl/source/basicide/bastypes.cxx |   20 +---
 basctl/source/inc/bastypes.hxx  |   12 ++--
 2 files changed, 15 insertions(+), 17 deletions(-)

New commits:
commit 7ffca8ed2ed7dda9d74edb498ec74620e9489c7a
Author: August Sodora aug...@gmail.com
Date:   Fri Dec 9 00:15:26 2011 -0500

sal_Bool to bool

diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 21dfce9..ca6b97a 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -756,7 +756,7 @@ LibInfoItem* LibInfos::GetInfo( const LibInfoKey rKey )
 return pItem;
 }
 
-sal_Bool QueryDel( const String rName, const ResId rId, Window* pParent )
+bool QueryDel( const String rName, const ResId rId, Window* pParent )
 {
 String aQuery( rId );
 String aName( rName );
@@ -764,39 +764,37 @@ sal_Bool QueryDel( const String rName, const ResId rId, 
Window* pParent )
 aName.Insert( '\'', 0 );
 aQuery.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( XX ) ), 
aName );
 QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_YES, aQuery );
-if ( aQueryBox.Execute() == RET_YES )
-return sal_True;
-return sal_False;
+return ( aQueryBox.Execute() == RET_YES );
 }
 
-sal_Bool QueryDelMacro( const String rName, Window* pParent )
+bool QueryDelMacro( const String rName, Window* pParent )
 {
 return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent );
 }
 
-sal_Bool QueryReplaceMacro( const String rName, Window* pParent )
+bool QueryReplaceMacro( const String rName, Window* pParent )
 {
 return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent );
 }
 
-sal_Bool QueryDelDialog( const String rName, Window* pParent )
+bool QueryDelDialog( const String rName, Window* pParent )
 {
 return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent );
 }
 
-sal_Bool QueryDelLib( const String rName, sal_Bool bRef, Window* pParent )
+bool QueryDelLib( const String rName, bool bRef, Window* pParent )
 {
 return QueryDel( rName, IDEResId( bRef ? RID_STR_QUERYDELLIBREF : 
RID_STR_QUERYDELLIB ), pParent );
 }
 
-sal_Bool QueryDelModule( const String rName, Window* pParent )
+bool QueryDelModule( const String rName, Window* pParent )
 {
 return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent );
 }
 
-sal_Bool QueryPassword( const Reference script::XLibraryContainer  
xLibContainer, const String rLibName, String rPassword, sal_Bool bRepeat, 
sal_Bool bNewTitle )
+bool QueryPassword( const Reference script::XLibraryContainer  
xLibContainer, const String rLibName, String rPassword, bool bRepeat, bool 
bNewTitle )
 {
-sal_Bool bOK = sal_False;
+bool bOK = false;
 sal_uInt16 nRet = 0;
 
 do
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index fb24a2b..f65d1d6 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -274,12 +274,12 @@ voidCutLines( ::rtl::OUString rStr, 
sal_Int32 nStartLine, sal_Int32
 String  CreateMgrAndLibStr( const String rMgrName, const String 
rLibName );
 sal_uLong   CalcLineCount( SvStream rStream );
 
-sal_BoolQueryReplaceMacro( const String rName, Window* pParent = 
0 );
-sal_BoolQueryDelMacro( const String rName, Window* pParent = 0 );
-sal_BoolQueryDelDialog( const String rName, Window* pParent = 0 );
-sal_BoolQueryDelModule( const String rName, Window* pParent = 0 );
-sal_BoolQueryDelLib( const String rName, sal_Bool bRef = 
sal_False, Window* pParent = 0 );
-sal_BoolQueryPassword( const ::com::sun::star::uno::Reference 
::com::sun::star::script::XLibraryContainer  xLibContainer, const String 
rLibName, String rPassword, sal_Bool bRepeat = sal_False, sal_Bool bNewTitle = 
sal_False );
+bool QueryReplaceMacro( const String rName, Window* pParent = 0 );
+bool QueryDelMacro( const String rName, Window* pParent = 0 );
+bool QueryDelDialog( const String rName, Window* pParent = 0 );
+bool QueryDelModule( const String rName, Window* pParent = 0 );
+bool QueryDelLib( const String rName, bool bRef = sal_False, Window* pParent 
= 0 );
+bool QueryPassword( const ::com::sun::star::uno::Reference 
::com::sun::star::script::XLibraryContainer  xLibContainer, const String 
rLibName, String rPassword, bool bRepeat = false, bool bNewTitle = false );
 
 class ModuleInfoHelper
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source

2011-12-08 Thread August Sodora
 basctl/source/basicide/basides1.cxx |2 -
 basctl/source/basicide/bastype2.cxx |2 -
 basctl/source/basicide/bastype3.cxx |2 -
 basctl/source/basicide/bastypes.cxx |   40 ++--
 basctl/source/basicide/moduldl2.cxx |6 ++---
 basctl/source/basicide/moduldlg.cxx |2 -
 basctl/source/inc/bastypes.hxx  |   12 +-
 7 files changed, 33 insertions(+), 33 deletions(-)

New commits:
commit 9c2f9c79aca1e1dc0670d6443fd7865b8dc1ee63
Author: August Sodora aug...@gmail.com
Date:   Fri Dec 9 00:50:03 2011 -0500

String-OUString

diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 9846e6c..b9245db 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -550,7 +550,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest rReq )
 Reference script::XLibraryContainerPassword  xPasswd( 
xModLibContainer, UNO_QUERY );
 if ( xPasswd.is()  xPasswd-isLibraryPasswordProtected( 
aLibName )  !xPasswd-isLibraryPasswordVerified( aLibName ) )
 {
-String aPassword;
+::rtl::OUString aPassword;
 bOK = QueryPassword( xModLibContainer, aLibName, 
aPassword );
 }
 }
diff --git a/basctl/source/basicide/bastype2.cxx 
b/basctl/source/basicide/bastype2.cxx
index 15ce341..c3ce38a 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -661,7 +661,7 @@ long BasicTreeListBox::ExpandingHdl()
 Reference script::XLibraryContainerPassword  xPasswd( 
xModLibContainer, UNO_QUERY );
 if ( xPasswd.is()  xPasswd-isLibraryPasswordProtected( 
aLibName )  !xPasswd-isLibraryPasswordVerified( aLibName ) )
 {
-String aPassword;
+::rtl::OUString aPassword;
 bOK = QueryPassword( xModLibContainer, aLibName, 
aPassword );
 }
 }
diff --git a/basctl/source/basicide/bastype3.cxx 
b/basctl/source/basicide/bastype3.cxx
index 0edbddc..9f41a7a 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -78,7 +78,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* 
pEntry )
 Reference script::XLibraryContainerPassword  xPasswd( 
xModLibContainer, UNO_QUERY );
 if ( xPasswd.is()  xPasswd-isLibraryPasswordProtected( 
aOULibName )  !xPasswd-isLibraryPasswordVerified( aOULibName ) )
 {
-String aPassword;
+::rtl::OUString aPassword;
 bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
 }
 }
diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index ca6b97a..c019142 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -38,6 +38,7 @@
 #include basic/basmgr.hxx
 #include com/sun/star/script/ModuleType.hpp
 #include com/sun/star/script/XLibraryContainerPassword.hpp
+#include comphelper/string.hxx
 #include sfx2/dispatch.hxx
 #include sfx2/passwd.hxx
 #include sfx2/viewfrm.hxx
@@ -756,43 +757,43 @@ LibInfoItem* LibInfos::GetInfo( const LibInfoKey rKey )
 return pItem;
 }
 
-bool QueryDel( const String rName, const ResId rId, Window* pParent )
+bool QueryDel( const ::rtl::OUString rName, const ResId rId, Window* pParent 
)
 {
-String aQuery( rId );
-String aName( rName );
-aName += '\'';
-aName.Insert( '\'', 0 );
-aQuery.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( XX ) ), 
aName );
+::rtl::OUString aQuery( ResId::toString(rId) );
+::rtl::OUStringBuffer aNameBuf( rName );
+aNameBuf.append('\'');
+aNameBuf.insert(0, '\'');
+aQuery = ::comphelper::string::replace(aQuery, 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XX)), 
aNameBuf.makeStringAndClear());
 QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_YES, aQuery );
 return ( aQueryBox.Execute() == RET_YES );
 }
 
-bool QueryDelMacro( const String rName, Window* pParent )
+bool QueryDelMacro( const ::rtl::OUString rName, Window* pParent )
 {
 return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent );
 }
 
-bool QueryReplaceMacro( const String rName, Window* pParent )
+bool QueryReplaceMacro( const ::rtl::OUString rName, Window* pParent )
 {
 return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent );
 }
 
-bool QueryDelDialog( const String rName, Window* pParent )
+bool QueryDelDialog( const ::rtl::OUString rName, Window* pParent )
 {
 return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent );
 }
 
-bool QueryDelLib( const String rName, bool bRef, Window* pParent )
+bool QueryDelLib( const ::rtl::OUString rName, bool bRef, Window* pParent )
 {
 return QueryDel( rName, IDEResId( bRef

[Libreoffice-commits] .: 3 commits - basctl/source

2011-12-10 Thread August Sodora
 basctl/source/basicide/basobj2.cxx|   12 ++--
 basctl/source/basicide/basobj3.cxx|8 
 basctl/source/basicide/bastypes.cxx   |4 +---
 basctl/source/basicide/scriptdocument.cxx |   20 ++--
 basctl/source/inc/basobj.hxx  |   12 ++--
 basctl/source/inc/bastypes.hxx|2 +-
 6 files changed, 28 insertions(+), 30 deletions(-)

New commits:
commit 90939a7b3d9d6511a4086deea6b7a11adf30df47
Author: August Sodora aug...@gmail.com
Date:   Sat Dec 10 03:01:35 2011 -0500

String-OUString

diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index a68a0d8..c23b22f 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -58,7 +58,7 @@ const char* pRegName = BasicIDETabBar;
 TYPEINIT0( IDEBaseWindow )
 TYPEINIT1( SbxItem, SfxPoolItem );
 
-IDEBaseWindow::IDEBaseWindow( Window* pParent, const ScriptDocument 
rDocument, String aLibName, String aName )
+IDEBaseWindow::IDEBaseWindow( Window* pParent, const ScriptDocument 
rDocument, ::rtl::OUString aLibName, ::rtl::OUString aName )
 :Window( pParent, WinBits( WB_3DLOOK ) )
 ,m_aDocument( rDocument )
 ,m_aLibName( aLibName )
@@ -70,8 +70,6 @@ IDEBaseWindow::IDEBaseWindow( Window* pParent, const 
ScriptDocument rDocument,
 nStatus = 0;
 }
 
-
-
 IDEBaseWindow::~IDEBaseWindow()
 {
 DBG_DTOR( IDEBaseWindow, 0 );
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index e61f311..ac298cf 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -140,7 +140,7 @@ protected:
 
 public:
 TYPEINFO();
-IDEBaseWindow( Window* pParent, const ScriptDocument 
rDocument, String aLibName, String aName );
+IDEBaseWindow( Window* pParent, const ScriptDocument rDocument, 
::rtl::OUString aLibName, ::rtl::OUString aName );
 virtual ~IDEBaseWindow();
 
 voidInit();
commit 313deb9782819f68b69d25629aa79476ff98e90a
Author: August Sodora aug...@gmail.com
Date:   Sat Dec 10 02:59:29 2011 -0500

String-OUString

diff --git a/basctl/source/basicide/scriptdocument.cxx 
b/basctl/source/basicide/scriptdocument.cxx
index 2794520..e75affa 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -986,9 +986,9 @@ namespace basctl
 ::rtl::OUString aSearchURL1( RTL_CONSTASCII_USTRINGPARAM( 
share/basic ) );
 ::rtl::OUString aSearchURL2( RTL_CONSTASCII_USTRINGPARAM( 
share/uno_packages ) );
 ::rtl::OUString aSearchURL3( RTL_CONSTASCII_USTRINGPARAM( 
share/extensions ) );
-if( aCanonicalFileURL.indexOf( aSearchURL1 ) != -1 ||
-aCanonicalFileURL.indexOf( aSearchURL2 ) != -1 ||
-aCanonicalFileURL.indexOf( aSearchURL3 ) != -1 )
+if( aCanonicalFileURL.indexOf( aSearchURL1 ) = 0 ||
+aCanonicalFileURL.indexOf( aSearchURL2 ) = 0 ||
+aCanonicalFileURL.indexOf( aSearchURL3 ) = 0 )
 bIsShared = true;
 }
 }
@@ -1315,7 +1315,7 @@ namespace basctl
 while ( !bValid )
 {
 aObjectName = aBaseName;
-aObjectName += String::CreateFromInt32( i );
+aObjectName += ::rtl::OUString::valueOf( i );
 
 if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() )
 bValid = sal_True;
@@ -1521,9 +1521,9 @@ namespace basctl
 {
 switch ( _eType )
 {
-case LIBRARY_TYPE_MODULE:   aTitle = String( IDEResId( 
RID_STR_USERMACROS ) ); break;
-case LIBRARY_TYPE_DIALOG:   aTitle = String( IDEResId( 
RID_STR_USERDIALOGS ) ); break;
-case LIBRARY_TYPE_ALL:  aTitle = String( IDEResId( 
RID_STR_USERMACROSDIALOGS ) ); break;
+case LIBRARY_TYPE_MODULE:   aTitle = ResId::toString( 
IDEResId( RID_STR_USERMACROS ) ); break;
+case LIBRARY_TYPE_DIALOG:   aTitle = ResId::toString( 
IDEResId( RID_STR_USERDIALOGS ) ); break;
+case LIBRARY_TYPE_ALL:  aTitle = ResId::toString( 
IDEResId( RID_STR_USERMACROSDIALOGS ) ); break;
 default:
 break;
 }
@@ -1532,9 +1532,9 @@ namespace basctl
 {
 switch ( _eType )
 {
-case LIBRARY_TYPE_MODULE:   aTitle = String( IDEResId( 
RID_STR_SHAREMACROS ) ); break;
-case LIBRARY_TYPE_DIALOG:   aTitle = String( IDEResId( 
RID_STR_SHAREDIALOGS ) ); break;
-case LIBRARY_TYPE_ALL:  aTitle = String( IDEResId( 
RID_STR_SHAREMACROSDIALOGS ) ); break;
+case LIBRARY_TYPE_MODULE:   aTitle = ResId::toString( 
IDEResId( RID_STR_SHAREMACROS ) ); break;
+case LIBRARY_TYPE_DIALOG:   aTitle

[Libreoffice-commits] .: basic/source

2011-12-10 Thread August Sodora
 basic/source/inc/object.hxx |   99 
 1 file changed, 99 deletions(-)

New commits:
commit 1274558accebed03b2400b5a6da90ff4e2db55c7
Author: August Sodora aug...@gmail.com
Date:   Sat Dec 10 18:51:59 2011 -0500

Remove unused header

diff --git a/basic/source/inc/object.hxx b/basic/source/inc/object.hxx
deleted file mode 100644
index bf9440c..000
--- a/basic/source/inc/object.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * http://www.openoffice.org/license.html
- * for a copy of the LGPLv3 License.
- *
- /
-
-#ifndef _SAMPLE_OBJECT_HXX
-#define _SAMPLE_OBJECT_HXX
-
-#include basic/sbxfac.hxx
-#include basic/sbxvar.hxx
-#include basic/sbxobj.hxx
-
-// 1) Properties:
-//Name  R/O
-//Value a double-value, R/W
-// 2) Methods:
-//Display   display a text
-//Squareargument * argument
-//Event call of a Basic-program
-// 3) Sub-objects:
-//a collection named elements. The access is implemented as
-//property (for the whole object) and as method (for single
-//elements, is passed through).
-// This implementation is an example for a table controlled
-// version that can contain many elements.
-// The collection is located in COLLECTN.*, the collection's
-// objects in COLLELEM.*
-
-class SampleObject : public SbxObject
-{
-using SbxVariable::GetInfo;
-// Definition of a table entry. This is done here because
-// methods and properties can be declared private that way.
-#if defined ( ICC ) || defined ( C50 )
-public:
-#endif
-typedef void( SampleObject::*pMeth )
-( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite );
-#if defined ( ICC )
-private:
-#endif
-
-struct Methods {
-const char* pName;  // name of an entry
-SbxDataType eType;  // data type
-pMeth pFunc;
-short nArgs;// arguments and flags
-};
-static Methods aMethods[];  // method table
-
-// methods
-void Display( SbxVariable*, SbxArray*, sal_Bool );
-void Event( SbxVariable*, SbxArray*, sal_Bool );
-void Square( SbxVariable*, SbxArray*, sal_Bool );
-void Create( SbxVariable*, SbxArray*, sal_Bool );
-// fill infoblock
-SbxInfo* GetInfo( short nIdx );
-// Broadcaster Notification
-virtual void SFX_NOTIFY( SfxBroadcaster rBC, const TypeId rBCType,
- const SfxHint rHint, const TypeId rHintType );
-public:
-SampleObject( const String );
-
-virtual SbxVariable* Find( const String, SbxClassType );
-};
-
-
-class SampleObjectFac : public SbxFactory
-{
-public:
-virtual SbxObject* CreateObject( const String );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/source

2011-12-11 Thread August Sodora
 vcl/inc/vcl/outdev.hxx  |   33 -
 vcl/source/gdi/outdev2.cxx  |   38 --
 vcl/source/gdi/outdev3.cxx  |   27 
 vcl/source/gdi/outdevnative.cxx |   39 ---
 vcl/source/gdi/outmap.cxx   |  222 
 5 files changed, 359 deletions(-)

New commits:
commit bb11106e06fa47a105bd02c2281f20af147b71b6
Author: August Sodora aug...@gmail.com
Date:   Sun Dec 11 00:36:49 2011 -0500

Remove unused code

diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index d2d3809..9ce143d 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -416,7 +416,6 @@ public:
 const sal_Int32* pPixelDXArray ) 
const;
 SAL_DLLPRIVATE SalLayout*   ImplGlyphFallbackLayout( SalLayout*, 
ImplLayoutArgs ) const;
 
-SAL_DLLPRIVATE long ImplGetTextWidth( const SalLayout ) const;
 static
 SAL_DLLPRIVATE XubStringImplGetEllipsisString( const OutputDevice 
rTargetDevice, const XubString rStr,
long nMaxWidth, 
sal_uInt16 nStyle, const ::vcl::ITextLayout _rLayout );
@@ -458,10 +457,7 @@ public:
 SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) 
const;
 SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) 
const;
 SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) 
const;
-SAL_DLLPRIVATE floatImplFloatLogicWidthToDevicePixel( float ) 
const;
 SAL_DLLPRIVATE floatImplFloatLogicHeightToDevicePixel( float ) 
const;
-SAL_DLLPRIVATE floatImplFloatDevicePixelToLogicWidth( float ) 
const;
-SAL_DLLPRIVATE floatImplFloatDevicePixelToLogicHeight( float ) 
const;
 SAL_DLLPRIVATE PointImplLogicToDevicePixel( const Point rLogicPt 
) const;
 SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size rLogicSize 
) const;
 SAL_DLLPRIVATE RectangleImplLogicToDevicePixel( const Rectangle 
rLogicRect ) const;
@@ -601,7 +597,6 @@ public:
   FontUnderline eUnderline,
   FontUnderline eOverline,
   sal_Bool bUnderlineAbove = sal_False );
-static sal_Bool IsTextUnderlineAbove( const Font rFont );
 
 voidDrawText( const Point rStartPt, const XubString rStr,
   xub_StrLen nIndex = 0, xub_StrLen nLen = 
STRING_LEN,
@@ -830,7 +825,6 @@ public:
const ::vcl::RenderGraphic 
rRenderGraphic );
 
 Color   GetPixel( const Point rPt ) const;
-Color*  GetPixel( const Polygon rPts ) const;
 
 Bitmap  GetBitmap( const Point rSrcPt, const Size rSize ) 
const;
 
@@ -992,9 +986,7 @@ public:
 SizeLogicToPixel( const Size rLogicSize ) const;
 Rectangle   LogicToPixel( const Rectangle rLogicRect ) const;
 Polygon LogicToPixel( const Polygon rLogicPoly ) const;
-basegfx::B2DPolygon LogicToPixel( const basegfx::B2DPolygon 
rLogicPolyPoly ) const;
 PolyPolygon LogicToPixel( const PolyPolygon rLogicPolyPoly ) 
const;
-basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon 
rLogicPolyPoly ) const;
 Region  LogicToPixel( const Region rLogicRegion )const;
 Point   LogicToPixel( const Point rLogicPt,
   const MapMode rMapMode ) const;
@@ -1004,21 +996,15 @@ public:
   const MapMode rMapMode ) const;
 Polygon LogicToPixel( const Polygon rLogicPoly,
   const MapMode rMapMode ) const;
-basegfx::B2DPolygon LogicToPixel( const basegfx::B2DPolygon rLogicPoly,
-  const MapMode rMapMode ) const;
 PolyPolygon LogicToPixel( const PolyPolygon rLogicPolyPoly,
   const MapMode rMapMode ) const;
 basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon 
rLogicPolyPoly,
   const MapMode rMapMode ) const;
-Region  LogicToPixel( const Region rLogicRegion,
-  const MapMode rMapMode ) const;
 Point   PixelToLogic( const Point rDevicePt ) const;
 SizePixelToLogic( const Size rDeviceSize ) const;
 Rectangle   PixelToLogic( const Rectangle rDeviceRect ) const;
 Polygon PixelToLogic( const Polygon rDevicePoly ) const;
-basegfx::B2DPolygon PixelToLogic( const basegfx::B2DPolygon rDevicePoly ) 
const;
 PolyPolygon PixelToLogic( const PolyPolygon rDevicePolyPoly ) 
const;
-basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon 
rDevicePolyPoly ) const;
 Region

[Libreoffice-commits] .: vcl/inc vcl/source

2011-12-11 Thread August Sodora
 vcl/inc/vcl/status.hxx   |   12 ---
 vcl/source/window/status.cxx |  155 ---
 2 files changed, 167 deletions(-)

New commits:
commit c95fa19f7c7b58a2beb65ad52335322ec2ae6f18
Author: August Sodora aug...@gmail.com
Date:   Sun Dec 11 21:01:03 2011 -0500

Remove unused code

diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index d039ddf..4fa982c 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -123,7 +123,6 @@ private:
 public:
 StatusBar( Window* pParent,
WinBits nWinStyle = WB_BORDER | WB_RIGHT );
-StatusBar( Window* pParent, const ResId rResId );
 ~StatusBar();
 
 virtual voidMouseButtonDown( const MouseEvent rMEvt );
@@ -144,15 +143,11 @@ public:
 sal_uInt16 nPos = STATUSBAR_APPEND );
 voidRemoveItem( sal_uInt16 nItemId );
 
-voidShowItem( sal_uInt16 nItemId );
 voidHideItem( sal_uInt16 nItemId );
 sal_BoolIsItemVisible( sal_uInt16 nItemId ) const;
 
-voidShowItems();
-voidHideItems();
 sal_BoolAreItemsVisible() const { return mbVisibleItems; }
 
-voidCopyItems( const StatusBar rStatusBar );
 voidClear();
 
 sal_uInt16  GetItemCount() const;
@@ -163,15 +158,12 @@ public:
 Point   GetItemTextPos( sal_uInt16 nItemId ) const;
 sal_uInt16  GetCurItemId() const { return mnCurItemId; }
 
-sal_uLong   GetItemWidth( sal_uInt16 nItemId ) const;
-StatusBarItemBits   GetItemBits( sal_uInt16 nItemId ) const;
 longGetItemOffset( sal_uInt16 nItemId ) const;
 
 voidSetItemText( sal_uInt16 nItemId, const XubString 
rText );
 const XubStringGetItemText( sal_uInt16 nItemId ) const;
 
 voidSetItemData( sal_uInt16 nItemId, void* pNewData );
-void*   GetItemData( sal_uInt16 nItemId ) const;
 
 voidSetItemCommand( sal_uInt16 nItemId, const XubString 
rCommand );
 const XubStringGetItemCommand( sal_uInt16 nItemId );
@@ -187,17 +179,13 @@ public:
 voidSetHelpId( sal_uInt16 nItemId, const rtl::OString 
rHelpId );
 rtl::OStringGetHelpId( sal_uInt16 nItemId ) const;
 
-voidSetBottomBorder( sal_Bool bBottomBorder = sal_True );
 sal_BoolIsBottomBorder() const { return mbBottomBorder; }
-
-voidSetTopBorder( sal_Bool bTopBorder = sal_True );
 sal_BoolIsTopBorder() const;
 
 voidStartProgressMode( const XubString rText );
 voidSetProgressValue( sal_uInt16 nPercent );
 voidEndProgressMode();
 sal_BoolIsProgressMode() const { return mbProgressMode; }
-voidResetProgressMode();
 
 voidSetText( const XubString rText );
 
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 944ad5f..32dcc4a 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -176,20 +176,6 @@ StatusBar::StatusBar( Window* pParent, WinBits nStyle ) :
 
 // ---
 
-StatusBar::StatusBar( Window* pParent, const ResId rResId ) :
-Window( WINDOW_STATUSBAR )
-{
-rResId.SetRT( RSC_STATUSBAR );
-WinBits nStyle = ImplInitRes( rResId );
-ImplInit( pParent, nStyle );
-ImplLoadRes( rResId );
-
-if ( !(nStyle  WB_HIDE) )
-Show();
-}
-
-// ---
-
 StatusBar::~StatusBar()
 {
 // Alle Items loeschen
@@ -1050,28 +1036,6 @@ void StatusBar::RemoveItem( sal_uInt16 nItemId )
 
 // ---
 
-void StatusBar::ShowItem( sal_uInt16 nItemId )
-{
-sal_uInt16 nPos = GetItemPos( nItemId );
-
-if ( nPos != STATUSBAR_ITEM_NOTFOUND )
-{
-ImplStatusItem* pItem = (*mpItemList)[ nPos ];
-if ( !pItem-mbVisible )
-{
-pItem-mbVisible = sal_True;
-
-mbFormat = sal_True;
-if ( ImplIsItemUpdate() )
-Invalidate();
-
-ImplCallEventListeners( VCLEVENT_STATUSBAR_SHOWITEM, (void*) 
sal_IntPtr(nItemId) );
-}
-}
-}
-
-// ---
-
 void StatusBar::HideItem( sal_uInt16 nItemId )
 {
 sal_uInt16 nPos = GetItemPos( nItemId );
@@ -1106,54 +1070,6 @@ sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) 
const
 
 // ---
 
-void StatusBar::ShowItems()
-{
-if ( !mbVisibleItems

[Libreoffice-commits] .: vcl/inc vcl/source

2011-12-11 Thread August Sodora
 vcl/inc/vcl/status.hxx   |2 --
 vcl/source/window/status.cxx |   22 --
 2 files changed, 24 deletions(-)

New commits:
commit 5008540c40484467e857c3245ae29c17c29673a2
Author: August Sodora aug...@gmail.com
Date:   Sun Dec 11 21:06:38 2011 -0500

Remove unused code

diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 4fa982c..56cf7c7 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -143,9 +143,7 @@ public:
 sal_uInt16 nPos = STATUSBAR_APPEND );
 voidRemoveItem( sal_uInt16 nItemId );
 
-voidHideItem( sal_uInt16 nItemId );
 sal_BoolIsItemVisible( sal_uInt16 nItemId ) const;
-
 sal_BoolAreItemsVisible() const { return mbVisibleItems; }
 
 voidClear();
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 32dcc4a..b701697 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1036,28 +1036,6 @@ void StatusBar::RemoveItem( sal_uInt16 nItemId )
 
 // ---
 
-void StatusBar::HideItem( sal_uInt16 nItemId )
-{
-sal_uInt16 nPos = GetItemPos( nItemId );
-
-if ( nPos != STATUSBAR_ITEM_NOTFOUND )
-{
-ImplStatusItem* pItem = (*mpItemList)[ nPos ];
-if ( pItem-mbVisible )
-{
-pItem-mbVisible = sal_False;
-
-mbFormat = sal_True;
-if ( ImplIsItemUpdate() )
-Invalidate();
-
-ImplCallEventListeners( VCLEVENT_STATUSBAR_HIDEITEM, (void*) 
sal_IntPtr(nItemId) );
-}
-}
-}
-
-// ---
-
 sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const
 {
 sal_uInt16 nPos = GetItemPos( nItemId );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basegfx/inc basegfx/Library_basegfx.mk basegfx/Package_inc.mk basegfx/source basegfx/StaticLibrary_basegfx_s.mk basegfx/test

2011-12-19 Thread August Sodora
 basegfx/Library_basegfx.mk |1 
 basegfx/Package_inc.mk |1 
 basegfx/StaticLibrary_basegfx_s.mk |1 
 basegfx/inc/basegfx/tools/debugplotter.hxx |  111 ---
 basegfx/source/tools/debugplotter.cxx  |  416 -
 basegfx/test/basegfx2d.cxx |  321 --
 6 files changed, 851 deletions(-)

New commits:
commit cdb2736f5bbc15c0b485cde667d889ed17c699c6
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 19 15:33:43 2011 -0500

Remove DebugPlotter

diff --git a/basegfx/Library_basegfx.mk b/basegfx/Library_basegfx.mk
index 5e4885a..af62918 100644
--- a/basegfx/Library_basegfx.mk
+++ b/basegfx/Library_basegfx.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_Library_add_linked_libs,basegfx,\
 $(eval $(call gb_Library_add_exception_objects,basegfx,\
basegfx/source/tools/b2dclipstate \
basegfx/source/tools/canvastools \
-   basegfx/source/tools/debugplotter \
basegfx/source/tools/gradienttools \
basegfx/source/tools/keystoplerp \
basegfx/source/tools/liangbarsky \
diff --git a/basegfx/Package_inc.mk b/basegfx/Package_inc.mk
index 158948e..6d1a4e7 100644
--- a/basegfx/Package_inc.mk
+++ b/basegfx/Package_inc.mk
@@ -30,7 +30,6 @@ $(eval $(call 
gb_Package_Package,basegfx_inc,$(SRCDIR)/basegfx/inc))
 
 $(eval $(call 
gb_Package_add_file,basegfx_inc,inc/basegfx/tools/lerp.hxx,basegfx/tools/lerp.hxx))
 $(eval $(call 
gb_Package_add_file,basegfx_inc,inc/basegfx/tools/keystoplerp.hxx,basegfx/tools/keystoplerp.hxx))
-$(eval $(call 
gb_Package_add_file,basegfx_inc,inc/basegfx/tools/debugplotter.hxx,basegfx/tools/debugplotter.hxx))
 $(eval $(call 
gb_Package_add_file,basegfx_inc,inc/basegfx/tools/canvastools.hxx,basegfx/tools/canvastools.hxx))
 $(eval $(call 
gb_Package_add_file,basegfx_inc,inc/basegfx/tools/rectcliptools.hxx,basegfx/tools/rectcliptools.hxx))
 $(eval $(call 
gb_Package_add_file,basegfx_inc,inc/basegfx/tools/b2dclipstate.hxx,basegfx/tools/b2dclipstate.hxx))
diff --git a/basegfx/StaticLibrary_basegfx_s.mk 
b/basegfx/StaticLibrary_basegfx_s.mk
index 9b113bd..891e232 100644
--- a/basegfx/StaticLibrary_basegfx_s.mk
+++ b/basegfx/StaticLibrary_basegfx_s.mk
@@ -71,7 +71,6 @@ $(WORKDIR)/CustomTarget/basegfx/source/%.cxx : 
$(SRCDIR)/basegfx/source/%.cxx
 # copied sources are generated cxx sources
 $(eval $(call gb_StaticLibrary_add_generated_exception_objects,basegfx_s,\
CustomTarget/basegfx/source/tools/liangbarsky \
-   CustomTarget/basegfx/source/tools/debugplotter \
CustomTarget/basegfx/source/tools/canvastools \
CustomTarget/basegfx/source/tools/gradienttools \
CustomTarget/basegfx/source/tools/keystoplerp \
diff --git a/basegfx/inc/basegfx/tools/debugplotter.hxx 
b/basegfx/inc/basegfx/tools/debugplotter.hxx
deleted file mode 100644
index a588d0f..000
--- a/basegfx/inc/basegfx/tools/debugplotter.hxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * http://www.openoffice.org/license.html
- * for a copy of the LGPLv3 License.
- *
- /
-
-#ifndef _BGFX_TOOLS_DEBUGPLOTTER_HXX
-#define _BGFX_TOOLS_DEBUGPLOTTER_HXX
-
-#include basegfx/point/b2dpoint.hxx
-#include basegfx/vector/b2dvector.hxx
-#include basegfx/range/b2drange.hxx
-#include basegfx/polygon/b2dpolygon.hxx
-#include basegfx/polygon/b2dpolypolygon.hxx
-#include rtl/string.hxx
-#include boost/utility.hpp // for noncopyable
-#include vector
-#include utility
-#include iosfwd
-#include basegfx/basegfxdllapi.h
-
-
-namespace basegfx
-{
-class B2DCubicBezier;
-
-/** Generates debug output for various basegfx data types.
-
-Use this class to produce debug (trace) output for various
-basegfx geometry data types. By default, this class outputs
-via OSL_TRACE (i.e. to stderr), and uses the gnuplot output

[Libreoffice-commits] .: cui/source

2011-12-19 Thread August Sodora
 cui/source/options/treeopt.cxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit add0b7de36f4b0d133906fdd9647d742c33dd63b
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 19 15:59:35 2011 -0500

String-OUString

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 2277188..b790ffa 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1181,12 +1181,15 @@ IMPL_LINK( OfaTreeOptionsDialog, SelectHdl_Impl, 
Timer*, EMPTYARG )
 pPageInfo-m_pExtPage-ActivatePage();
 }
 
-String sTmpTitle = sTitle;
-sTmpTitle += String::CreateFromAscii( - );
-sTmpTitle += aTreeLB.GetEntryText(pParent);
-sTmpTitle += String::CreateFromAscii( - );
-sTmpTitle += aTreeLB.GetEntryText(pEntry);
-SetText(sTmpTitle);
+{
+::rtl::OUStringBuffer sTitleBuf(sTitle);
+sTitleBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM( - ));
+sTitleBuf.append(aTreeLB.GetEntryText(pParent));
+sTitleBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM( - ));
+sTitleBuf.append(aTreeLB.GetEntryText(pEntry));
+SetText(sTitleBuf.makeStringAndClear());
+}
+
 pCurrentPageEntry = pEntry;
 if ( !bForgetSelection )
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - vcl/inc vcl/source writerfilter/inc writerfilter/source

2011-12-19 Thread August Sodora
 vcl/inc/vcl/field.hxx   |9 --
 vcl/source/control/field2.cxx   |   92 
 writerfilter/inc/resourcemodel/TagLogger.hxx|5 -
 writerfilter/source/resourcemodel/TagLogger.cxx |   53 -
 4 files changed, 159 deletions(-)

New commits:
commit b0e993d42e1df8c68c4c2684ab9dda27a1329594
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 19 21:56:10 2011 -0500

callcatcher: Remove unused code

diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx 
b/writerfilter/inc/resourcemodel/TagLogger.hxx
index d45637c..2a13487 100644
--- a/writerfilter/inc/resourcemodel/TagLogger.hxx
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx
@@ -73,14 +73,9 @@ namespace writerfilter
 void element(const std::string  name);
 void unoPropertySet(uno::Referencebeans::XPropertySet rPropSet);
 #endif
-void startElement(const std::string  name);
 void attribute(const std::string  name, const std::string  value);
 void attribute(const std::string  name, const ::rtl::OUString  
value);
-void attribute(const std::string  name, sal_uInt32 value);
-void attribute(const std::string  name, const uno::Any aAny);
 void chars(const std::string  chars);
-void chars(const ::rtl::OUString  chars);
-void endElement();
 
 #ifdef DEBUG_CONTEXT_HANDLER
 void propertySet(writerfilter::ReferenceProperties::Pointer_t props,
diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx 
b/writerfilter/source/resourcemodel/TagLogger.cxx
index 7b63ce0..6a0795c 100644
--- a/writerfilter/source/resourcemodel/TagLogger.cxx
+++ b/writerfilter/source/resourcemodel/TagLogger.cxx
@@ -156,13 +156,6 @@ namespace writerfilter
 
 #endif
 
-void TagLogger::startElement(const string  name)
-{
-xmlChar* xmlName = xmlCharStrdup( name.c_str() );
-xmlTextWriterStartElement( pWriter, xmlName );
-xmlFree( xmlName );
-}
-
 void TagLogger::attribute(const string  name, const string  value)
 {
 xmlChar* xmlName = xmlCharStrdup( name.c_str() );
@@ -178,42 +171,6 @@ namespace writerfilter
 attribute( name, OUStringToOString( value, RTL_TEXTENCODING_ASCII_US 
).getStr() );
 }
 
-void TagLogger::attribute(const string  name, sal_uInt32 value)
-{
-xmlChar* xmlName = xmlCharStrdup( name.c_str() );
-xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
-   % SAL_PRIuUINT32, value );
-xmlFree( xmlName );
-}
-
-void TagLogger::attribute(const string  name, const uno::Any aAny)
-{
-string aTmpStrInt;
-string aTmpStrFloat;
-string aTmpStrString;
-
-sal_Int32 nInt = 0;
-float nFloat = 0.0;
-::rtl::OUString aStr;
-
-xmlChar* xmlName = xmlCharStrdup( name.c_str() );
-if ( aAny = nInt )
-{
-xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
-   % SAL_PRIdINT32, nInt );
-}
-else if ( aAny = nFloat )
-{
-xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
-   %f, nFloat );
-}
-else if ( aAny = aStr )
-{
-attribute( name, aStr );
-}
-xmlFree( xmlName );
-}
-
 void TagLogger::chars(const string  rChars)
 {
 xmlChar* xmlChars = xmlCharStrdup( rChars.c_str() );
@@ -221,16 +178,6 @@ namespace writerfilter
 xmlFree( xmlChars );
 }
 
-void TagLogger::chars(const ::rtl::OUString  rChars)
-{
-chars(OUStringToOString(rChars, RTL_TEXTENCODING_ASCII_US).getStr());
-}
-
-void TagLogger::endElement()
-{
-xmlTextWriterEndElement( pWriter );
-}
-
 #ifdef DEBUG_CONTEXT_HANDLER
 class PropertySetDumpHandler : public Properties
 {
commit f94db3d01631e75750431a87215338bf182f7c61
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 19 21:45:29 2011 -0500

callcatcher: Remove unused code

diff --git a/vcl/inc/vcl/field.hxx b/vcl/inc/vcl/field.hxx
index 391a6e6..76a710d 100644
--- a/vcl/inc/vcl/field.hxx
+++ b/vcl/inc/vcl/field.hxx
@@ -386,8 +386,6 @@ public:
 voidSetDate( const Date rNewDate );
 voidSetUserDate( const Date rNewDate );
 DateGetDate() const;
-DateGetRealDate() const;
-sal_BoolIsDateModified() const;
 voidSetEmptyDate();
 sal_BoolIsEmptyDate() const;
 DateGetCorrectedDate() const { return maCorrectedDate; 
}
@@ -835,7 +833,6 @@ class VCL_DLLPUBLIC DateBox : public ComboBox, public 
DateFormatter
 {
 public:
 DateBox( Window* pParent, WinBits nWinStyle );
-DateBox( Window* pParent, const ResId rResId );
 ~DateBox();
 
 virtual long

[Libreoffice-commits] .: cppcanvas/inc cppcanvas/source

2011-12-19 Thread August Sodora
 cppcanvas/inc/cppcanvas/vclfactory.hxx  |   35 
 cppcanvas/source/wrapper/vclfactory.cxx |  237 
 2 files changed, 272 deletions(-)

New commits:
commit d498a3c2a12e03810a81937c1252dc0b16747936
Author: August Sodora aug...@gmail.com
Date:   Mon Dec 19 23:19:45 2011 -0500

callcatcher: Remove unused code

diff --git a/cppcanvas/inc/cppcanvas/vclfactory.hxx 
b/cppcanvas/inc/cppcanvas/vclfactory.hxx
index 14d9e6c..ab84534 100644
--- a/cppcanvas/inc/cppcanvas/vclfactory.hxx
+++ b/cppcanvas/inc/cppcanvas/vclfactory.hxx
@@ -77,44 +77,17 @@ namespace cppcanvas
 public:
 static VCLFactory getInstance();
 
-BitmapCanvasSharedPtr   createCanvas( const ::Window rVCLWindow );
 BitmapCanvasSharedPtr   createCanvas( const 
::com::sun::star::uno::Reference
   
::com::sun::star::rendering::XBitmapCanvas  xCanvas );
 
 SpriteCanvasSharedPtr   createSpriteCanvas( const ::Window rVCLWindow 
) const;
 SpriteCanvasSharedPtr   createSpriteCanvas( const 
::com::sun::star::uno::Reference

::com::sun::star::rendering::XSpriteCanvas  xCanvas ) const;
-SpriteCanvasSharedPtr   createFullscreenSpriteCanvas( const ::Window 
rVCLWindow, const Size rFullscreenSize ) const;
-
-/** Create a polygon from a tools::Polygon
-
-The created polygon initially has the same size in user
-coordinate space as the source polygon
- */
-PolyPolygonSharedPtrcreatePolyPolygon( const CanvasSharedPtr, 
const ::Polygon rPoly ) const;
-PolyPolygonSharedPtrcreatePolyPolygon( const CanvasSharedPtr, 
const ::PolyPolygon rPoly ) const;
-
-/** Create an uninitialized bitmap with the given size
- */
-BitmapSharedPtr createBitmap( const CanvasSharedPtr, const 
::Size rSize ) const;
-
-/** Create an uninitialized alpha bitmap with the given size
- */
-BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr, 
const ::Size rSize ) const;
 
 /** Create a bitmap from a VCL Bitmap
  */
-BitmapSharedPtr createBitmap( const CanvasSharedPtr, const 
::Bitmap rBitmap ) const;
 BitmapSharedPtr createBitmap( const CanvasSharedPtr, const 
::BitmapEx rBmpEx ) const;
 
-/** Create a renderer object from a Graphic
-
-The created renderer initially draws the graphic
-one-by-one units large, in user coordinate space
- */
-RendererSharedPtr   createRenderer( const CanvasSharedPtr 
 rCanvas,
-const ::Graphic   
 rGraphic,
-const Renderer::Parameters
 rParms ) const;
 /** Create a renderer object from a Metafile
 
 The created renderer initially draws the metafile
@@ -124,14 +97,6 @@ namespace cppcanvas
 const ::GDIMetaFile   
 rMtf,
 const Renderer::Parameters
 rParms ) const;
 
-/** Create an animated sprite from a VCL animation
- */
-SpriteSharedPtr createAnimatedSprite( const 
SpriteCanvasSharedPtr, const ::Animation rAnim ) const;
-
-/** Create a text portion with the given content string
- */
-TextSharedPtr   createText( const CanvasSharedPtr, const 
::rtl::OUString ) const;
-
 private:
 friend struct InitInstance;
 
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx 
b/cppcanvas/source/wrapper/vclfactory.cxx
index a66ab33..0513969 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -45,7 +45,6 @@
 #include impltext.hxx
 #include implsprite.hxx
 
-
 using namespace ::com::sun::star;
 
 namespace cppcanvas
@@ -74,15 +73,6 @@ namespace cppcanvas
 {
 }
 
-BitmapCanvasSharedPtr VCLFactory::createCanvas( const ::Window rVCLWindow 
)
-{
-return BitmapCanvasSharedPtr(
-new internal::ImplBitmapCanvas(
-uno::Reference rendering::XBitmapCanvas (
-rVCLWindow.GetCanvas(),
-uno::UNO_QUERY) ) );
-}
-
 BitmapCanvasSharedPtr VCLFactory::createCanvas( const uno::Reference 
rendering::XBitmapCanvas  xCanvas )
 {
 return BitmapCanvasSharedPtr(
@@ -104,118 +94,6 @@ namespace cppcanvas
 new internal::ImplSpriteCanvas( xCanvas ) );
 }
 
-SpriteCanvasSharedPtr VCLFactory::createFullscreenSpriteCanvas( const 
::Window rVCLWindow,
-const 
Size rFullscreenSize ) const
-{
-return SpriteCanvasSharedPtr(
-new internal::ImplSpriteCanvas(
-uno::Reference rendering

[Libreoffice-commits] .: basctl/source

2011-12-20 Thread August Sodora
 basctl/source/basicide/moduldlg.cxx |   41 
 basctl/source/basicide/moduldlg.hxx |6 ++---
 2 files changed, 22 insertions(+), 25 deletions(-)

New commits:
commit b0aac3f446f95080cbcac8e2f011dd56be1bacdd
Author: August Sodora aug...@gmail.com
Date:   Tue Dec 20 00:59:11 2011 -0500

String-OUString

diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index 954f016..657c3c8 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -732,7 +732,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
 return 0;
 }
 
-bool ObjectPage::GetSelection( ScriptDocument rDocument, String rLibName )
+bool ObjectPage::GetSelection( ScriptDocument rDocument, ::rtl::OUString 
rLibName )
 {
 bool bRet = false;
 
@@ -740,8 +740,8 @@ bool ObjectPage::GetSelection( ScriptDocument rDocument, 
String rLibName )
 BasicEntryDescriptor aDesc( aBasicBox.GetEntryDescriptor( pCurEntry ) );
 rDocument = aDesc.GetDocument();
 rLibName = aDesc.GetLibName();
-if ( !rLibName.Len() )
-rLibName = String::CreateFromAscii( Standard );
+if ( rLibName.isEmpty() )
+rLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(Standard));
 
 DBG_ASSERT( rDocument.isAlive(), ObjectPage::GetSelection: no or dead 
ScriptDocument in the selection! );
 if ( !rDocument.isAlive() )
@@ -784,11 +784,11 @@ bool ObjectPage::GetSelection( ScriptDocument rDocument, 
String rLibName )
 void ObjectPage::NewModule()
 {
 ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
-String aLibName;
+::rtl::OUString aLibName;
 
 if ( GetSelection( aDocument, aLibName ) )
 {
-String aModName;
+::rtl::OUString aModName;
 createModImpl( static_castWindow*( this ), aDocument,
 aBasicBox, aLibName, aModName, true );
 }
@@ -797,7 +797,7 @@ void ObjectPage::NewModule()
 void ObjectPage::NewDialog()
 {
 ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
-String aLibName;
+::rtl::OUString aLibName;
 
 if ( GetSelection( aDocument, aLibName ) )
 {
@@ -809,14 +809,14 @@ void ObjectPage::NewDialog()
 
 if (xNewDlg-Execute() != 0)
 {
-String aDlgName( xNewDlg-GetObjectName() );
-if (aDlgName.Len() == 0)
+::rtl::OUString aDlgName( xNewDlg-GetObjectName() );
+if (aDlgName.isEmpty())
 aDlgName = aDocument.createObjectName( E_DIALOGS, aLibName);
 
 if ( aDocument.hasDialog( aLibName, aDlgName ) )
 {
 ErrorBox( this, WB_OK | WB_DEF_OK,
-String( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) 
).Execute();
+  ResId::toString( IDEResId( 
RID_STR_SBXNAMEALLREADYUSED2 ) ) ).Execute();
 }
 else
 {
@@ -933,7 +933,7 @@ LibDialog::LibDialog( Window* pParent )
 aReferenceBox(  this, IDEResId( RID_CB_REF ) ),
 aReplaceBox(this, IDEResId( RID_CB_REPL ) )
 {
-SetText( String( IDEResId( RID_STR_APPENDLIBS ) ) );
+SetText( ResId::toString( IDEResId( RID_STR_APPENDLIBS ) ) );
 FreeResource();
 }
 
@@ -942,16 +942,16 @@ LibDialog::~LibDialog()
 {
 }
 
-void LibDialog::SetStorageName( const String rName )
+void LibDialog::SetStorageName( const ::rtl::OUString rName )
 {
-String aName( IDEResId( RID_STR_FILENAME ) );
+::rtl::OUString aName( ResId::toString( IDEResId( RID_STR_FILENAME ) ) );
 aName += rName;
 aStorageName.SetText( aName );
 }
 
 // Helper function
 SbModule* createModImpl( Window* pWin, const ScriptDocument rDocument,
-BasicTreeListBox rBasicBox, const String rLibName, String aModName, bool 
bMain )
+BasicTreeListBox rBasicBox, const ::rtl::OUString rLibName, 
::rtl::OUString aModName, bool bMain )
 {
 OSL_ENSURE( rDocument.isAlive(), createModImpl: invalid document! );
 if ( !rDocument.isAlive() )
@@ -959,11 +959,11 @@ SbModule* createModImpl( Window* pWin, const 
ScriptDocument rDocument,
 
 SbModule* pModule = NULL;
 
-String aLibName( rLibName );
-if ( !aLibName.Len() )
-aLibName = String::CreateFromAscii( Standard );
+::rtl::OUString aLibName( rLibName );
+if ( aLibName.isEmpty() )
+aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(Standard));
 rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
-if ( !aModName.Len() )
+if ( aModName.isEmpty() )
 aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
 
 boost::scoped_ptr NewObjectDialog  xNewDlg(
@@ -1011,7 +1011,7 @@ SbModule* createModImpl( Window* pWin, const 
ScriptDocument rDocument,
 if( pBasic  rDocument.isInVBAMode() )
 {
 // add the new module in the Modules entry
-SvLBoxEntry* pLibSubEntry = rBasicBox.FindEntry

[Libreoffice-commits] .: cppcanvas/inc cppcanvas/source

2011-12-21 Thread August Sodora
 cppcanvas/inc/cppcanvas/basegfxfactory.hxx|6 ---
 cppcanvas/source/inc/implrenderer.hxx |5 --
 cppcanvas/source/mtfrenderer/emfplus.cxx  |   28 --
 cppcanvas/source/mtfrenderer/implrenderer.cxx |   48 
 cppcanvas/source/wrapper/basegfxfactory.cxx   |   50 --
 5 files changed, 137 deletions(-)

New commits:
commit 070eff8cf1ad7763b8b730336f11032893b77049
Author: August Sodora aug...@gmail.com
Date:   Wed Dec 21 00:22:06 2011 -0500

callcatcher: Remove unused code

diff --git a/cppcanvas/inc/cppcanvas/basegfxfactory.hxx 
b/cppcanvas/inc/cppcanvas/basegfxfactory.hxx
index 5cb87aa..dbb8d12 100644
--- a/cppcanvas/inc/cppcanvas/basegfxfactory.hxx
+++ b/cppcanvas/inc/cppcanvas/basegfxfactory.hxx
@@ -75,7 +75,6 @@ namespace cppcanvas
 coordinate space as the source polygon
  */
 PolyPolygonSharedPtrcreatePolyPolygon( const CanvasSharedPtr, 
const ::basegfx::B2DPolygon rPoly ) const;
-PolyPolygonSharedPtrcreatePolyPolygon( const CanvasSharedPtr, 
const ::basegfx::B2DPolyPolygon rPoly ) const;
 
 /** Create an uninitialized bitmap with the given size
  */
@@ -85,10 +84,6 @@ namespace cppcanvas
  */
 BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr, 
const ::basegfx::B2ISize rSize ) const;
 
-/** Create a text portion with the given content string
- */
-TextSharedPtr   createText( const CanvasSharedPtr, const 
::rtl::OUString ) const;
-
 private:
 friend struct InitInstance2;
 
@@ -100,7 +95,6 @@ namespace cppcanvas
 BaseGfxFactory(const BaseGfxFactory);
 BaseGfxFactory operator=( const BaseGfxFactory );
 };
-
 }
 
 #endif /* _CPPCANVAS_BASEGFXFACTORY_HXX */
diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index 3c1ec6d..edf69be 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -174,9 +174,6 @@ static float GetSwapFloat( SvStream rSt )
 ImplRenderer( const CanvasSharedPtrrCanvas,
   const GDIMetaFilerMtf,
   const Parameters rParms );
-ImplRenderer( const CanvasSharedPtrrCanvas,
-  const BitmapEx   rBmpEx,
-  const Parameters rParms );
 
 virtual ~ImplRenderer();
 
@@ -210,10 +207,8 @@ static float GetSwapFloat( SvStream rSt )
 void ReadRectangle (SvStream s, float x, float y, float width, 
float height, sal_uInt32 flags = 0);
 void ReadPoint (SvStream s, float x, float y, sal_uInt32 flags 
= 0);
 void MapToDevice (double x, double y);
-::basegfx::B2DPoint Map (::basegfx::B2DPoint p);
 ::basegfx::B2DPoint Map (double ix, double iy);
 ::basegfx::B2DSize MapSize (double iwidth, double iheight);
-::basegfx::B2DRange MapRectangle (double ix, double iy, double 
iwidth, double iheight);
 
 private:
 // default: disabled copy/assignment
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 91c9560..8ccb75b 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -825,11 +825,6 @@ namespace cppcanvas
 y = 100*nMmY*y/nPixY;
 }
 
-::basegfx::B2DPoint ImplRenderer::Map (::basegfx::B2DPoint p)
-{
-return Map (p.getX (), p.getY ());
-}
-
 ::basegfx::B2DPoint ImplRenderer::Map (double ix, double iy)
 {
 double x, y;
@@ -863,29 +858,6 @@ namespace cppcanvas
 return ::basegfx::B2DSize (w, h);
 }
 
-::basegfx::B2DRange ImplRenderer::MapRectangle (double ix, double iy, 
double iwidth, double iheight)
-{
-double x, y, w, h;
-
-x = ix*aWorldTransform.eM11 + iy*aWorldTransform.eM21 + 
aWorldTransform.eDx;
-y = ix*aWorldTransform.eM12 + iy*aWorldTransform.eM22 + 
aWorldTransform.eDy;
-w = iwidth*aWorldTransform.eM11 + iheight*aWorldTransform.eM21;
-h = iwidth*aWorldTransform.eM12 + iheight*aWorldTransform.eM22;
-
-MapToDevice (x, y);
-MapToDevice (w, h);
-
-x -= nFrameLeft;
-y -= nFrameTop;
-
-x *= aBaseTransform.eM11;
-y *= aBaseTransform.eM22;
-w *= aBaseTransform.eM11;
-h *= aBaseTransform.eM22;
-
-return ::basegfx::B2DRange (x, y, x + w, y + h);
-}
-
 #define COLOR(x) \
 ::vcl::unotools::colorToDoubleSequence( ::Color (0xff - (x  24), \
  (x  16)  0xff, \
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 65b9d21..8dde2f0 100644
--- a/cppcanvas/source

[Libreoffice-commits] .: sfx2/source svtools/AllLangResTarget_svt.mk svtools/inc svtools/Library_svt.mk svtools/Package_inc.mk svtools/source svtools/util

2011-12-21 Thread August Sodora
 sfx2/source/appl/app.cxx|  106 -
 svtools/AllLangResTarget_svt.mk |1 
 svtools/Library_svt.mk  |1 
 svtools/Package_inc.mk  |2 
 svtools/inc/svtools/helpid.hrc  |6 
 svtools/inc/svtools/testtool.hxx|   78 
 svtools/source/misc/helpagentwindow.cxx |3 
 svtools/source/plugapp/testtool.hrc |   55 -
 svtools/source/plugapp/testtool.src |  194 
 svtools/source/plugapp/ttprops.cxx  |   36 -
 svtools/util/hidother.src   |3 
 11 files changed, 485 deletions(-)

New commits:
commit eeecf625351238f90c61c82b403bd65e35d7833e
Author: August Sodora aug...@gmail.com
Date:   Wed Dec 21 06:49:39 2011 -0500

Remove TTProperties

diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index de0f385..d611d94 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -26,7 +26,6 @@
  *
  /
 
-
 #if defined UNX
 #include limits.h
 #else // UNX
@@ -153,109 +152,6 @@ static SfxHelp*pSfxHelp = NULL;
 
 namespace
 {
-class SfxPropertyHandler : public PropertyHandler
-{
-virtual void Property( ApplicationProperty );
-};
-
-void SfxPropertyHandler::Property( ApplicationProperty rProp )
-{
-TTProperties* pTTProperties = PTR_CAST( TTProperties, rProp );
-if ( pTTProperties )
-{
-pTTProperties-nPropertyVersion = TT_PROPERTIES_VERSION;
-switch ( pTTProperties-nActualPR )
-{
-case TT_PR_SLOTS:
-{
-pTTProperties-nSidOpenUrl = SID_OPENURL;
-pTTProperties-nSidFileName = SID_FILE_NAME;
-pTTProperties-nSidNewDocDirect = SID_NEWDOCDIRECT;
-pTTProperties-nSidCopy = SID_COPY;
-pTTProperties-nSidPaste = SID_PASTE;
-pTTProperties-nSidSourceView = SID_SOURCEVIEW;
-pTTProperties-nSidSelectAll = SID_SELECTALL;
-pTTProperties-nSidReferer = SID_REFERER;
-pTTProperties-nActualPR = 0;
-}
-break;
-case TT_PR_DISPATCHER:
-{
-// interface for TestTool
-SfxViewFrame* pViewFrame=0;
-SfxDispatcher* pDispatcher=0;
-pViewFrame = SfxViewFrame::Current();
-if ( !pViewFrame )
-pViewFrame = SfxViewFrame::GetFirst();
-if ( pViewFrame )
-pDispatcher = pViewFrame-GetDispatcher();
-else
-pDispatcher = NULL;
-if ( !pDispatcher )
-pTTProperties-nActualPR = TT_PR_ERR_NODISPATCHER;
-else
-{
-
pDispatcher-SetExecuteMode(EXECUTEMODE_DIALOGASYNCHRON);
-if ( pTTProperties-mnSID == SID_NEWDOCDIRECT
-  || pTTProperties-mnSID == SID_OPENDOC )
-{
-SfxPoolItem** pArgs = pTTProperties-mppArgs;
-SfxAllItemSet aSet( SFX_APP()-GetPool() );
-if ( pArgs  *pArgs )
-{
-for ( SfxPoolItem **pArg = pArgs; *pArg; 
++pArg )
-aSet.Put( **pArg );
-}
-if ( pTTProperties-mnSID == SID_NEWDOCDIRECT )
-{
-String aFactory = 
String::CreateFromAscii(private:factory/);
-if ( pArgs  *pArgs )
-{
-SFX_ITEMSET_ARG( aSet, pFactoryName, 
SfxStringItem, SID_NEWDOCDIRECT, sal_False );
-if ( pFactoryName )
-aFactory += pFactoryName-GetValue();
-else
-aFactory += 
String::CreateFromAscii(swriter);
-}
-else
-aFactory += 
String::CreateFromAscii(swriter);
-
-aSet.Put( SfxStringItem( SID_FILE_NAME, 
aFactory ) );
-aSet.ClearItem( SID_NEWDOCDIRECT );
-pTTProperties-mnSID = SID_OPENDOC;
-}
-
-aSet.Put( SfxStringItem( SID_TARGETNAME, 
DEFINE_CONST_UNICODE(_blank) ) );
-if ( pDispatcher-ExecuteFunction( 
pTTProperties-mnSID, aSet, pTTProperties-mnMode

[Libreoffice-commits] .: default_images/svtools

2011-12-21 Thread August Sodora
 dev/null |binary
 1 file changed

New commits:
commit 7167559379cd44e0160ba20c69cbb6954887e32b
Author: August Sodora aug...@gmail.com
Date:   Wed Dec 21 07:13:00 2011 -0500

Remove unused icons

diff --git a/default_images/svtools/res/ttall.png 
b/default_images/svtools/res/ttall.png
deleted file mode 100644
index 2282805..000
Binary files a/default_images/svtools/res/ttall.png and /dev/null differ
diff --git a/default_images/svtools/res/ttdef.png 
b/default_images/svtools/res/ttdef.png
deleted file mode 100644
index c555da7..000
Binary files a/default_images/svtools/res/ttdef.png and /dev/null differ
diff --git a/default_images/svtools/res/tthid.png 
b/default_images/svtools/res/tthid.png
deleted file mode 100644
index 5050d4e..000
Binary files a/default_images/svtools/res/tthid.png and /dev/null differ
diff --git a/default_images/svtools/res/ttremote.png 
b/default_images/svtools/res/ttremote.png
deleted file mode 100644
index f9fe926..000
Binary files a/default_images/svtools/res/ttremote.png and /dev/null differ
diff --git a/default_images/svtools/res/ttshow.png 
b/default_images/svtools/res/ttshow.png
deleted file mode 100644
index f3ac574..000
Binary files a/default_images/svtools/res/ttshow.png and /dev/null differ
diff --git a/default_images/svtools/res/ttshow2.png 
b/default_images/svtools/res/ttshow2.png
deleted file mode 100644
index b6fb4a3..000
Binary files a/default_images/svtools/res/ttshow2.png and /dev/null differ
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-21 Thread August Sodora
 sfx2/inc/sfx2/dispatch.hxx   |3 -
 sfx2/source/appl/app.cxx |1 
 sfx2/source/appl/appcfg.cxx  |1 
 sfx2/source/control/dispatch.cxx |   86 ---
 4 files changed, 91 deletions(-)

New commits:
commit 073431d26d39216a7f5f85489ecd4eb60806ee88
Author: August Sodora aug...@gmail.com
Date:   Wed Dec 21 08:37:20 2011 -0500

More removal from TTProperties

diff --git a/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx
index 0591d1f..de65742 100644
--- a/sfx2/inc/sfx2/dispatch.hxx
+++ b/sfx2/inc/sfx2/dispatch.hxx
@@ -125,9 +125,6 @@ public:
 
 virtual ~SfxDispatcher();
 
-virtual sal_uInt16  ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** 
ppArgs=0, sal_uInt16 nMode=0 );
-sal_uInt16  ExecuteFunction( sal_uInt16 nSID, const 
SfxItemSet rArgs , sal_uInt16 nMode=0 );
-
 virtual voidSetExecuteMode( sal_uInt16 );
 
 const SfxPoolItem*  Execute( sal_uInt16 nSlot,
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index d611d94..81bf1f6 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -138,7 +138,6 @@
 #include unotools/syslocaleoptions.hxx
 #include unotools/syslocale.hxx
 #include framework/addonsoptions.hxx
-#include svtools/ttprops.hxx
 #include unotools/extendedsecurityoptions.hxx
 #include rtl/instance.hxx
 #include rtl/strbuf.hxx
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 8fa9c07..f035e02 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -49,7 +49,6 @@
 
 #define _SVSTDARR_STRINGS
 #include svl/svstdarr.hxx
-#include svtools/ttprops.hxx
 #include sfx2/sfxsids.hrc
 #include sot/exchange.hxx
 
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 44d0a51..a720354 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -36,7 +36,6 @@
 #include svl/eitem.hxx
 #include svl/undo.hxx
 #include vcl/wrkwin.hxx
-#include svtools/ttprops.hxx
 #include stdio.h
 #include stdarg.h
 #include stdlib.h  // due to bsearch
@@ -995,91 +994,6 @@ void MappedPut_Impl( SfxAllItemSet rSet, const 
SfxPoolItem rItem )
 #define SFX_USE_BINDINGS 0x8000
 #endif
 
-sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, SfxPoolItem 
**pArgs,
-   sal_uInt16 nMode )
-{
-if ( !nMode )
-nMode = pImp-nStandardMode;
-
-// through Bindings/Interceptor? (then the return value is not exact)
-sal_Bool bViaBindings = SFX_USE_BINDINGS == ( nMode  SFX_USE_BINDINGS );
-nMode = ~sal_uInt16(SFX_USE_BINDINGS);
-if ( bViaBindings  GetBindings() )
-return GetBindings()-Execute( nSlot, (const SfxPoolItem **) pArgs, 
nMode )
-? EXECUTE_POSSIBLE
-: EXECUTE_NO;
-
-// otherwise through the Dispatcher
-if ( IsLocked(nSlot) )
-return 0;
-SfxShell *pShell = 0;
-SfxCallMode eCall = SFX_CALLMODE_SYNCHRON;
-sal_uInt16 nRet = EXECUTE_NO;
-const SfxSlot *pSlot = 0;
-if ( GetShellAndSlot_Impl( nSlot, pShell, pSlot, sal_False, sal_False ) )
-{
-// Feasibility test before
-if ( pSlot-IsMode( SFX_SLOT_FASTCALL ) ||
-pShell-CanExecuteSlot_Impl( *pSlot ) )
-nRet = EXECUTE_POSSIBLE;
-
-if ( nMode == EXECUTEMODE_ASYNCHRON )
-eCall = SFX_CALLMODE_ASYNCHRON;
-else if ( nMode == EXECUTEMODE_DIALOGASYNCHRON  pSlot-IsMode( 
SFX_SLOT_HASDIALOG ) )
-eCall = SFX_CALLMODE_ASYNCHRON;
-else if ( pSlot-GetMode()  SFX_SLOT_ASYNCHRON )
-eCall = SFX_CALLMODE_ASYNCHRON;
-if ( pArgs  *pArgs )
-{
-SfxAllItemSet aSet( pShell-GetPool() );
-for ( SfxPoolItem **pArg = pArgs; *pArg; ++pArg )
-MappedPut_Impl( aSet, **pArg );
-SfxRequest aReq( nSlot, eCall, aSet );
-_Execute( *pShell, *pSlot, aReq, eCall );
-}
-else
-{
-SfxRequest aReq( nSlot, eCall, pShell-GetPool() );
-_Execute( *pShell, *pSlot, aReq, eCall );
-}
-}
-
-return nRet;
-}
-
-sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, const SfxItemSet 
rArgs,
-   sal_uInt16 nMode )
-{
-if ( !nMode )
-nMode = pImp-nStandardMode;
-
-// otherwise through the Dispatcher
-if ( IsLocked(nSlot) )
-return 0;
-SfxShell *pShell = 0;
-SfxCallMode eCall = SFX_CALLMODE_SYNCHRON;
-sal_uInt16 nRet = EXECUTE_NO;
-const SfxSlot *pSlot = 0;
-if ( GetShellAndSlot_Impl( nSlot, pShell, pSlot, sal_False, sal_False ) )
-{
-// Feasibility test before
-if ( pSlot-IsMode( SFX_SLOT_FASTCALL ) ||
-pShell-CanExecuteSlot_Impl( *pSlot ) )
-nRet = EXECUTE_POSSIBLE;
-
-if ( nMode == EXECUTEMODE_ASYNCHRON )
-eCall = SFX_CALLMODE_ASYNCHRON

[Libreoffice-commits] .: tools/inc tools/source

2011-12-22 Thread August Sodora
 tools/inc/tools/pstm.hxx  |5 +++
 tools/inc/tools/stream.hxx|1 
 tools/inc/tools/svborder.hxx  |1 
 tools/source/generic/svborder.cxx |   18 +++
 tools/source/ref/pstm.cxx |   58 ++
 tools/source/stream/strmunx.cxx   |   11 +++
 6 files changed, 94 insertions(+)

New commits:
commit a0ebf6ee3f555397205713db966aee44de80c0f9
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 22 20:29:18 2011 -0500

Revert callcatcher: Remove unused code

This reverts commit bbad7057b2bdb614a5e97a945039323efe39c4ee.

diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx
index 125875c..68b4932 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -127,6 +127,7 @@ class TOOLS_DLLPUBLIC SvPersistBaseMemberList : public 
SuperSvPersistBaseMemberL
 {
 public:
 SvPersistBaseMemberList();
+SvPersistBaseMemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );
 
 void   WriteObjects( SvPersistStream , sal_Bool bOnlyStreamedObj = 
sal_False ) const;
 TOOLS_DLLPUBLIC friend SvPersistStream operator  (SvPersistStream , 
const SvPersistBaseMemberList );
@@ -216,6 +217,8 @@ public:
 
 SvPersistStream( SvClassManager , SvStream * pStream,
  sal_uInt32 nStartIdx = 1 );
+SvPersistStream( SvClassManager , SvStream * pStream,
+ const SvPersistStream  rPersStm );
 ~SvPersistStream();
 
 voidSetStream( SvStream * pStream );
@@ -244,6 +247,8 @@ public:
 // gespeichert werden.
 friend SvStream operator  ( SvStream , SvPersistStream  );
 friend SvStream operator  ( SvStream , SvPersistStream  );
+sal_uIntPtr InsertObj( SvPersistBase * );
+sal_uIntPtr RemoveObj( SvPersistBase * );
 };
 
 #endif // _PSTM_HXX
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index decae49..2270eff 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -651,6 +651,7 @@ public:
 sal_BoolLockRange( sal_Size nByteOffset, sal_Size nBytes );
 sal_BoolUnlockRange( sal_Size nByteOffset, sal_Size nBytes );
 sal_BoolLockFile();
+sal_BoolUnlockFile();
 
 voidOpen( const String rFileName, StreamMode eOpenMode );
 voidClose();
diff --git a/tools/inc/tools/svborder.hxx b/tools/inc/tools/svborder.hxx
index 27ccdd0..86c5feb 100644
--- a/tools/inc/tools/svborder.hxx
+++ b/tools/inc/tools/svborder.hxx
@@ -40,6 +40,7 @@ public:
 { nTop = nRight = nBottom = nLeft = 0; }
 SvBorder( const Size  rSz )
 { nTop = nBottom = rSz.Height(); nRight = nLeft = rSz.Width(); }
+SvBorder( const Rectangle  rOuter, const Rectangle  rInner );
 SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
 { nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; }
 sal_Booloperator == ( const SvBorder  rObj ) const
diff --git a/tools/source/generic/svborder.cxx 
b/tools/source/generic/svborder.cxx
index 6b9f0d6..0c55c95 100644
--- a/tools/source/generic/svborder.cxx
+++ b/tools/source/generic/svborder.cxx
@@ -30,6 +30,24 @@
 #include tools/svborder.hxx
 #include osl/diagnose.h
 
+SvBorder::SvBorder( const Rectangle  rOuter, const Rectangle  rInner )
+{
+Rectangle aOuter( rOuter );
+aOuter.Justify();
+Rectangle aInner( rInner );
+if( aInner.IsEmpty() )
+aInner = Rectangle( aOuter.Center(), aOuter.Center() );
+else
+aInner.Justify();
+
+OSL_ENSURE( aOuter.IsInside( aInner ),
+SvBorder::SvBorder: sal_False == aOuter.IsInside( aInner ) );
+nTop= aInner.Top()- aOuter.Top();
+nRight  = aOuter.Right()  - aInner.Right();
+nBottom = aOuter.Bottom() - aInner.Bottom();
+nLeft   = aInner.Left()   - aOuter.Left();
+}
+
 Rectangle  operator += ( Rectangle  rRect, const SvBorder  rBorder )
 {
 // wegen Empty-Rect, GetSize muss als erstes gerufen werden
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 4956a6a..a91b078 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -62,6 +62,9 @@ TYPEINIT0( SvRttiBase );
 /** SvPersistBaseMemberList **/
 
 SvPersistBaseMemberList::SvPersistBaseMemberList(){}
+SvPersistBaseMemberList::SvPersistBaseMemberList(
+sal_uInt16 nInitSz, sal_uInt16 nResize )
+: SuperSvPersistBaseMemberList( nInitSz, nResize ){}
 
 #define PERSIST_LIST_VER(sal_uInt8)0
 #define PERSIST_LIST_DBGUTIL(sal_uInt8)0x80
@@ -197,6 +200,44 @@ SvPersistStream::SvPersistStream
 }
 
 //=
+SvPersistStream::SvPersistStream
+(
+SvClassManager  rMgr,  /* Alle Factorys, deren Objekt geladen und

[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source svx/inc svx/source

2011-12-22 Thread August Sodora
 editeng/inc/editeng/bulitem.hxx  |7 ---
 editeng/inc/editeng/svxacorr.hxx |2 
 editeng/source/items/bulitem.cxx |   84 ---
 editeng/source/misc/svxacorr.cxx |   28 -
 svx/inc/svx/ctredlin.hxx |4 -
 svx/source/dialog/ctredlin.cxx   |   37 -
 6 files changed, 162 deletions(-)

New commits:
commit 6df7cfaa3f5e750e2bbdb3d6afb934c405a7a988
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 22 21:41:09 2011 -0500

callcatcher: Remove unused code

diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx
index 2a7eefb..2a5f3b1 100644
--- a/editeng/inc/editeng/bulitem.hxx
+++ b/editeng/inc/editeng/bulitem.hxx
@@ -94,10 +94,6 @@ public:
 TYPEINFO();
 
 SvxBulletItem( sal_uInt16 nWhich = 0 );
-SvxBulletItem( sal_uInt8 nStyle, const Font rFont, sal_uInt16 nStart = 0, 
sal_uInt16 nWhich = 0 );
-SvxBulletItem( const Font rFont, sal_Unicode cSymbol, sal_uInt16 nWhich=0 
);
-SvxBulletItem( const Bitmap, sal_uInt16 nWhich = 0 );
-SvxBulletItem( const GraphicObject, sal_uInt16 nWhich = 0 );
 SvxBulletItem( SvStream rStrm, sal_uInt16 nWhich = 0 );
 SvxBulletItem( const SvxBulletItem );
 ~SvxBulletItem();
@@ -118,9 +114,6 @@ public:
 FontGetFont() const { return aFont; }
 sal_uInt16  GetScale() const { return nScale; }
 
-Bitmap  GetBitmap() const;
-voidSetBitmap( const Bitmap rBmp );
-
 const GraphicObject GetGraphicObject() const;
 void SetGraphicObject( const GraphicObject rGraphicObject 
);
 
diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx
index dd83531..ed0d528 100644
--- a/editeng/inc/editeng/svxacorr.hxx
+++ b/editeng/inc/editeng/svxacorr.hxx
@@ -291,8 +291,6 @@ public:
 String GetAutoCorrFileName( LanguageType eLang = LANGUAGE_SYSTEM,
 sal_Bool bNewFile = sal_False,
 sal_Bool bTstUserExist = sal_False ) const;
-void SetUserAutoCorrFileName( const String rNew );
-void SetShareAutoCorrFileName( const String rNew );
 
 // Query/Set the current settings of AutoCorrect
 long GetFlags() const   { return nFlags; }
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index caca392..106a5ab 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -123,57 +123,6 @@ SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich ) : 
SfxPoolItem( _nWhich )
 
 // ---
 
-SvxBulletItem::SvxBulletItem( sal_uInt8 nNewStyle, const Font rFont, 
sal_uInt16 /*nStart*/, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich )
-{
-SetDefaults_Impl();
-nStyle = nNewStyle;
-aFont  = rFont;
-nValidMask = 0x;
-}
-
-// ---
-
-SvxBulletItem::SvxBulletItem( const Font rFont, xub_Unicode cSymb, sal_uInt16 
_nWhich ) : SfxPoolItem( _nWhich )
-{
-SetDefaults_Impl();
-aFont   = rFont;
-cSymbol = cSymb;
-nStyle  = BS_BULLET;
-nValidMask = 0x;
-}
-
-// ---
-
-SvxBulletItem::SvxBulletItem( const Bitmap rBmp, sal_uInt16 _nWhich ) : 
SfxPoolItem( _nWhich )
-{
-SetDefaults_Impl();
-
-if( !rBmp.IsEmpty() )
-{
-pGraphicObject = new GraphicObject( rBmp );
-nStyle = BS_BMP;
-}
-
-nValidMask = 0x;
-}
-
-// ---
-
-SvxBulletItem::SvxBulletItem( const GraphicObject rGraphicObject, sal_uInt16 
_nWhich ) : SfxPoolItem( _nWhich )
-{
-SetDefaults_Impl();
-
-if( ( GRAPHIC_NONE != pGraphicObject-GetType() )  ( GRAPHIC_DEFAULT != 
pGraphicObject-GetType() ) )
-{
-pGraphicObject = new GraphicObject( rGraphicObject );
-nStyle = BS_BMP;
-}
-
-nValidMask = 0x;
-}
-
-// ---
-
 SvxBulletItem::SvxBulletItem( SvStream rStrm, sal_uInt16 _nWhich ) :
 SfxPoolItem( _nWhich ),
 pGraphicObject( NULL )
@@ -464,39 +413,6 @@ SfxItemPresentation SvxBulletItem::GetPresentation
 
 //
 
-Bitmap SvxBulletItem::GetBitmap() const
-{
-if( pGraphicObject )
-return pGraphicObject-GetGraphic().GetBitmap();
-else
-{
-const Bitmap aDefaultBitmap;
-return aDefaultBitmap;
-}
-}
-
-//
-
-void SvxBulletItem::SetBitmap( const Bitmap rBmp )
-{
-if( rBmp.IsEmpty() )
-{
-if( pGraphicObject )
-{
-delete pGraphicObject;
-pGraphicObject = NULL;
-}
-}
-else
-{
-delete pGraphicObject

[Libreoffice-commits] .: editeng/inc editeng/source starmath/source svx/source sw/source

2011-12-23 Thread August Sodora
 editeng/inc/editeng/editdata.hxx |4 -
 editeng/inc/editeng/editeng.hxx  |2 
 editeng/inc/editeng/editobj.hxx  |6 +-
 editeng/inc/editeng/unoedsrc.hxx |1 
 editeng/source/editeng/editeng.cxx   |5 -
 editeng/source/editeng/editobj.cxx   |8 +-
 editeng/source/editeng/editobj2.hxx  |2 
 editeng/source/editeng/impedit.hxx   |2 
 editeng/source/editeng/impedit5.cxx  |   11 ++-
 editeng/source/uno/unoedhlp.cxx  |   24 +++-
 editeng/source/uno/unofored.cxx  |   67 +---
 starmath/source/accessibility.cxx|   23 +++-
 svx/source/sdr/properties/textproperties.cxx |   25 +++--
 sw/source/filter/ww8/wrtw8esh.cxx|   75 +--
 sw/source/filter/ww8/wrtww8.hxx  |2 
 15 files changed, 90 insertions(+), 167 deletions(-)

New commits:
commit 4d4a67748e945d901f320d9c3af753abb3211efc
Author: August Sodora aug...@gmail.com
Date:   Fri Dec 23 02:30:41 2011 -0500

SV_DECL_VARARR-std::vector

diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx
index 4e0467f..2ac8a99 100644
--- a/editeng/inc/editeng/editdata.hxx
+++ b/editeng/inc/editeng/editdata.hxx
@@ -33,8 +33,6 @@
 #include tools/string.hxx
 #include editeng/editengdllapi.h
 
-#include svl/svarray.hxx
-
 class SfxItemSet;
 class SfxPoolItem;
 class SvParser;
@@ -305,8 +303,6 @@ struct EECharAttrib
 xub_StrLen  nEnd;
 };
 
-SV_DECL_VARARR_VISIBILITY( EECharAttribArray, EECharAttrib, 0, 4, 
EDITENG_DLLPUBLIC )
-
 struct MoveParagraphsInfo
 {
 sal_uInt16  nStartPara;
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index 88111b3..4c0d5e0 100644
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -236,7 +236,7 @@ public:
 virtual voidSetParaAttribs( sal_uInt16 nPara, const 
SfxItemSet rSet );
 virtual const SfxItemSet   GetParaAttribs( sal_uInt16 nPara ) const;
 
-voidGetCharAttribs( sal_uInt16 nPara, EECharAttribArray 
rLst ) const;
+voidGetCharAttribs( sal_uInt16 nPara, 
std::vectorEECharAttrib rLst ) const;
 
 SfxItemSet  GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, 
sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const;
 SfxItemSet  GetAttribs( const ESelection rSel, sal_Bool 
bOnlyHardAttrib = EditEngineAttribs_All );
diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx
index 9834649..e3c9340 100644
--- a/editeng/inc/editeng/editobj.hxx
+++ b/editeng/inc/editeng/editobj.hxx
@@ -34,14 +34,16 @@
 #include rsc/rscsfx.hxx
 #include svl/itemset.hxx
 #include editeng/eeitem.hxx
+#include editeng/editdata.hxx
 #include editeng/editengdllapi.h
 
+#include vector
+
 DBG_NAMEEX( EE_EditTextObject )
 
 class SfxItemPool;
 class SfxStyleSheetPool;
 class SvxFieldItem;
-class EECharAttribArray;
 
 #define EDTOBJ_SETTINGS_ULITEMSUMMATION 0x0001
 #define EDTOBJ_SETTINGS_ULITEMFIRSTPARA 0x0002
@@ -96,7 +98,7 @@ public:
 virtual sal_BoolHasOnlineSpellErrors() const;
 
 virtual sal_BoolHasCharAttribs( sal_uInt16 nWhich = 0 ) const;
-virtual voidGetCharAttribs( sal_uInt16 nPara, EECharAttribArray 
rLst ) const;
+virtual voidGetCharAttribs( sal_uInt16 nPara, 
std::vectorEECharAttrib rLst ) const;
 
 virtual sal_BoolRemoveCharAttribs( sal_uInt16 nWhich = 0 );
 virtual sal_BoolRemoveParaAttribs( sal_uInt16 nWhich = 0 );
diff --git a/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx
index 3f45bae..7f31d37 100644
--- a/editeng/inc/editeng/unoedsrc.hxx
+++ b/editeng/inc/editeng/unoedsrc.hxx
@@ -55,7 +55,6 @@ class SvxViewForwarder;
 class SvxEditViewForwarder;
 class SvxFieldItem;
 class SfxBroadcaster;
-class EECharAttribArray;
 class SvxUnoTextRangeBase;
 
 typedef std::list SvxUnoTextRangeBase*  SvxUnoTextRangeBaseList;
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 0ce3ff2..2964ad4 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -97,7 +97,6 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::linguistic2;
 
-
 DBG_NAME( EditEngine )
 DBG_NAMEEX( EditView )
 
@@ -105,8 +104,6 @@ DBG_NAMEEX( EditView )
 static sal_Bool bDebugPaint = sal_False;
 #endif
 
-SV_IMPL_VARARR( EECharAttribArray, EECharAttrib );
-
 static SfxItemPool* pGlobalPool=0;
 
 // --
@@ -1498,7 +1495,7 @@ const SfxPoolItem EditEngine::GetParaAttrib( sal_uInt16 
nPara, sal_uInt16 nWhic
 return pImpEditEngine-GetParaAttrib( nPara, nWhich );
 }
 
-void EditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray rLst ) 
const
+void EditEngine::GetCharAttribs

[Libreoffice-commits] .: editeng/source

2011-12-23 Thread August Sodora
 editeng/source/misc/svxacorr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c9f68b6d2356ef81560b5449670b81a1156a5da6
Author: August Sodora aug...@gmail.com
Date:   Fri Dec 23 19:44:48 2011 -0500

Fix the build so that this is recognized as an initializer list

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index c2d937a..df191c0 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1644,7 +1644,7 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType 
eLang, sal_Bool bNewFi
 }
 else if( !bNewFile )
 {
-pLastFileTable[eLang] = { std::make_pair(eLang, nAktTime.GetTime()) };
+pLastFileTable[eLang] = { std::make_pair(eLang, nAktTime.GetTime()), };
 }
 return pLists != 0;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2012-01-05 Thread August Sodora
 basic/source/runtime/methods.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 25e84ee95954a28d9a6a1b346e6673a9a6de71cc
Author: August Sodora aug...@gmail.com
Date:   Thu Jan 5 14:45:10 2012 -0500

fdo#44172: Basic function VAL produces bad result

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index b98c586..34a453a 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -128,7 +128,7 @@ static void FilterWhiteSpace( String rStr )
 if (!rStr.Len())
 return;
 
-rtl::OUStringBuffer aRet(rStr);
+rtl::OUStringBuffer aRet;
 
 for (xub_StrLen i = 0; i  rStr.Len(); ++i)
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 7 commits - avmedia/source basic/source solenv/bin svtools/inc svtools/source vcl/inc vcl/source

2012-01-07 Thread August Sodora
 avmedia/source/gstreamer/gstplayer.cxx |4 -
 basic/source/comp/exprnode.cxx |5 -
 basic/source/comp/exprtree.cxx |   18 -
 basic/source/inc/expr.hxx  |3 
 solenv/bin/mkdocs.sh   |2 
 svtools/inc/svtools/headbar.hxx|9 --
 svtools/source/control/headbar.cxx |   75 --
 vcl/inc/vcl/gdimtf.hxx |7 --
 vcl/inc/vcl/graphictools.hxx   |   89 --
 vcl/source/gdi/gdimtf.cxx  |   96 
 vcl/source/gdi/graphictools.cxx|  110 -
 11 files changed, 4 insertions(+), 414 deletions(-)

New commits:
commit 6c3cfe6059c31c980d123f413a69d536887c336d
Author: August Sodora aug...@gmail.com
Date:   Fri Jan 6 21:27:42 2012 -0500

Generate docs for basic

diff --git a/solenv/bin/mkdocs.sh b/solenv/bin/mkdocs.sh
index 77e7562..1112b0f 100755
--- a/solenv/bin/mkdocs.sh
+++ b/solenv/bin/mkdocs.sh
@@ -23,7 +23,7 @@ DOXYGEN_PROJECT_PREFIX=LibreOffice
 . ./Env.Host.sh
 
 # get list of modules in build order - bah, blows RAM  disk, static list below
-INPUT_PROJECTS=o3tl basegfx basebmp comphelper svl vcl canvas cppcanvas oox 
svtools goodies drawinglayer xmloff slideshow sfx2 editeng svx writerfilter cui 
chart2 dbaccess sd starmath sc sw
+INPUT_PROJECTS=o3tl basegfx basebmp basic comphelper svl vcl canvas cppcanvas 
oox svtools goodies drawinglayer xmloff slideshow sfx2 editeng svx writerfilter 
cui chart2 dbaccess sd starmath sc sw
 
 # output directory for generated documentation
 BASE_OUTPUT=$1
commit a3b6842cc91fee88b9a6fd48008d1c7e53d67108
Author: August Sodora aug...@gmail.com
Date:   Fri Jan 6 14:28:27 2012 -0500

cppcheck: cstyleCast

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 14cdbb5..0e73177 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -112,7 +112,7 @@ Player::~Player()
 
 static gboolean gst_pipeline_bus_callback( GstBus *, GstMessage *message, 
gpointer data )
 {
-Player* pPlayer = (Player *) data;
+Player* pPlayer = static_castPlayer*(data);
 
 pPlayer-processMessage( message );
 
@@ -121,7 +121,7 @@ static gboolean gst_pipeline_bus_callback( GstBus *, 
GstMessage *message, gpoint
 
 static GstBusSyncReply gst_pipeline_bus_sync_handler( GstBus *, GstMessage * 
message, gpointer data )
 {
-Player* pPlayer = (Player *) data;
+Player* pPlayer = static_castPlayer*(data);
 
 return pPlayer-processSyncMessage( message );
 }
commit 743e627bcfc9c87d806109fe6f3f4e2817b73dda
Author: August Sodora aug...@gmail.com
Date:   Fri Jan 6 14:26:01 2012 -0500

Remove unused code

diff --git a/vcl/inc/vcl/graphictools.hxx b/vcl/inc/vcl/graphictools.hxx
index 5161620..c027f6a 100644
--- a/vcl/inc/vcl/graphictools.hxx
+++ b/vcl/inc/vcl/graphictools.hxx
@@ -153,50 +153,6 @@ public:
 // mutators
 /// Set path to stroke
 voidsetPath ( const Polygon );
-/** Set the polygon that is put at the start of the line
-
-The polygon has to be in a special normalized position, and
-already scaled to the desired size: the center of the stroked
-path will meet the given polygon at (0,0) from negative y
-values. Thus, an arrow would have its baseline on the x axis,
-going upwards to positive y values. Furthermore, the polygon
-also has to be scaled appropriately: the width of the joining
-stroke is defined to be SvtGraphicStroke::normalizedArrowWidth
-(0x1), i.e. ranging from x=-0x8000 to x=0x8000. If your
-arrow does have this width, it will fit every stroke with
-every stroke width exactly.
- */
-voidsetStartArrow   ( const PolyPolygon );
-/** Set the polygon that is put at the end of the line
-
-The polygon has to be in a special normalized position, and
-already scaled to the desired size: the center of the stroked
-path will meet the given polygon at (0,0) from negative y
-values. Thus, an arrow would have its baseline on the x axis,
-going upwards to positive y values. Furthermore, the polygon
-also has to be scaled appropriately: the width of the joining
-stroke is defined to be SvtGraphicStroke::normalizedArrowWidth
-(0x1), i.e. ranging from x=-0x8000 to x=0x8000. If your
-arrow does have this width, it will fit every stroke with
-every stroke width exactly.
- */
-voidsetEndArrow ( const PolyPolygon );
-/** Set stroke transparency
-
-@param fTrans
-The transparency, ranging from 0.0 (opaque) to 1.0 (fully translucent)
- */
-voidsetTransparency ( double fTrans );
-/// Set width of the stroke
-voidsetStrokeWidth  ( double );
-/// Set the style in which open stroke ends are drawn
-void

[Libreoffice-commits] .: 3 commits - basic/inc basic/source

2012-01-07 Thread August Sodora
 basic/inc/basrid.hxx  |6 ---
 basic/source/comp/scanner.cxx |   79 --
 basic/source/inc/scanner.hxx  |1 
 3 files changed, 47 insertions(+), 39 deletions(-)

New commits:
commit d3a52bd7b3fe11fc6cf5f3296dd00eba524e40a0
Author: August Sodora aug...@gmail.com
Date:   Sat Jan 7 18:32:47 2012 -0500

scanner cleanup for consistency

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 7eb6fb0..25a493a 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -162,18 +162,18 @@ void SbiScanner::scanAlphanumeric()
 
 void SbiScanner::scanGoto()
 {
-sal_Int32 nTestCol = nCol;
-while(nTestCol  aLine.getLength()  
theBasicCharClass::get().isWhitespace(aLine[nTestCol]))
-nTestCol++;
+sal_Int32 n = nCol;
+while(n  aLine.getLength()  
theBasicCharClass::get().isWhitespace(aLine[n]))
+++n;
 
-if(nTestCol + 1  aLine.getLength())
+if(n + 1  aLine.getLength())
 {
-::rtl::OUString aTestSym = aLine.copy(nTestCol, 2);
-
if(aTestSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(to)))
+::rtl::OUString aTemp = aLine.copy(n, 2);
+if(aTemp.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(to)))
 {
 aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(goto));
-pLine += nTestCol + 2 - nCol;
-nCol = nTestCol + 2;
+pLine += n + 2 - nCol;
+nCol = n + 2;
 }
 }
 }
commit 1e04280bce397f6c4c6715ab882fa9fd8f372c09
Author: August Sodora aug...@gmail.com
Date:   Sat Jan 7 18:23:45 2012 -0500

Refactor readLine in scanner

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 1c49f98..7eb6fb0 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -178,6 +178,40 @@ void SbiScanner::scanGoto()
 }
 }
 
+bool SbiScanner::readLine()
+{
+if(nBufPos = aBuf.getLength())
+return false;
+
+sal_Int32 n = nBufPos;
+sal_Int32 nLen = aBuf.getLength();
+
+while(n  nLen  aBuf[n] != '\r'  aBuf[n] != '\n')
+++n;
+
+// Trim trailing whitespace
+sal_Int32 nEnd = n;
+while(nBufPos  nEnd  theBasicCharClass::get().isWhitespace(aBuf[nEnd - 
1]))
+--nEnd;
+
+aLine = aBuf.copy(nBufPos, nEnd - nBufPos);
+
+// Fast-forward past the line ending
+if(n + 1  nLen  aBuf[n] == '\r'  aBuf[n + 1] == '\n')
+n += 2;
+else if(n  nLen)
+n++;
+
+nBufPos = n;
+pLine = aLine.getStr();
+
+++nLine;
+nCol = nCol1 = nCol2 = 0;
+nColLock = 0;
+
+return true;
+}
+
 bool SbiScanner::NextSym()
 {
 // memorize for the EOLN-case
@@ -195,33 +229,12 @@ bool SbiScanner::NextSym()
 // read in line?
 if( !pLine )
 {
-sal_Int32 n = nBufPos;
-sal_Int32 nLen = aBuf.getLength();
-if( nBufPos = nLen )
+if(!readLine())
 return false;
-const sal_Unicode* p2 = aBuf.getStr();
-p2 += n;
-while( ( n  nLen )  ( *p2 != '\n' )  ( *p2 != '\r' ) )
-p2++, n++;
-// #163944# ignore trailing whitespace
-sal_Int32 nCopyEndPos = n;
-while( (nBufPos  nCopyEndPos)  
theBasicCharClass::get().isWhitespace( aBuf[ nCopyEndPos - 1 ] ) )
---nCopyEndPos;
-aLine = aBuf.copy( nBufPos, nCopyEndPos - nBufPos );
-if( n  nLen )
-{
-if( *p2 == '\r'  *( p2+1 ) == '\n' )
-n += 2;
-else
-n++;
-}
-nBufPos = n;
-pLine = aLine.getStr();
-nOldLine = ++nLine;
-nCol = nCol1 = nCol2 = nOldCol1 = nOldCol2 = 0;
-nColLock = 0;
-}
 
+nOldLine = nLine;
+nOldCol1 = nOldCol2 = 0;
+}
 
 while( theBasicCharClass::get().isWhitespace( *pLine ) )
 pLine++, nCol++, bSpaces = true;
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 96b0658..69c3d87 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -48,6 +48,7 @@ class SbiScanner
 
 void scanAlphanumeric();
 void scanGoto();
+bool readLine();
 protected:
 ::rtl::OUString aSym;
 String aError;
commit db1faf486837c44a69406a53ea67f66a6fe56d34
Author: August Sodora aug...@gmail.com
Date:   Sat Jan 7 17:50:21 2012 -0500

Remove unused class SttResId

diff --git a/basic/inc/basrid.hxx b/basic/inc/basrid.hxx
index f79778c..ecb55fc 100644
--- a/basic/inc/basrid.hxx
+++ b/basic/inc/basrid.hxx
@@ -31,12 +31,6 @@
 
 #include tools/resid.hxx
 
-class SttResId : public ResId
-{
-public:
-SttResId( sal_uInt32 nId );
-};
-
 class BasResId : public ResId
 {
 public:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basegfx/inc basegfx/source basic/source filter/source unusedcode.easy

2012-01-08 Thread August Sodora
 basegfx/inc/basegfx/curve/b2dcubicbezier.hxx |1 
 basegfx/inc/basegfx/matrix/b2dhommatrix.hxx  |   13 -
 basegfx/inc/basegfx/range/b2dpolyrange.hxx   |   40 -
 basegfx/inc/basegfx/tools/b2dclipstate.hxx   |   17 --
 basegfx/source/curve/b2dcubicbezier.cxx  |8 -
 basegfx/source/matrix/b2dhommatrix.cxx   |   34 
 basegfx/source/range/b2dpolyrange.cxx|  216 ---
 basegfx/source/tools/b2dclipstate.cxx|  146 --
 basic/source/comp/scanner.cxx|8 -
 filter/source/svg/b2dellipse.cxx |   88 ---
 filter/source/svg/b2dellipse.hxx |   19 --
 unusedcode.easy  |   42 -
 12 files changed, 6 insertions(+), 626 deletions(-)

New commits:
commit bc2a59e09d1a554b2d55412d1f10a3fa1fe86086
Author: August Sodora aug...@gmail.com
Date:   Sat Jan 7 20:41:09 2012 -0500

callcatcher: Remove unused code

diff --git a/basegfx/inc/basegfx/curve/b2dcubicbezier.hxx 
b/basegfx/inc/basegfx/curve/b2dcubicbezier.hxx
index cd7e7d9..5931ce0 100644
--- a/basegfx/inc/basegfx/curve/b2dcubicbezier.hxx
+++ b/basegfx/inc/basegfx/curve/b2dcubicbezier.hxx
@@ -55,7 +55,6 @@ namespace basegfx
 public:
 B2DCubicBezier();
 B2DCubicBezier(const B2DCubicBezier rBezier);
-B2DCubicBezier(const B2DPoint rStart, const B2DPoint rEnd);
 B2DCubicBezier(const B2DPoint rStart, const B2DPoint rControlPointA, 
const B2DPoint rControlPointB, const B2DPoint rEnd);
 ~B2DCubicBezier();
 
diff --git a/basegfx/inc/basegfx/matrix/b2dhommatrix.hxx 
b/basegfx/inc/basegfx/matrix/b2dhommatrix.hxx
index 7159635..e296a3d 100644
--- a/basegfx/inc/basegfx/matrix/b2dhommatrix.hxx
+++ b/basegfx/inc/basegfx/matrix/b2dhommatrix.hxx
@@ -56,9 +56,6 @@ namespace basegfx
  */
 B2DHomMatrix(double f_0x0, double f_0x1, double f_0x2, double f_1x0, 
double f_1x1, double f_1x2);
 
-/// unshare this matrix with all internally shared instances
-void makeUnique();
-
 double get(sal_uInt16 nRow, sal_uInt16 nColumn) const;
 void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue);
 
@@ -78,15 +75,6 @@ namespace basegfx
 bool isInvertible() const;
 bool invert();
 
-bool isNormalized() const;
-void normalize();
-
-double determinant() const;
-
-double trace() const;
-
-void transpose();
-
 void rotate(double fRadiant);
 
 void translate(double fX, double fY);
@@ -97,7 +85,6 @@ namespace basegfx
 void shearX(double fSx);
 void shearY(double fSy);
 
-
 B2DHomMatrix operator+=(const B2DHomMatrix rMat);
 B2DHomMatrix operator-=(const B2DHomMatrix rMat);
 
diff --git a/basegfx/inc/basegfx/range/b2dpolyrange.hxx 
b/basegfx/inc/basegfx/range/b2dpolyrange.hxx
index 03fc790..6cb95a4 100644
--- a/basegfx/inc/basegfx/range/b2dpolyrange.hxx
+++ b/basegfx/inc/basegfx/range/b2dpolyrange.hxx
@@ -67,14 +67,9 @@ namespace basegfx
 
 /** Create a multi range with exactly one containing range
  */
-explicit B2DPolyRange( const ElementType rElement );
-B2DPolyRange( const B2DRange rRange, B2VectorOrientation eOrient );
 B2DPolyRange( const B2DPolyRange );
 B2DPolyRange operator=( const B2DPolyRange );
 
-/// unshare this poly-range with all internally shared instances
-void makeUnique();
-
 bool operator==(const B2DPolyRange) const;
 bool operator!=(const B2DPolyRange) const;
 
@@ -82,44 +77,15 @@ namespace basegfx
 sal_uInt32 count() const;
 
 ElementType getElement(sal_uInt32 nIndex) const;
-voidsetElement(sal_uInt32 nIndex, const ElementType rElement 
);
-voidsetElement(sal_uInt32 nIndex, const B2DRange rRange, 
B2VectorOrientation eOrient );
 
 // insert/append a single range
-void insertElement(sal_uInt32 nIndex, const ElementType rElement, 
sal_uInt32 nCount = 1);
-void insertElement(sal_uInt32 nIndex, const B2DRange rRange, 
B2VectorOrientation eOrient, sal_uInt32 nCount = 1);
-void appendElement(const ElementType rElement, sal_uInt32 nCount = 1);
 void appendElement(const B2DRange rRange, B2VectorOrientation 
eOrient, sal_uInt32 nCount = 1);
 
 // insert/append multiple ranges
-void insertPolyRange(sal_uInt32 nIndex, const B2DPolyRange);
 void appendPolyRange(const B2DPolyRange);
 
-void remove(sal_uInt32 nIndex, sal_uInt32 nCount = 1);
 void clear();
 
-// flip range orientations - converts holes to solids, and vice versa
-void flip();
-
-/** Get overall range
-
-@return
-The union range of all contained ranges
-*/
-B2DRange getBounds() const;
-
-/** Test whether given tuple is inside one or more of the
-included ranges. Does *not* use overall range, but checks

[Libreoffice-commits] .: 4 commits - basic/source sc/source unusedcode.easy

2012-01-08 Thread August Sodora
 basic/source/comp/scanner.cxx   |   93 +---
 sc/source/core/data/compressedarray.cxx |4 -
 unusedcode.easy |3 -
 3 files changed, 53 insertions(+), 47 deletions(-)

New commits:
commit 28f16e4c2580e07ce05244d2b0672e5ef9e57ace
Author: August Sodora aug...@gmail.com
Date:   Mon Jan 9 00:33:45 2012 -0500

Only set bSpaces once here

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 0c359c5..23599d4 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -234,8 +234,12 @@ bool SbiScanner::NextSym()
 nOldCol1 = nOldCol2 = 0;
 }
 
-while(nCol  aLine.getLength()  
theBasicCharClass::get().isWhitespace(aLine[nCol]))
-++pLine, ++nCol, bSpaces = true;
+if(nCol  aLine.getLength()  
theBasicCharClass::get().isWhitespace(aLine[nCol]))
+{
+bSpaces = true;
+while(nCol  aLine.getLength()  
theBasicCharClass::get().isWhitespace(aLine[nCol]))
+++pLine, ++nCol;
+}
 
 nCol1 = nCol;
 
@@ -257,20 +261,24 @@ bool SbiScanner::NextSym()
 if(nCol  aLine.getLength()  
(theBasicCharClass::get().isAlpha(aLine[nCol], bCompatible) || aLine[nCol] == 
'_'))
 {
 // if there's nothing behind '_' , it's the end of a line!
-if( *pLine == '_'  !*(pLine+1) )
-{   ++pLine;
-goto eoln;  }
+if(nCol + 1 == aLine.getLength()  aLine[nCol] == '_')
+{
+// Note that nCol is not incremented here...
+++pLine;
+goto eoln;
+}
+
 bSymbol = true;
 
 scanAlphanumeric();
 
 // Special handling for go to
-if( bCompatible  *pLine  aSym.equalsIgnoreAsciiCaseAsciiL( 
RTL_CONSTASCII_STRINGPARAM(go) ) )
+if(nCol  aLine.getLength()  bCompatible  
aSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(go)))
 scanGoto();
 
 // replace closing '_' by space when end of line is following
 // (wrong line continuation otherwise)
-if( !*pLine  *(pLine-1) == '_' )
+if(nCol == aLine.getLength()  aLine[nCol - 1] == '_' )
 {
 // We are going to modify a potentially shared string, so force
 // a copy, so that aSym is not modified by the following operation
@@ -280,17 +288,22 @@ bool SbiScanner::NextSym()
 // HACK: modifying a potentially shared string here!
 *((sal_Unicode*)(pLine-1)) = ' ';
 }
+
 // type recognition?
 // don't test the exclamation mark
 // if there's a symbol behind it
-else if( *pLine != '!' || !theBasicCharClass::get().isAlpha( pLine[ 1 
], bCompatible ) )
+else if((nCol = aLine.getLength() || aLine[nCol] != '!') ||
+(nCol + 1 = aLine.getLength() || 
!theBasicCharClass::get().isAlpha(aLine[nCol + 1], bCompatible)))
 {
-SbxDataType t = GetSuffixType( *pLine );
-if( t != SbxVARIANT )
+if(nCol  aLine.getLength())
 {
-eScanType = t;
-++pLine;
-++nCol;
+SbxDataType t = GetSuffixType( *pLine );
+if( t != SbxVARIANT )
+{
+eScanType = t;
+++pLine;
+++nCol;
+}
 }
 }
 }
commit ed5b6ace8974e37f51f915d731d3b71dffdc8b49
Author: August Sodora aug...@gmail.com
Date:   Mon Jan 9 00:27:16 2012 -0500

Remove use of pLine in scanner

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index ff6b018..0c359c5 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -219,12 +219,10 @@ bool SbiScanner::NextSym()
 sal_Int32 nOldCol1 = nCol1;
 sal_Int32 nOldCol2 = nCol2;
 sal_Unicode buf[ BUF_SIZE ], *p = buf;
-bHash = false;
 
 eScanType = SbxVARIANT;
 aSym = ::rtl::OUString();
-bSymbol =
-bNumber = bSpaces = false;
+bHash = bSymbol = bNumber = bSpaces = false;
 
 // read in line?
 if( !pLine )
@@ -236,7 +234,7 @@ bool SbiScanner::NextSym()
 nOldCol1 = nOldCol2 = 0;
 }
 
-while( theBasicCharClass::get().isWhitespace( *pLine ) )
+while(nCol  aLine.getLength()  
theBasicCharClass::get().isWhitespace(aLine[nCol]))
 ++pLine, ++nCol, bSpaces = true;
 
 nCol1 = nCol;
@@ -256,7 +254,7 @@ bool SbiScanner::NextSym()
 }
 
 // copy character if symbol
-if( theBasicCharClass::get().isAlpha( *pLine, bCompatible ) || *pLine == 
'_' )
+if(nCol  aLine.getLength()  
(theBasicCharClass::get().isAlpha(aLine[nCol], bCompatible) || aLine[nCol] == 
'_'))
 {
 // if there's nothing behind '_' , it's the end of a line!
 if( *pLine == '_'  !*(pLine+1) )
commit c3259776aa138ef6afb9fa589edf47554e6524dd
Author: August Sodora aug...@gmail.com
Date:   Mon Jan 9 00:24:54 2012 -0500

Prefer prefix

[Libreoffice-commits] .: 2 commits - cui/source

2012-01-10 Thread August Sodora
 cui/source/inc/macroass.hxx  |1 
 cui/source/inc/macropg.hxx   |1 
 cui/source/tabpages/autocdlg.cxx |   70 +++
 3 files changed, 28 insertions(+), 44 deletions(-)

New commits:
commit 1681ee65f67cf1c382a34f7ea35fe118dc8603aa
Author: August Sodora aug...@gmail.com
Date:   Tue Jan 10 23:55:12 2012 -0500

SvStringsDtor-std::vector

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index a532f16..48eb935 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1468,19 +1468,16 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, 
pEdt)
 
 struct StringsArrays
 {
+std::vectorrtl::OUString aAbbrevStrings;
+std::vectorrtl::OUString aDoubleCapsStrings;
 
-SvStringsDtor aAbbrevStrings;
-SvStringsDtor aDoubleCapsStrings;
-
-StringsArrays() :
-aAbbrevStrings(5,5), aDoubleCapsStrings(5,5) {}
+StringsArrays() { }
 };
-typedef StringsArrays* StringsArraysPtr;
 
-sal_Bool lcl_FindInArray(SvStringsDtor rStrings, const String rString)
+sal_Bool lcl_FindInArray(std::vectorrtl::OUString rStrings, const String 
rString)
 {
-for(sal_uInt16 i = 0; i  rStrings.Count(); i++)
-if(rString == *rStrings.GetObject(i))
+for(std::vectorrtl::OUString::iterator i = rStrings.begin(); i != 
rStrings.end(); ++i)
+if((*i).equals(rString))
 return sal_True;
 return sal_False;
 }
@@ -1590,12 +1587,12 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( 
SfxItemSet  )
 if( !lcl_FindInArray(pArrays-aDoubleCapsStrings, 
*pString))
   pWrdList-DeleteAndDestroy( i );
 }
-nCount = pArrays-aDoubleCapsStrings.Count();
-for( i = 0; i  nCount; ++i )
+
+for(std::vectorrtl::OUString::iterator it = 
pArrays-aDoubleCapsStrings.begin(); it != pArrays-aDoubleCapsStrings.end(); 
++i)
 {
-String* pEntry = new String( 
*pArrays-aDoubleCapsStrings.GetObject( i ) );
-if( !pWrdList-Insert( pEntry ))
-delete pEntry;
+String* s = new String(*it);
+if(!pWrdList-Insert(s))
+delete s;
 }
 pAutoCorrect-SaveWrdSttExceptList(eCurLang);
 }
@@ -1612,13 +1609,14 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( 
SfxItemSet  )
 if( !lcl_FindInArray(pArrays-aAbbrevStrings, *pString))
 pCplList-DeleteAndDestroy( i );
 }
-nCount = pArrays-aAbbrevStrings.Count();
-for( i = 0; i  nCount; ++i )
+
+for(std::vectorrtl::OUString::iterator it = 
pArrays-aAbbrevStrings.begin(); it != pArrays-aAbbrevStrings.end(); ++it)
 {
-String* pEntry = new String( 
*pArrays-aAbbrevStrings.GetObject(i) );
-if( !pCplList-Insert( pEntry ))
-delete pEntry;
+String* s = new String(*it);
+if(!pCplList-Insert(s))
+delete s;
 }
+
 pAutoCorrect-SaveCplSttExceptList(eCurLang);
 }
 }
@@ -1702,14 +1700,12 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool 
bFromReset,
 lcl_ClearTable(aStringsTable);
 else
 {
-StringsArraysPtr pArrays = 0;
+StringsArrays* pArrays = NULL;
 if(aStringsTable.IsKeyValid(eOldLanguage))
 {
 pArrays = aStringsTable.Seek(sal_uLong(eOldLanguage));
-pArrays-aAbbrevStrings.DeleteAndDestroy(
-0, pArrays-aAbbrevStrings.Count());
-pArrays-aDoubleCapsStrings.DeleteAndDestroy(
-0, pArrays-aDoubleCapsStrings.Count());
+pArrays-aAbbrevStrings.clear();
+pArrays-aDoubleCapsStrings.clear();
 }
 else
 {
@@ -1719,16 +1715,10 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool 
bFromReset,
 
 sal_uInt16 i;
 for(i = 0; i  aAbbrevLB.GetEntryCount(); i++)
-{
-pArrays-aAbbrevStrings.Insert(
-new String(aAbbrevLB.GetEntry(i)), i);
+
pArrays-aAbbrevStrings.push_back(rtl::OUString(aAbbrevLB.GetEntry(i)));
 
-}
 for(i = 0; i  aDoubleCapsLB.GetEntryCount(); i++)
-{
-pArrays-aDoubleCapsStrings.Insert(
-new String(aDoubleCapsLB.GetEntry(i)), i);
-}
+
pArrays-aDoubleCapsStrings.push_back(rtl::OUString(aDoubleCapsLB.GetEntry(i)));
 }
 aDoubleCapsLB.Clear();
 aAbbrevLB.Clear();
@@ -1738,16 +1728,12 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool 
bFromReset,
 
 if(aStringsTable.IsKeyValid(eLang))
 {
-StringsArraysPtr pArrays = aStringsTable.Seek(sal_uLong(eLang

[Libreoffice-commits] .: writerfilter/source

2012-01-10 Thread August Sodora
 writerfilter/source/rtftok/rtftokenizer.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5a180fd905e3e8f7b7d16fa094d47c64577130cb
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 00:15:51 2012 -0500

Fix MacOSX build

diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx 
b/writerfilter/source/rtftok/rtftokenizer.cxx
index 6d4b5c2..d6dc3ca 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -65,8 +65,8 @@ int RTFTokenizer::resolveParse()
 int ret;
 // for hex chars
 int b = 0, count = 2;
-sal_uInt32 nPercentSize;
-sal_uInt32 nLastPos;
+sal_uInt32 nPercentSize = 0;
+sal_uInt32 nLastPos = 0;
 
 if (m_xStatusIndicator.is())
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - cui/source svl/inc svl/source svx/inc svx/source

2012-01-11 Thread August Sodora
 cui/source/inc/autocdlg.hxx  |4 ---
 cui/source/tabpages/autocdlg.cxx |   25 ++-
 cui/source/tabpages/numfmt.cxx   |   11 +++-
 svl/inc/svl/svstdarr.hxx |5 ---
 svl/source/memtools/svarray.cxx  |   48 -
 svx/inc/svx/numfmtsh.hxx |4 +--
 svx/source/items/numfmtsh.cxx|   50 ---
 7 files changed, 37 insertions(+), 110 deletions(-)

New commits:
commit 9556b3847edb9223db7c65614b49e10d4566b712
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 18:01:02 2012 -0500

Remove SvStringISort

diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index 1d1b6e8..1533e47 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -50,11 +50,6 @@ SV_DECL_PTRARR_DEL_VISIBILITY( SvStringsDtor, StringPtr, 1, 
1, SVL_DLLPUBLIC )
 #define _SVSTDARR_STRINGSDTOR_DECL
 #endif
 
-#ifndef _SVSTDARR_STRINGSISORT_DECL
-SV_DECL_PTRARR_SORT_VISIBILITY( SvStringsISort, StringPtr, 1, 1, SVL_DLLPUBLIC 
)
-#define _SVSTDARR_STRINGSISORT_DECL
-#endif
-
 #ifndef _SVSTDARR_STRINGSISORTDTOR_DECL
 SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvStringsISortDtor, StringPtr, 1, 1, 
SVL_DLLPUBLIC )
 #define _SVSTDARR_STRINGSISORTDTOR_DECL
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index 52f3f0c..a8bbb68 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -28,7 +28,6 @@
 
 #define _SVSTDARR_STRINGSDTOR
 #define _SVSTDARR_STRINGSSORTDTOR
-#define _SVSTDARR_STRINGSISORT
 
 #include svl/svstdarr.hxx
 #include tools/debug.hxx
@@ -46,53 +45,6 @@ SV_IMPL_PTRARR( SvStringsDtor, StringPtr )
 //  strings -
 
 // Array with different Seek method
-_SV_IMPL_SORTAR_ALG( SvStringsISort, StringPtr )
-void SvStringsISort::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
-{
-if( nL )
-{
-DBG_ASSERT( nP  nA  nP + nL = nA, ERR_VAR_DEL );
-for( sal_uInt16 n=nP; n  nP + nL; n++ )
-delete *((StringPtr*)pData+n);
-SvPtrarr::Remove( nP, nL );
-}
-}
-sal_Bool SvStringsISort::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) const
-{
-register sal_uInt16 nO  = SvStringsISort_SAR::Count(),
-nM,
-nU = 0;
-if( nO  0 )
-{
-nO--;
-while( nU = nO )
-{
-nM = nU + ( nO - nU ) / 2;
-StringCompare eCmp = (*((StringPtr*)pData + nM))-
-CompareIgnoreCaseToAscii( *(aE) );
-if( COMPARE_EQUAL == eCmp )
-{
-if( pP ) *pP = nM;
-return sal_True;
-}
-else if( COMPARE_LESS == eCmp )
-nU = nM + 1;
-else if( nM == 0 )
-{
-if( pP ) *pP = nU;
-return sal_False;
-}
-else
-nO = nM - 1;
-}
-}
-if( pP ) *pP = nU;
-return sal_False;
-}
-
-//  strings -
-
-// Array with different Seek method
 _SV_IMPL_SORTAR_ALG( SvStringsISortDtor, StringPtr )
 void SvStringsISortDtor::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
 {
commit 4497c499d2b57095a2dbeb592dce3b5067f417c9
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 14:02:02 2012 -0500

SvStringsISort-std::set

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index a22d7b3..3043739 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -67,8 +67,6 @@ public:
 #include svtools/svtabbx.hxx
 #include svx/simptabl.hxx
 
-class SvStringsISortDtor;
-
 // class OfaACorrCheckListBox --
 
 class OfaACorrCheckListBox : public SvxSimpleTable
@@ -240,7 +238,7 @@ private:
 String  sModify;
 String  sNew;
 
-SvStringsISortDtor* pFormatText;
+std::setrtl::OUString aFormatText;
 DoubleStringTable   aDoubleStringTable;
 CollatorWrapper*pCompareClass;
 CharClass*  pCharClass;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 48eb935..a0ce04b 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -960,7 +960,6 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* 
pParent,
 aDeleteReplacePB(this,CUI_RES(PB_DELETE_REPLACE )),
 sModify(CUI_RES(STR_MODIFY)),
 sNew(aNewReplacePB.GetText()),
-pFormatText(0),
 eLang(eLastDialogLanguage),
 bHasSelectionText(sal_False),
 bFirstSelect(sal_True),
@@ -995,7 +994,6 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* 
pParent,
 
 OfaAutocorrReplacePage::~OfaAutocorrReplacePage()
 {
-delete pFormatText;
 lcl_ClearTable(aDoubleStringTable);
 delete pCompareClass;
 delete pCharClass;
@@ -1187,12 +1185,7 @@ void

[Libreoffice-commits] .: svtools/source

2012-01-11 Thread August Sodora
 svtools/source/control/inettbc.cxx |  107 ++---
 1 file changed, 30 insertions(+), 77 deletions(-)

New commits:
commit 116d77f97329a064f67da99fd4c25260008c9ba4
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 20:46:25 2012 -0500

SvStringsDtor-std::vector

diff --git a/svtools/source/control/inettbc.cxx 
b/svtools/source/control/inettbc.cxx
index b9b526c..e33809b 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -68,8 +68,6 @@
 #include vector
 #include algorithm
 
-// ---
-
 using namespace ::rtl;
 using namespace ::ucbhelper;
 using namespace ::utl;
@@ -81,34 +79,30 @@ using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::ucb;
 using namespace ::com::sun::star::uno;
 
-// ---
 class SvtURLBox_Impl
 {
 public:
-SvStringsDtor*  pURLs;
-SvStringsDtor*  pCompletions;
+std::vectorrtl::OUString  aURLs;
+std::vectorrtl::OUString  aCompletions;
 const IUrlFilter*   pUrlFilter;
 ::std::vector WildCardm_aFilters;
 
 static sal_Bool TildeParsing( String aText, String aBaseUrl );
 
 inline SvtURLBox_Impl( )
-:pURLs( NULL )
-,pCompletions( NULL )
-,pUrlFilter( NULL )
+:pUrlFilter( NULL )
 {
 FilterMatch::createWildCardFilterList(String(),m_aFilters);
 }
 };
 
-// ---
 class SvtMatchContext_Impl : public ::osl::Thread
 {
 static ::osl::Mutex*pDirMutex;
 
-SvStringsDtor   aPickList;
-SvStringsDtor*  pCompletions;
-SvStringsDtor*  pURLs;
+std::vectorrtl::OUString  aPickList;
+std::vectorrtl::OUString  aCompletions;
+std::vectorrtl::OUString  aURLs;
 svtools::AsynchronLink  aLink;
 String  aBaseURL;
 String  aText;
@@ -124,7 +118,7 @@ class SvtMatchContext_Impl : public ::osl::Thread
 virtual void SAL_CALL   Cancel();
 voidInsert( const String rCompletion, const 
String rURL, sal_Bool bForce = sal_False);
 voidReadFolder( const String rURL, const 
String rMatch, sal_Bool bSmart );
-voidFillPicklist( SvStringsDtor rPickList );
+voidFillPicklist(std::vectorrtl::OUString 
rPickList);
 
 public:
 static ::osl::Mutex*   GetMutex();
@@ -144,7 +138,6 @@ public:
 return pDirMutex;
 }
 
-//-
 SvtMatchContext_Impl::SvtMatchContext_Impl(
 SvtURLBox* pBoxP, const String rText )
 : aLink( STATIC_LINK( this, SvtMatchContext_Impl, Select_Impl ) )
@@ -155,9 +148,6 @@ SvtMatchContext_Impl::SvtMatchContext_Impl(
 , bOnlyDirectories( pBoxP-bOnlyDirectories )
 , bNoSelection( pBoxP-bNoSelection )
 {
-pURLs = new SvStringsDtor;
-pCompletions = new SvStringsDtor;
-
 aLink.CreateMutex();
 
 FillPicklist( aPickList );
@@ -165,16 +155,12 @@ SvtMatchContext_Impl::SvtMatchContext_Impl(
 create();
 }
 
-//-
 SvtMatchContext_Impl::~SvtMatchContext_Impl()
 {
 aLink.ClearPendingCall();
-delete pURLs;
-delete pCompletions;
 }
 
-//-
-void SvtMatchContext_Impl::FillPicklist( SvStringsDtor rPickList )
+void SvtMatchContext_Impl::FillPicklist(std::vectorrtl::OUString rPickList)
 {
 // Einlesung der Historypickliste
 Sequence Sequence PropertyValue   seqPicklist = 
SvtHistoryOptions().GetList( eHISTORY );
@@ -195,22 +181,19 @@ void SvtMatchContext_Impl::FillPicklist( SvStringsDtor 
rPickList )
 {
 seqPropertySet[nProperty].Value = sTitle;
 aURL.SetURL( sTitle );
-const StringPtr pStr = new String( aURL.GetMainURL( 
INetURLObject::DECODE_WITH_CHARSET ) );
-rPickList.Insert( pStr, (sal_uInt16) nItem );
+rPickList.insert(rPickList.begin() + nItem, 
aURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET));
 break;
 }
 }
 }
 }
 
-//-
 void SAL_CALL SvtMatchContext_Impl::Cancel()
 {
 // Cancel button pressed
 terminate();
 }
 
-//-
 void SvtMatchContext_Impl::Stop()
 {
 bStop = sal_True;
@@ -219,7 +202,6 @@ void SvtMatchContext_Impl::Stop()
 terminate();
 }
 
-//-
 void

[Libreoffice-commits] .: editeng/source

2012-01-11 Thread August Sodora
 editeng/source/misc/svxacorr.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 0204bbffbc273782ca3148c7ba6768af4f5a77f9
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 20:49:52 2012 -0500

Remove an unused SvStringsDtor

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index b7df997..169c403 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2155,7 +2155,6 @@ SvxAutocorrWordList* 
SvxAutoCorrectLanguageLists::LoadAutocorrWordList()
 else
 pAutocorr_List = new SvxAutocorrWordList( 16, 16 );
 
-SvStringsDtor aRemoveArr;
 try
 {
 uno::Reference  embed::XStorage  xStg = 
comphelper::OStorageHelper::GetStorageFromURL( sShareAutoCorrFile, 
embed::ElementModes::READ );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 5 commits - sfx2/inc sfx2/source svx/inc svx/source

2012-01-11 Thread August Sodora
 sfx2/inc/sfx2/docfile.hxx|5 ---
 sfx2/inc/sfx2/docinsert.hxx  |   15 -
 sfx2/source/doc/docinsert.cxx|   39 ++--
 svx/inc/svx/numfmtsh.hxx |8 -
 svx/inc/svx/srchdlg.hxx  |4 +-
 svx/source/dialog/srchdlg.cxx|   52 +---
 svx/source/items/clipfmtitem.cxx |   62 +--
 7 files changed, 62 insertions(+), 123 deletions(-)

New commits:
commit 8be35fc8c1f24a05deb6ba850ad42ca17352350e
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 22:18:58 2012 -0500

SvStringsDtor-std::vector

diff --git a/sfx2/inc/sfx2/docinsert.hxx b/sfx2/inc/sfx2/docinsert.hxx
index 292b396..6ec9627 100644
--- a/sfx2/inc/sfx2/docinsert.hxx
+++ b/sfx2/inc/sfx2/docinsert.hxx
@@ -39,20 +39,11 @@
 namespace sfx2 { class FileDialogHelper; }
 class SfxMedium;
 class SfxItemSet;
-class SvStringsDtor;
 
 typedef ::std::vector SfxMedium*  SfxMediumList;
 
-// 
-
 namespace sfx2 {
 
-// 
-
-// 
-// DocumentInserter
-// 
-
 class SFX2_DLLPUBLIC DocumentInserter
 {
 private:
@@ -65,7 +56,7 @@ private:
 
 sfx2::FileDialogHelper* m_pFileDlg;
 SfxItemSet* m_pItemSet;
-SvStringsDtor*  m_pURLList;
+std::vectorrtl::OUString m_pURLList;
 
 DECL_LINK(  DialogClosedHdl, sfx2::FileDialogHelper* );
 
@@ -82,12 +73,8 @@ public:
 inline String   GetFilter() const { return m_sFilter; }
 };
 
-// 
-
 } // namespace sfx2
 
-// 
-
 #endif // _SFX_DOCINSERT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index c103116..d40f65a 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -57,16 +57,8 @@ using namespace ::com::sun::star::uno;
 // implemented in 'sfx2/source/appl/appopen.cxx'
 extern sal_uInt32 CheckPasswd_Impl( SfxObjectShell* pDoc, SfxItemPool rPool, 
SfxMedium* pFile );
 
-// ===
-
 namespace sfx2 {
 
-// ===
-
-// ===
-// DocumentInserter
-// ===
-
 DocumentInserter::DocumentInserter(
 const String rFactory, bool const bEnableMultiSelection) :
 
@@ -77,8 +69,6 @@ DocumentInserter::DocumentInserter(
 , m_nError  ( ERRCODE_NONE )
 , m_pFileDlg( NULL )
 , m_pItemSet( NULL )
-, m_pURLList( NULL )
-
 {
 }
 
@@ -91,7 +81,6 @@ void DocumentInserter::StartExecuteModal( const Link 
_rDialogClosedLink )
 {
 m_aDialogClosedLink = _rDialogClosedLink;
 m_nError = ERRCODE_NONE;
-DELETEZ( m_pURLList );
 if ( !m_pFileDlg )
 {
 m_pFileDlg = new FileDialogHelper(
@@ -104,10 +93,10 @@ void DocumentInserter::StartExecuteModal( const Link 
_rDialogClosedLink )
 SfxMedium* DocumentInserter::CreateMedium()
 {
 SfxMedium* pMedium = NULL;
-if ( !m_nError  m_pItemSet  m_pURLList  m_pURLList-Count()  0 )
+if (!m_nError  m_pItemSet  !m_pURLList.empty())
 {
-DBG_ASSERT( m_pURLList-Count() == 1, 
DocumentInserter::CreateMedium(): invalid URL list count );
-String sURL = *( m_pURLList-GetObject(0) );
+DBG_ASSERT( m_pURLList.size() == 1, DocumentInserter::CreateMedium(): 
invalid URL list count );
+String sURL(m_pURLList[0]);
 pMedium = new SfxMedium(
 sURL, SFX_STREAM_READONLY, sal_False,
 SFX_APP()-GetFilterMatcher().GetFilter4FilterName( m_sFilter 
), m_pItemSet );
@@ -137,15 +126,12 @@ SfxMedium* DocumentInserter::CreateMedium()
 SfxMediumList* DocumentInserter::CreateMediumList()
 {
 SfxMediumList* pMediumList = new SfxMediumList;
-if ( !m_nError  m_pItemSet  m_pURLList  m_pURLList-Count()  0 )
+if (!m_nError  m_pItemSet  !m_pURLList.empty())
 {
-sal_Int32 i = 0;
-sal_Int32 nCount = m_pURLList-Count();
-for ( ; i  nCount; ++i )
+for(std::vectorrtl::OUString::const_iterator i = m_pURLList.begin(); 
i != m_pURLList.end(); ++i)
 {
-String sURL = *( m_pURLList-GetObject( static_cast sal_uInt16 
(i) ) );
 SfxMedium* pMedium = new SfxMedium(
-sURL, SFX_STREAM_READONLY, sal_False,
+*i, SFX_STREAM_READONLY, sal_False

[Libreoffice-commits] .: svx/source

2012-01-11 Thread August Sodora
 svx/source/items/clipfmtitem.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 59cc5f6e39b7e81e4af245473f09c7446f6facfd
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 23:02:11 2012 -0500

Fix build on MacOSX

diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx
index d8f7f64..24f550c 100644
--- a/svx/source/items/clipfmtitem.cxx
+++ b/svx/source/items/clipfmtitem.cxx
@@ -34,7 +34,7 @@
 
 struct SvxClipboardFmtItem_Impl
 {
-boost::ptr_vectorboost::nullableString aFmtNms;
+boost::ptr_vector boost::nullableString  aFmtNms;
 std::vectorsal_uIntPtr aFmtIds;
 static String sEmptyStr;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-01-11 Thread August Sodora
 sfx2/inc/sfx2/filedlghelper.hxx  |   11 +--
 sfx2/inc/sfx2/macropg.hxx|6 ---
 sfx2/inc/sfx2/viewsh.hxx |1 
 sfx2/source/appl/appopen.cxx |   15 -
 sfx2/source/appl/linkmgr2.cxx|3 -
 sfx2/source/dialog/filedlghelper.cxx |   54 +++
 sfx2/source/dialog/filedlgimpl.hxx   |4 +-
 sfx2/source/dialog/templdlg.cxx  |   24 +++
 8 files changed, 40 insertions(+), 78 deletions(-)

New commits:
commit 5c445208a184fb88d8de0855be279e98d54dfad1
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 23:54:28 2012 -0500

SvStringsDtor-std::vector

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 4e60a86..1c51c40 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1320,7 +1320,7 @@ void 
SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
 
 SfxStyleSheetBase *pStyle = pStyleSheetPool-First();
 SvLBoxEntry* pEntry = aFmtLb.First();
-SvStringsDtor aStrings;
+std::vectorrtl::OUString aStrings;
 
 comphelper::string::NaturalStringSorter aSorter(
 ::comphelper::getProcessComponentContext(),
@@ -1329,21 +1329,19 @@ void 
SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
 while( pStyle )
 {
 //Bubblesort
-sal_uInt16 nPos;
-for( nPos = aStrings.Count() ; nPos 
-aSorter.compare(*(aStrings[nPos-1]), pStyle-GetName())  
0 ; nPos--)
+size_t nPos;
+for(nPos = aStrings.size(); nPos  
aSorter.compare(aStrings[nPos-1], pStyle-GetName())  0; --nPos)
 {};
-aStrings.Insert( new String( pStyle-GetName() ), nPos );
+aStrings.insert(aStrings.begin() + nPos, pStyle-GetName());
 pStyle = pStyleSheetPool-Next();
 }
 
-
-sal_uInt16 nCount = aStrings.Count();
-sal_uInt16 nPos = 0;
-while( nPos  nCount  pEntry 
-   *aStrings[ nPos ] == aFmtLb.GetEntryText( pEntry ) )
+size_t nCount = aStrings.size();
+size_t nPos = 0;
+while(nPos  nCount  pEntry 
+  aStrings[nPos] == rtl::OUString(aFmtLb.GetEntryText(pEntry)))
 {
-nPos++;
+++nPos;
 pEntry = aFmtLb.Next( pEntry );
 }
 
@@ -1353,8 +1351,8 @@ void 
SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
 aFmtLb.SetUpdateMode(sal_False);
 aFmtLb.Clear();
 
-for(nPos = 0 ;  nPos  nCount ; ++nPos )
-aFmtLb.InsertEntry( *aStrings.GetObject( nPos ), 0, 
sal_False, nPos);
+for(nPos = 0; nPos  nCount; ++nPos)
+aFmtLb.InsertEntry(aStrings[nPos], 0, sal_False, nPos);
 
 aFmtLb.SetUpdateMode(true);
 }
commit 17964c4f5a3aa25099b62db0e7652905cdf051a1
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 23:48:30 2012 -0500

Remove unused locals

diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index b7c5f2a..b7a4970 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -300,9 +300,6 @@ void LinkManager::UpdateAllLinks(
 sal_Bool bUpdateGrfLinks,
 Window* pParentWin )
 {
-SvStringsDtor aApps, aTopics, aItems;
-String sApp, sTopic, sItem;
-
 // First make a copy of the array in order to update links
 // links in ... no contact between them!
 SvPtrarr aTmpArr( 255, 50 );
commit 5cf36e9739a46ce20c4a3588962a04c6c4d1a72d
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 23:46:52 2012 -0500

Remove unnecessary forward declaration

diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index 07cbdec..869de36 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -65,7 +65,6 @@ class SfxFrameSetDescriptor;
 class Printer;
 class SfxPrinter;
 class SfxProgress;
-class SvStringsDtor;
 class SfxFrameItem;
 class Dialog;
 class Menu;
commit 3ea8ee202832294adc09c0b1fd1c26cb87ca7cbf
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 23:44:05 2012 -0500

SvStringsDtor-std::vector

diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx
index 3b3835b..faf2040 100644
--- a/sfx2/inc/sfx2/filedlghelper.hxx
+++ b/sfx2/inc/sfx2/filedlghelper.hxx
@@ -68,11 +68,8 @@ namespace com
 }
 
 class SfxItemSet;
-class SvStringsDtor;
 class Window;
 
-//-
-
 // the SFXWB constants are for the nFlags parameter of the constructor
 #define SFXWB_INSERT0x0400L // turn Open into Insert dialog
 #define SFXWB_EXPORT0x4000L // turn Save into Export dialog
@@ -85,8 +82,6

[Libreoffice-commits] .: 2 commits - sw/source

2012-01-12 Thread August Sodora
 sw/source/ui/envelp/label1.cxx |   28 +++-
 sw/source/ui/envelp/labfmt.cxx |   10 --
 sw/source/ui/inc/initui.hxx|9 +
 sw/source/ui/inc/label.hxx |6 +++---
 sw/source/ui/utlui/initui.cxx  |   35 ++-
 5 files changed, 37 insertions(+), 51 deletions(-)

New commits:
commit dea42954b5e9a22f0d498cad0cc3c373ec5940e8
Author: August Sodora aug...@gmail.com
Date:   Thu Jan 12 21:28:57 2012 -0500

SvStringsDtor-std::vector

diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index dcf87de..b1bde75 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -108,10 +108,7 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet rSet,
 SfxTabDialog( pParent, SW_RES(DLG_LAB), rSet, sal_False ),
 pNewDBMgr(pDBMgr),
 pPrtPage(0),
-
 aTypeIds( 50, 10 ),
-aMakes  (  5,  0 ),
-
 pRecs   ( new SwLabRecs() ),
 sBusinessCardDlg(SW_RES(ST_BUSINESSCARDDLG)),
 sFormat(SW_RES(ST_FIRSTPAGE_LAB)),
@@ -171,13 +168,13 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet 
rSet,
 const rtl::OUString* pMan = rMan.getConstArray();
 for(sal_Int32 nMan = 0; nMan  rMan.getLength(); nMan++)
 {
-aMakes.Insert( new String(pMan[nMan]), aMakes.Count() );
+aMakes.push_back(pMan[nMan]);
 if ( pMan[nMan] == aItem.aLstMake )
 nLstGroup = (sal_uInt16) nMan;
 }
 
-if ( aMakes.Count() )
-_ReplaceGroup( *aMakes[nLstGroup] );
+if ( !aMakes.empty() )
+_ReplaceGroup( aMakes[nLstGroup] );
 
 if (pExampleSet)
 pExampleSet-Put(aItem);
@@ -284,15 +281,15 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet 
rSet) :
 
 InitDatabaseBox();
 
-sal_uInt16 nLstGroup = 0;
+size_t nLstGroup = 0;
 
-const sal_uInt16 nCount = (sal_uInt16)GetParent()-Makes().Count();
-for (sal_uInt16 i = 0; i  nCount; ++i)
+const sal_uInt16 nCount = (sal_uInt16)GetParent()-Makes().size();
+for(size_t i = 0; i  nCount; ++i)
 {
-String rStr = *GetParent()-Makes()[i];
+rtl::OUString rStr = GetParent()-Makes()[i];
 aMakeBox.InsertEntry( rStr );
 
-if ( rStr == String(aItem.aLstMake) )
+if ( rStr == aItem.aLstMake)
 nLstGroup = i;
 }
 
@@ -578,15 +575,12 @@ void SwLabPage::Reset(const SfxItemSet rSet)
 aAddrBox.Check  ( aItem.bAddr );
 aWritingEdit.SetText( aWriting.ConvertLineEnd() );
 
-const sal_uInt16 nCount = (sal_uInt16)GetParent()-Makes().Count();
-for (sal_uInt16 i = 0; i  nCount; ++i)
+for(std::vectorrtl::OUString::const_iterator i = 
GetParent()-Makes().begin(); i != GetParent()-Makes().end(); ++i)
 {
-String rStr = *GetParent()-Makes()[i];
-if(aMakeBox.GetEntryPos(String(rStr)) == LISTBOX_ENTRY_NOTFOUND)
-aMakeBox.InsertEntry( rStr );
+if(aMakeBox.GetEntryPos(String(*i)) == LISTBOX_ENTRY_NOTFOUND)
+aMakeBox.InsertEntry(*i);
 }
 
-
 aMakeBox.SelectEntry( aItem.aMake );
 //save the current type
 String sType(aItem.aType);
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index aac84d8..2aa1e3b 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -552,15 +552,13 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
 {
 bModified = sal_False;
 const SequenceOUString rMan = 
GetParent()-GetLabelsConfig().GetManufacturers();
-SvStringsDtor rMakes = GetParent()-Makes();
-if(rMakes.Count()  (sal_uInt16)rMan.getLength())
+std::vectorrtl::OUString rMakes(GetParent()-Makes());
+if(rMakes.size()  (sal_uInt16)rMan.getLength())
 {
-rMakes.DeleteAndDestroy(0, rMakes.Count());
+rMakes.clear();
 const OUString* pMan = rMan.getConstArray();
 for(sal_Int32 nMan = 0; nMan  rMan.getLength(); nMan++)
-{
-rMakes.Insert( new String(pMan[nMan]), rMakes.Count() );
-}
+rMakes.push_back(pMan[nMan]);
 }
 aMakeFI.SetText(aItem.aMake);
 aTypeFI.SetText(aItem.aType);
diff --git a/sw/source/ui/inc/label.hxx b/sw/source/ui/inc/label.hxx
index 1824e49..8d8780a 100644
--- a/sw/source/ui/inc/label.hxx
+++ b/sw/source/ui/inc/label.hxx
@@ -48,7 +48,7 @@ class SwLabDlg : public SfxTabDialog
 SwLabPrtPage*   pPrtPage;
 
 std::vectorsal_uInt16 aTypeIds;
-SvStringsDtor   aMakes;
+std::vectorrtl::OUString aMakes;
 
 SwLabRecs*  pRecs;
 String  aLstGroup;
@@ -74,8 +74,8 @@ public:
   std::vectorsal_uInt16 TypeIds()   { return aTypeIds; }
 const std::vectorsal_uInt16 TypeIds() const { return aTypeIds; }
 
-  SvStringsDtor  Makes() { return aMakes;   }
-const SvStringsDtor  Makes()   const { return aMakes;   }
+std::vectorrtl::OUString Makes

[Libreoffice-commits] .: 2 commits - sw/inc sw/source

2012-01-12 Thread August Sodora
 sw/inc/doc.hxx |2 +-
 sw/inc/editsh.hxx  |2 +-
 sw/source/core/doc/doc.cxx |6 +++---
 sw/source/core/edit/editsh.cxx |2 +-
 sw/source/core/unocore/unocoll.cxx |4 ++--
 sw/source/ui/fldui/flddinf.cxx |6 +++---
 sw/source/ui/fldui/flddok.cxx  |   18 +-
 sw/source/ui/fldui/fldfunc.cxx |8 
 sw/source/ui/fldui/fldmgr.cxx  |   19 +--
 sw/source/ui/fldui/fldref.cxx  |6 +++---
 sw/source/ui/fldui/fldvar.cxx  |   24 
 sw/source/ui/inc/fldmgr.hxx|3 ++-
 sw/source/ui/utlui/content.cxx |7 +++
 sw/source/ui/utlui/gloslst.cxx |   12 +---
 14 files changed, 58 insertions(+), 61 deletions(-)

New commits:
commit c1400c98ce137dddb252f9759ca9a89ab3452764
Author: August Sodora aug...@gmail.com
Date:   Thu Jan 12 23:15:09 2012 -0500

SvStringsDtor-std::vector

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 11f8cd8..e85ba27 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1704,7 +1704,7 @@ public:
 
 // Return names of all references that are set in document.
 // If array pointer is 0 return only whether a RefMark is set in document.
-sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
+sal_uInt16 GetRefMarks( std::vectorString* = 0 ) const;
 
 // Insert label. If a FlyFormat is created, return it.
 SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String rTxt, 
const String rSeparator,
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 70af368..11e3376 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -741,7 +741,7 @@ public:
 
 //  Return names of all references set in document.
 //  If ArrayPointer == 0 then return only whether a RefMark is set in 
document.
-sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
+sal_uInt16 GetRefMarks( std::vectorString* = 0 ) const;
 
 // Call AutoCorrect
 void AutoCorrect( SvxAutoCorrect rACorr, sal_Bool bInsertMode = sal_True,
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 8be6aa7..8c61466 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1822,7 +1822,7 @@ const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex 
) const
 // Return the names of all set references in the Doc
 //JP 24.06.96: If the array pointer is 0, then just return whether a RefMark 
is set in the Doc
 // OS 25.06.96: From now on we always return the reference count
-sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
+sal_uInt16 SwDoc::GetRefMarks( std::vectorString* pNames ) const
 {
 const SfxPoolItem* pItem;
 const SwTxtRefMark* pTxtRef;
@@ -1836,8 +1836,8 @@ sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) 
const
 {
 if( pNames )
 {
-String* pTmp = new String( 
((SwFmtRefMark*)pItem)-GetRefName() );
-pNames-Insert( pTmp, nCount );
+String pTmp(((SwFmtRefMark*)pItem)-GetRefName());
+pNames-insert(pNames-begin() + nCount, pTmp);
 }
 nCount ++;
 }
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index d984598..41d113a 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -519,7 +519,7 @@ const SwFmtRefMark* SwEditShell::GetRefMark( const String 
rName ) const
 }
 
 // returne die Namen aller im Doc gesetzten Referenzen
-sal_uInt16 SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
+sal_uInt16 SwEditShell::GetRefMarks( std::vectorString* pStrings ) const
 {
 return GetDoc()-GetRefMarks( pStrings );
 }
diff --git a/sw/source/core/unocore/unocoll.cxx 
b/sw/source/core/unocore/unocoll.cxx
index 36de7ef..4996bd3 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -1948,12 +1948,12 @@ uno::Sequence OUString  
SwXReferenceMarks::getElementNames(void) throw( uno::R
 uno::SequenceOUString aRet;
 if(IsValid())
 {
-SvStringsDtor aStrings;
+std::vectorString aStrings;
 sal_uInt16 nCount = GetDoc()-GetRefMarks( aStrings );
 aRet.realloc(nCount);
 OUString* pNames = aRet.getArray();
 for(sal_uInt16 i = 0; i  nCount; i++)
-pNames[i] = *aStrings.GetObject(i);
+pNames[i] = aStrings[i];
 }
 else
 throw uno::RuntimeException();
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index f89b64b..7160fc2 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -139,9 +139,9 @@ void SwFldDokInfPage::Reset(const SfxItemSet )
 nSelEntryData = static_cast sal_uInt16 (sVal.ToInt32());
 }
 
-SvStringsDtor aLst;
+std::vectorString aLst;
 GetFldMgr().GetSubTypes(nTypeId, aLst);
-for (sal_uInt16 i = 0; i  aLst.Count(); ++i)
+for(size_t i = 0; i  aLst.size(); ++i

  1   2   >