[Libreoffice-commits] .: sc/source vbahelper/inc vbahelper/source

2012-04-24 Thread Noel Power
 sc/source/ui/inc/preview.hxx |   10 +++---
 sc/source/ui/inc/prevwsh.hxx |4 +-
 sc/source/ui/vba/vbaworksheets.cxx   |   48 +--
 vbahelper/inc/vbahelper/vbahelper.hxx|1 
 vbahelper/source/vbahelper/vbahelper.cxx |   12 +--
 5 files changed, 61 insertions(+), 14 deletions(-)

New commits:
commit 7ddb8f73c1a5573eedc593168f702287921ecb7a
Author: Noel Power noel.po...@novell.com
Date:   Tue Apr 24 11:23:46 2012 +0100

tweak support Sheets.PrintPreview bnc#75784 allow specific sheet(s) 
selection

this is a followup to commit 17c8f6745f9f98013c1b08de8ec03be66546c7fc

diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index f926e1a..6482c05 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -130,13 +130,13 @@ public:
 
 virtual void DataChanged( const DataChangedEvent rDCEvt );
 
-voidDataChanged(bool bNewTime = false); // statt 
Invalidate rufen
+SC_DLLPUBLIC voidDataChanged(bool bNewTime = false); // 
statt Invalidate rufen
 voidDoInvalidate();
 
 voidSetXOffset( long nX );
 voidSetYOffset( long nY );
 voidSetZoom(sal_uInt16 nNewZoom);
-voidSetPageNo( long nPage );
+SC_DLLPUBLIC voidSetPageNo( long nPage );
 
 boolGetPageMargins() const { return bPageMargin; }
 voidSetPageMargins( bool bVal )  { bPageMargin = bVal; }
@@ -158,7 +158,7 @@ public:
 boolAllTested() const   { return bValid  nTabsTested = nTabCount; }
 
 sal_uInt16  GetOptimalZoom(bool bWidthOnly);
-longGetFirstPage(SCTAB nTab);
+SC_DLLPUBLIC longGetFirstPage(SCTAB nTab);
 
 voidCalcAll()   { CalcPages(); }
 voidSetInGetState(bool bSet) { bInGetState = bSet; }
@@ -168,8 +168,8 @@ public:
 
 FmFormView* GetDrawView() { return pDrawView; }
 
-void SetSelectedTabs(const ScMarkData rMark);
-const ScMarkData::MarkedTabsType GetSelectedTabs() const;
+SC_DLLPUBLIC void SetSelectedTabs(const ScMarkData rMark);
+SC_DLLPUBLIC const ScMarkData::MarkedTabsType GetSelectedTabs() const;
 };
 
 
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 1ac668a..0664c1e 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -90,7 +90,7 @@ protected:
 virtual voidReadUserDataSequence (const 
::com::sun::star::uno::Sequence  ::com::sun::star::beans::PropertyValue , 
sal_Bool bBrowse = false );
 
 public:
-TYPEINFO();
+TYPEINFO_VISIBILITY( SC_DLLPUBLIC );
 
 SFX_DECL_INTERFACE(SCID_PREVIEW_SHELL)
 SFX_DECL_VIEWFACTORY(ScPreviewShell);
@@ -127,7 +127,7 @@ public:
 
 const ScPreviewLocationData GetLocationData();
 ScDocument* GetDocument();
-ScPreview*  GetPreview() { return pPreview; }
+SC_DLLPUBLIC ScPreview*  GetPreview() { return pPreview; }
 };
 
 
diff --git a/sc/source/ui/vba/vbaworksheets.cxx 
b/sc/source/ui/vba/vbaworksheets.cxx
index 3d218fa..e952d9a 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -57,7 +57,8 @@
 #include markdata.hxx
 
 #include vector
-
+#include prevwsh.hxx
+#include preview.hxx
 using namespace ::ooo::vba;
 using namespace ::com::sun::star;
 
@@ -537,11 +538,52 @@ bool ScVbaWorksheets::nameExists( uno::Reference 
sheet::XSpreadsheetDocument
 return false;
 }
 
-void ScVbaWorksheets::PrintPreview( const css::uno::Any EnableChanges ) throw 
(css::uno::RuntimeException)
+void ScVbaWorksheets::PrintPreview( const css::uno::Any /*EnableChanges*/ ) 
throw (css::uno::RuntimeException)
 {
 // need test, print preview current active sheet
 // !! TODO !! get view shell from controller
-PrintPreviewHelper( EnableChanges, excel::getBestViewShell( mxModel ) );
+ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel );
+SfxViewFrame* pViewFrame = NULL;
+if ( pViewShell )
+pViewFrame = pViewShell-GetViewFrame();
+if ( pViewFrame )
+{
+if ( !pViewFrame-GetFrame().IsInPlace() )
+{
+dispatchExecute( pViewShell, SID_VIEWSHELL1 );
+SfxViewShell*  pShell = SfxViewShell::Get( 
pViewFrame-GetFrame().GetFrameInterface()-getController() );
+
+if (  pShell-ISA( ScPreviewShell ) )
+{
+ScPreviewShell* pPrvShell = static_cast  ScPreviewShell* ( 
pShell );
+ScPreview* pPrvView = pPrvShell-GetPreview();
+ScMarkData aMarkData;
+sal_Int32 nElems = getCount();
+for ( sal_Int32 nItem = 1; nItem = nElems; ++nItem )
+{
+uno::Reference excel::XWorksheet  xSheet( Item( 
uno::makeAny( nItem ), uno::Any() ), uno::UNO_QUERY_THROW );
+ScVbaWorksheet* pSheet = 
excel::getImplFromDocModuleWrapperScVbaWorksheet( xSheet

[Libreoffice-commits] .: oovbaapi/ooo sc/source vbahelper/source

2012-04-23 Thread Noel Power
 oovbaapi/ooo/vba/excel/XWorksheets.idl   |1 +
 sc/source/ui/vba/vbaworksheets.cxx   |7 +++
 sc/source/ui/vba/vbaworksheets.hxx   |1 +
 vbahelper/source/vbahelper/vbahelper.cxx |   13 -
 4 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit 17c8f6745f9f98013c1b08de8ec03be66546c7fc
Author: Noel Power noel.po...@novell.com
Date:   Mon Apr 23 13:33:15 2012 +0100

support Sheets.PrintPreview bnc#757844

there is still a little wrinkle, the preview shell always shows what sheets 
are selected, it's currently not possible to specify the sheets to preview

diff --git a/oovbaapi/ooo/vba/excel/XWorksheets.idl 
b/oovbaapi/ooo/vba/excel/XWorksheets.idl
index 17c80ce..cca74f9 100644
--- a/oovbaapi/ooo/vba/excel/XWorksheets.idl
+++ b/oovbaapi/ooo/vba/excel/XWorksheets.idl
@@ -45,6 +45,7 @@ interface XWorksheets
 void PrintOut( [in] any From, [in] any To, [in] any Copies, [in] any 
Preview, [in] any ActivePrinter, [in] any PrintToFile, [in] any Collate, [in] 
any PrToFileName );
 void Select( [in] any Replace );
 void Copy( [in] any Before, [in] any After);
+void PrintPreview( [in] any EnableChanges );
 };
 }; }; };
 
diff --git a/sc/source/ui/vba/vbaworksheets.cxx 
b/sc/source/ui/vba/vbaworksheets.cxx
index 89f169a..3d218fa 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -537,4 +537,11 @@ bool ScVbaWorksheets::nameExists( uno::Reference 
sheet::XSpreadsheetDocument
 return false;
 }
 
+void ScVbaWorksheets::PrintPreview( const css::uno::Any EnableChanges ) throw 
(css::uno::RuntimeException)
+{
+// need test, print preview current active sheet
+// !! TODO !! get view shell from controller
+PrintPreviewHelper( EnableChanges, excel::getBestViewShell( mxModel ) );
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworksheets.hxx 
b/sc/source/ui/vba/vbaworksheets.hxx
index c34ec08..b184d78 100644
--- a/sc/source/ui/vba/vbaworksheets.hxx
+++ b/sc/source/ui/vba/vbaworksheets.hxx
@@ -73,6 +73,7 @@ public:
 virtual css::uno::Any createCollectionObject( const css::uno::Any aSource 
);
 virtual void SAL_CALL Select( const css::uno::Any Replace ) throw 
(css::uno::RuntimeException);
 virtual void SAL_CALL Copy ( const css::uno::Any Before, const 
css::uno::Any After) throw (css::uno::RuntimeException);
+virtual void SAL_CALL PrintPreview( const css::uno::Any EnableChanges ) 
throw (css::uno::RuntimeException);
 // ScVbaWorksheets_BASE
 virtual css::uno::Any SAL_CALL Item( const css::uno::Any Index1, const 
css::uno::Any Index2 ) throw
 (css::uno::RuntimeException);
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx 
b/vbahelper/source/vbahelper/vbahelper.cxx
index b91ef85..0ef22fd 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -473,7 +473,18 @@ void PrintOutHelper( SfxViewShell* pViewShell, const 
uno::Any From, const uno::
 
  void PrintPreviewHelper( const css::uno::Any /*EnableChanges*/, 
SfxViewShell* pViewShell )
 {
-dispatchExecute( pViewShell, SID_VIEWSHELL1 );
+SfxViewFrame* pViewFrame = NULL;
+if ( pViewShell )
+pViewFrame = pViewShell-GetViewFrame();
+if ( pViewFrame )
+{
+if ( !pViewFrame-GetFrame().IsInPlace() )
+{
+dispatchExecute( pViewShell, SID_VIEWSHELL1 );
+while ( isInPrintPreview( pViewFrame ) )
+Application::Yield();
+}
+}
 }
 
 bool extractBoolFromAny( const uno::Any rAny ) throw (uno::RuntimeException)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-04-23 Thread Noel Power
 sc/sdi/cellsh.sdi |1 +
 sc/source/ui/src/popup.src|6 ++
 sc/source/ui/view/cellsh.cxx  |2 ++
 sc/source/ui/view/cellsh1.cxx |7 +--
 sfx2/inc/sfx2/sfxcommands.h   |1 +
 sfx2/inc/sfx2/sfxsids.hrc |2 +-
 sfx2/sdi/sfx.sdi  |   24 
 7 files changed, 40 insertions(+), 3 deletions(-)

New commits:
commit 60cea1f49ec6781e541fbd7949c4271d213d3e0d
Author: Noel Power noel.po...@novell.com
Date:   Mon Apr 23 23:14:13 2012 +0100

tweak paste-only context menu ( add paste only number )

changed the text to really only paste text, also added pasteonly | number

diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 4f586e8..ebcf86e 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -163,6 +163,7 @@ interface CellSelection
 SID_PASTE_ONLY   [ ExecMethod = ExecuteEdit; StateMethod = GetClipState; ]
 SID_PASTE_ONLY_TEXT   [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
 SID_PASTE_ONLY_FORMULA   [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
+SID_PASTE_ONLY_VALUE   [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
 SID_CLIPBOARD_FORMAT_ITEMS  [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
 SID_EXTERNAL_SOURCE [ ExecMethod = ExecuteEdit; StateMethod = 
GetBlockState; ]
 FID_MERGE_ON[ ExecMethod = Execute; StateMethod = GetState; ]
diff --git a/sc/source/ui/src/popup.src b/sc/source/ui/src/popup.src
index de6fba5..6e27ce3 100644
--- a/sc/source/ui/src/popup.src
+++ b/sc/source/ui/src/popup.src
@@ -151,6 +151,12 @@ Menu RID_POPUP_CELLS
 };
 MenuItem
 {
+Identifier = SID_PASTE_ONLY_VALUE ;
+HelpId = CMD_SID_PASTE_ONLY_VALUE ;
+Text [ en-US ] = ~Number ;
+};
+MenuItem
+{
 Identifier = SID_PASTE_ONLY_FORMULA ;
 HelpId = CMD_SID_PASTE_ONLY_FORMULA ;
 Text [ en-US ] = ~Formula ;
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 0d76bb7..bb18878 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -449,6 +449,7 @@ IMPL_LINK( ScCellShell, ClipboardChanged, 
TransferableDataHelper*, pDataHelper )
 SfxBindings rBindings = GetViewData()-GetBindings();
 rBindings.Invalidate( SID_PASTE );
 rBindings.Invalidate( SID_PASTE_SPECIAL );
+rBindings.Invalidate( SID_PASTE_ONLY_VALUE );
 rBindings.Invalidate( SID_PASTE_ONLY_TEXT );
 rBindings.Invalidate( SID_PASTE_ONLY_FORMULA );
 rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
@@ -539,6 +540,7 @@ void ScCellShell::GetClipState( SfxItemSet rSet )
 {
 rSet.DisableItem( SID_PASTE );
 rSet.DisableItem( SID_PASTE_SPECIAL );
+rSet.DisableItem( SID_PASTE_ONLY_VALUE );
 rSet.DisableItem( SID_PASTE_ONLY_TEXT );
 rSet.DisableItem( SID_PASTE_ONLY_FORMULA );
 rSet.DisableItem( SID_CLIPBOARD_FORMAT_ITEMS );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 35c162f..7c650c4 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1369,6 +1369,7 @@ void ScCellShell::ExecuteEdit( SfxRequest rReq )
 }
 pTabViewShell-CellContentChanged();// = PasteFromXXX ???
 break;
+case SID_PASTE_ONLY_VALUE:
 case SID_PASTE_ONLY_TEXT:
 case SID_PASTE_ONLY_FORMULA:
 {
@@ -1377,8 +1378,10 @@ void ScCellShell::ExecuteEdit( SfxRequest rReq )
 {
 rReq.SetSlot( FID_INS_CELL_CONTENTS );
 rtl::OUString aFlags;
-if ( nSlot == SID_PASTE_ONLY_TEXT )
-aFlags = VDS;
+if ( nSlot == SID_PASTE_ONLY_VALUE )
+aFlags = V;
+else if ( nSlot == SID_PASTE_ONLY_TEXT )
+aFlags = S;
 else
 aFlags = F;
 rReq.AppendItem( SfxStringItem( FID_INS_CELL_CONTENTS, aFlags 
) );
diff --git a/sfx2/inc/sfx2/sfxcommands.h b/sfx2/inc/sfx2/sfxcommands.h
index e6e22c2..cb41efe 100644
--- a/sfx2/inc/sfx2/sfxcommands.h
+++ b/sfx2/inc/sfx2/sfxcommands.h
@@ -202,6 +202,7 @@
 #define CMD_SID_CLIPBOARD_FORMAT_ITEMS  .uno:ClipboardFormatItems
 #define CMD_SID_PASTE_SPECIAL   .uno:PasteSpecial
 #define CMD_SID_PASTE_ONLY  .uno:PasteOnly
+#define CMD_SID_PASTE_ONLY_VALUE.uno:PasteOnlyValue
 #define CMD_SID_PASTE_ONLY_TEXT .uno:PasteOnlyText
 #define CMD_SID_PASTE_ONLY_FORMULA  .uno:PasteOnlyFormula
 #define CMD_SID_DOCPATH .uno:DocPath
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2

[Libreoffice-commits] .: 3 commits - oovbaapi/ooo sc/source

2012-04-20 Thread Noel Power
 oovbaapi/ooo/vba/excel/XApplication.idl |5 +
 sc/source/ui/inc/viewutil.hxx   |2 
 sc/source/ui/vba/vbaapplication.cxx |   86 +++-
 sc/source/ui/vba/vbaapplication.hxx |   11 
 4 files changed, 101 insertions(+), 3 deletions(-)

New commits:
commit 101132c28a8f084612106337f4cafe21c535dea8
Author: Noel Power noel.po...@novell.com
Date:   Fri Apr 20 18:25:45 2012 +0100

add stub vba implementation Application methods

added Application.DisplayExcel4Menus, Application.DisplayNoteIndicator, 
Application.ShowWindowsInTaskbar. Althought these attributes of the Application 
object don't do anything they allow setting and retrieval of the state. We 
could make a usable implementation for Application.DisplayNoteIndicator, the 
others though don't really seem to have any useful equivalent in the 
libreoffice world

diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl 
b/oovbaapi/ooo/vba/excel/XApplication.idl
index 866ab21..baf6468 100644
--- a/oovbaapi/ooo/vba/excel/XApplication.idl
+++ b/oovbaapi/ooo/vba/excel/XApplication.idl
@@ -76,6 +76,9 @@ interface XApplication
 [attribute] long EnableCancelKey;
 [attribute] boolean DisplayFullScreen;
 [attribute] boolean DisplayScrollBars;
+[attribute] boolean DisplayExcel4Menus;
+[attribute] boolean DisplayNoteIndicator;
+[attribute] boolean ShowWindowsInTaskbar;
 
 void setDefaultFilePath([in] string DefaultFilePath) 
raises(com::sun::star::script::BasicErrorException);
 
diff --git a/sc/source/ui/vba/vbaapplication.cxx 
b/sc/source/ui/vba/vbaapplication.cxx
index 4963882..bb31732 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -154,14 +154,19 @@ struct ScVbaAppSettings
 sal_Int32 mnCalculation;
 sal_Bool mbDisplayAlerts;
 sal_Bool mbEnableEvents;
-
+sal_Bool mbExcel4Menus;
+sal_Bool mbDisplayNoteIndicator;
+sal_Bool mbShowWindowsInTaskbar;
 explicit ScVbaAppSettings();
 };
 
 ScVbaAppSettings::ScVbaAppSettings() :
 mnCalculation( excel::XlCalculation::xlCalculationAutomatic ),
 mbDisplayAlerts( sal_True ),
-mbEnableEvents( sal_True )
+mbEnableEvents( sal_True ),
+mbExcel4Menus( sal_False ),
+mbDisplayNoteIndicator( sal_True ),
+mbShowWindowsInTaskbar( sal_True )
 {
 }
 
@@ -916,6 +921,42 @@ ScVbaApplication::setDisplayScrollBars( sal_Bool bSet )  
throw (uno::RuntimeExce
 }
 
 sal_Bool SAL_CALL
+ScVbaApplication::getDisplayExcel4Menus() throw (css::uno::RuntimeException)
+{
+return mrAppSettings.mbExcel4Menus;
+}
+
+void SAL_CALL
+ScVbaApplication::setDisplayExcel4Menus( sal_Bool bSet ) throw 
(css::uno::RuntimeException)
+{
+mrAppSettings.mbExcel4Menus = bSet;
+}
+
+sal_Bool SAL_CALL
+ScVbaApplication::getDisplayNoteIndicator() throw (css::uno::RuntimeException)
+{
+return mrAppSettings.mbDisplayNoteIndicator;
+}
+
+void SAL_CALL
+ScVbaApplication::setDisplayNoteIndicator( sal_Bool bSet ) throw 
(css::uno::RuntimeException)
+{
+mrAppSettings.mbDisplayNoteIndicator = bSet;
+}
+
+sal_Bool SAL_CALL
+ScVbaApplication::getShowWindowsInTaskbar() throw (css::uno::RuntimeException)
+{
+return mrAppSettings.mbShowWindowsInTaskbar;
+}
+
+void SAL_CALL
+ScVbaApplication::setShowWindowsInTaskbar( sal_Bool bSet ) throw 
(css::uno::RuntimeException)
+{
+mrAppSettings.mbShowWindowsInTaskbar = bSet;
+}
+
+sal_Bool SAL_CALL
 ScVbaApplication::getVisible() throw (uno::RuntimeException)
 {
 sal_Bool bVisible = sal_True;
diff --git a/sc/source/ui/vba/vbaapplication.hxx 
b/sc/source/ui/vba/vbaapplication.hxx
index 9b1c528..0f72d7b 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -126,6 +126,13 @@ public:
 virtual void SAL_CALL setDisplayFullScreen( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
 virtual sal_Bool SAL_CALL getDisplayScrollBars() throw 
(css::uno::RuntimeException);
 virtual void SAL_CALL setDisplayScrollBars( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
+virtual sal_Bool SAL_CALL getDisplayExcel4Menus() throw 
(css::uno::RuntimeException);
+virtual void SAL_CALL setDisplayExcel4Menus( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
+
+virtual sal_Bool SAL_CALL getDisplayNoteIndicator() throw 
(css::uno::RuntimeException);
+virtual void SAL_CALL setDisplayNoteIndicator( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
+virtual sal_Bool SAL_CALL getShowWindowsInTaskbar() throw 
(css::uno::RuntimeException);
+virtual void SAL_CALL setShowWindowsInTaskbar( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
 virtual css::uno::Any SAL_CALL Windows( const css::uno::Any aIndex ) 
throw (css::uno::RuntimeException);
 virtual void SAL_CALL wait( double time ) throw 
(css::uno::RuntimeException);
 virtual css::uno::Any SAL_CALL Range( const css::uno::Any Cell1, const 
css::uno::Any Cell2 ) throw (css::uno::RuntimeException);
commit

[Libreoffice-commits] .: sc/source

2012-04-18 Thread Noel Power
 sc/source/ui/view/output2.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 808dd658a265f565a638556322250a0957e8e535
Author: Noel Power noel.po...@novell.com
Date:   Wed Apr 18 18:36:25 2012 +0100

make sure nPos is and nChar are reset for string without placeholder

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 6c616eb..bca73f5 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -520,6 +520,11 @@ sal_Bool ScDrawStringsVars::SetText( ScBaseCell* pCell )
 aString.Erase( nPos, 2 );
 }
 }
+else
+{
+nPos = STRING_NOTFOUND;
+nChar = 0x0;
+}
 if (aString.Len()  DRAWTEXT_MAX)
 aString.Erase(DRAWTEXT_MAX);
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - oovbaapi/ooo sc/inc sc/source svl/inc svl/source vbahelper/source

2012-04-17 Thread Noel Power
 oovbaapi/ooo/vba/msforms/XControl.idl   |1 
 sc/inc/cellform.hxx |4 +
 sc/source/core/tool/cellform.cxx|5 +
 sc/source/ui/view/output2.cxx   |   43 +++-
 svl/inc/svl/zforlist.hxx|4 -
 svl/source/numbers/zforlist.cxx |   16 --
 vbahelper/source/msforms/vbacontrol.cxx |   84 +++-
 vbahelper/source/msforms/vbacontrol.hxx |2 
 8 files changed, 146 insertions(+), 13 deletions(-)

New commits:
commit 46e18bc915ac94a81462642cc9d56d29c04d0c46
Author: Noel Power noel.po...@novell.com
Date:   Mon Apr 16 16:20:51 2012 +0100

enable '*' repeat next char to fill available width for calc num formats

but - however no support to import/export this to file format yet

diff --git a/sc/inc/cellform.hxx b/sc/inc/cellform.hxx
index cdfa09c..3a5418d 100644
--- a/sc/inc/cellform.hxx
+++ b/sc/inc/cellform.hxx
@@ -53,7 +53,9 @@ public:
Color** ppColor, SvNumberFormatter rFormatter,
sal_Bool bNullVals = sal_True,
sal_Bool bFormula  = false,
-   ScForceTextFmt eForceTextFmt = ftDontForce );
+   ScForceTextFmt eForceTextFmt = ftDontForce,
+   bool bUseStarFormat = false );
+
 
 static void GetInputString( ScBaseCell* pCell, sal_uLong nFormat, 
rtl::OUString rString,
   SvNumberFormatter rFormatter );
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index f33a48c..0da6866 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -49,7 +49,8 @@ void ScCellFormat::GetString( ScBaseCell* pCell, sal_uLong 
nFormat, rtl::OUStrin
   Color** ppColor, SvNumberFormatter rFormatter,
   sal_Bool bNullVals,
   sal_Bool bFormula,
-  ScForceTextFmt eForceTextFmt )
+  ScForceTextFmt eForceTextFmt,
+  bool bUseStarFormat )
 {
 *ppColor = NULL;
 if (rFormatter==NULL)
@@ -92,7 +93,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, sal_uLong 
nFormat, rtl::OUStrin
 rFormatter.GetOutputString( aTemp, nFormat, rString, 
ppColor );
 }
 else
-rFormatter.GetOutputString( nValue, nFormat, rString, 
ppColor );
+rFormatter.GetOutputString( nValue, nFormat, rString, 
ppColor, bUseStarFormat );
 }
 }
 break;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 2b99bb8..6c616eb 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -128,6 +128,8 @@ class ScDrawStringsVars
 
 Color   aBackConfigColor;   // used for 
ScPatternAttr::GetFont calls
 Color   aTextConfigColor;
+sal_Int32   nPos;
+sal_Unicode nChar;
 
 public:
 ScDrawStringsVars(ScOutputData* pData, sal_Bool bPTL);
@@ -162,6 +164,7 @@ public:
 sal_BoolGetLineBreak() const{ return bLineBreak; }
 sal_BoolIsRepeat() const{ return bRepeat; }
 sal_BoolIsShrink() const{ return bShrink; }
+voidRepeatToFill( long colWidth );
 
 longGetAscent() const   { return nAscentPixel; }
 sal_BoolIsRotated() const   { return bRotated; }
@@ -206,7 +209,9 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, 
sal_Bool bPTL) :
 bLineBreak  ( false ),
 bRepeat ( false ),
 bShrink ( false ),
-bPixelToLogic( bPTL )
+bPixelToLogic( bPTL ),
+nPos( STRING_NOTFOUND ),
+nChar( 0x0 )
 {
 ScModule* pScMod = SC_MOD();
 bCellContrast = pOutput-bUseStyleColor 
@@ -502,9 +507,19 @@ sal_Bool ScDrawStringsVars::SetText( ScBaseCell* pCell )
  *pOutput-pDoc-GetFormatTable(),
  pOutput-bShowNullValues,
  pOutput-bShowFormulas,
- ftCheck );
+ ftCheck, true );
 aString = aOUString;
-
+if ( nFormat )
+{
+nPos = aString.Search( 0x1B );
+if ( nPos != STRING_NOTFOUND )
+{
+nPos = nPos - 1;
+nChar = aString.GetChar( nPos );
+// delete placeholder and char to repeat
+aString.Erase( nPos, 2 );
+}
+}
 if (aString.Len()  DRAWTEXT_MAX)
 aString.Erase(DRAWTEXT_MAX);
 
@@ -537,6 +552,27 @@ void ScDrawStringsVars::SetHashText

[Libreoffice-commits] .: ucb/source

2012-04-17 Thread Noel Power
 ucb/source/ucp/file/shell.cxx |   77 +-
 1 file changed, 40 insertions(+), 37 deletions(-)

New commits:
commit 45b57a9dfb5df8b9c4a1974cb6e848d4f3b57ea3
Author: Noel Power noel.po...@novell.com
Date:   Tue Apr 17 15:50:35 2012 +0100

prevent getFileURL()  getLinkTargetURL() asserting for broken links

diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 1cb03b3..1907d16 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -2491,54 +2491,57 @@ shell::getv(
  osl_FileStatus_Mask_FileURL |
  osl_FileStatus_Mask_Type |
  osl_FileStatus_Mask_LinkTargetURL );
-aDirItem.getFileStatus( aFileStatus );
-aUnqPath = aFileStatus.getFileURL();
 
-// If the directory item type is a link retrieve the type of the target
-
-if ( aFileStatus.getFileType() == osl::FileStatus::Link )
+osl::FileBase::RC aRes = aDirItem.getFileStatus( aFileStatus );
+if ( aRes == osl::FileBase::E_None )
 {
-// Assume failure
-aIsRegular = false;
-osl::FileBase::RC result = osl::FileBase::E_INVAL;
-osl::DirectoryItem aTargetItem;
-osl::DirectoryItem::get( aFileStatus.getLinkTargetURL(), aTargetItem );
-if ( aTargetItem.is() )
+aUnqPath = aFileStatus.getFileURL();
+
+// If the directory item type is a link retrieve the type of the target
+
+if ( aFileStatus.getFileType() == osl::FileStatus::Link )
 {
-osl::FileStatus aTargetStatus( osl_FileStatus_Mask_Type );
+// Assume failure
+aIsRegular = false;
+osl::FileBase::RC result = osl::FileBase::E_INVAL;
+osl::DirectoryItem aTargetItem;
+osl::DirectoryItem::get( aFileStatus.getLinkTargetURL(), 
aTargetItem );
+if ( aTargetItem.is() )
+{
+osl::FileStatus aTargetStatus( osl_FileStatus_Mask_Type );
 
-if ( osl::FileBase::E_None ==
- ( result = aTargetItem.getFileStatus( aTargetStatus ) ) )
-aIsRegular =
-aTargetStatus.getFileType() == osl::FileStatus::Regular;
+if ( osl::FileBase::E_None ==
+ ( result = aTargetItem.getFileStatus( aTargetStatus ) ) )
+aIsRegular =
+aTargetStatus.getFileType() == 
osl::FileStatus::Regular;
+}
 }
-}
-else
-aIsRegular = aFileStatus.getFileType() == osl::FileStatus::Regular;
+else
+aIsRegular = aFileStatus.getFileType() == osl::FileStatus::Regular;
 
-registerNotifier( aUnqPath,pNotifier );
-insertDefaultProperties( aUnqPath );
-{
-osl::MutexGuard aGuard( m_aMutex );
+registerNotifier( aUnqPath,pNotifier );
+insertDefaultProperties( aUnqPath );
+{
+osl::MutexGuard aGuard( m_aMutex );
 
-shell::ContentMap::iterator it = m_aContent.find( aUnqPath );
-commit( it,aFileStatus );
+shell::ContentMap::iterator it = m_aContent.find( aUnqPath );
+commit( it,aFileStatus );
 
-shell::PropertySet::iterator it1;
-PropertySet propset = *(it-second.properties);
+shell::PropertySet::iterator it1;
+PropertySet propset = *(it-second.properties);
 
-for( sal_Int32 i = 0; i  seq.getLength(); ++i )
-{
-MyProperty readProp( properties[i].Name );
-it1 = propset.find( readProp );
-if( it1 == propset.end() )
-seq[i] = uno::Any();
-else
-seq[i] = it1-getValue();
+for( sal_Int32 i = 0; i  seq.getLength(); ++i )
+{
+MyProperty readProp( properties[i].Name );
+it1 = propset.find( readProp );
+if( it1 == propset.end() )
+seq[i] = uno::Any();
+else
+seq[i] = it1-getValue();
+}
 }
+deregisterNotifier( aUnqPath,pNotifier );
 }
-deregisterNotifier( aUnqPath,pNotifier );
-
 XRow_impl* p = new XRow_impl( this,seq );
 return uno::Reference sdbc::XRow ( p );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-04-03 Thread Noel Power
 sc/source/ui/inc/prevwsh.hxx  |5 +-
 sc/source/ui/view/preview.cxx |5 +-
 sc/source/ui/view/prevwsh.cxx |  104 +-
 sw/source/ui/uiview/pview.cxx |   84 +
 4 files changed, 143 insertions(+), 55 deletions(-)

New commits:
commit f194d18dfeceff104f9c5e500ea4dd94fa1b5b06
Author: Noel Power noel.po...@novell.com
Date:   Tue Apr 3 17:07:54 2012 +0100

Hori/Vert scrollbars in calc preview should be shown only when necessary

diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 271a352..1ac668a 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -50,6 +50,7 @@ class CommandEvent;
 
 class ScPreviewShell: public SfxViewShell
 {
+friend class ScPreview; // allow access to AdjustPosSizePixel
 ScDocShell* pDocShell;
 
 ScPreview*  pPreview;   // Ausgabe-Fenster
@@ -63,7 +64,8 @@ class ScPreviewShell: public SfxViewShell
 longnMaxVertPos;
 
 SfxBroadcaster* pAccessibilityBroadcaster;
-
+boolGetPageSize( Size aPageSize );
+voidUpdateNeededScrollBars();
 private:
 voidConstruct( Window* pParent );
 DECL_LINK(ScrollHandler, ScrollBar* );
@@ -72,7 +74,6 @@ private:
 protected:
 virtual voidActivate(sal_Bool bMDI);
 virtual voidDeactivate(sal_Bool bMDI);
-
 virtual voidAdjustPosSizePixel( const Point rPos, const Size rSize );
 
 virtual voidInnerResizePixel( const Point rOfs, const Size rSize );
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index bbb7c72..e83224d 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -705,7 +705,10 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom)
 SetMapMode( aMMMode );
 
 bInSetZoom = true;  // don't scroll during SetYOffset in 
UpdateScrollBars
-pViewShell-UpdateScrollBars();
+if ( Window* pWin = pViewShell-GetWindow() )
+pViewShell-AdjustPosSizePixel( pWin-GetPosPixel(), 
pWin-GetSizePixel() );
+else
+pViewShell-UpdateScrollBars();
 bInSetZoom = false;
 
 bStateValid = false;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index dfc6268..8b65824 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -134,8 +134,8 @@ void ScPreviewShell::Construct( Window* pParent )
 if (pDrawBC)
 StartListening(*pDrawBC);
 
-pHorScroll-Show();
-pVerScroll-Show();
+pHorScroll-Show( false );
+pVerScroll-Show( false );
 pCorner-Show();
 SetHelpId( HID_SCSHELL_PREVWSH );
 SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(Preview)));
@@ -244,24 +244,15 @@ Size ScPreviewShell::GetOptimalSizePixel() const
 
 void ScPreviewShell::AdjustPosSizePixel( const Point rPos, const Size rSize )
 {
-long nBarW = 
GetViewFrame()-GetWindow().GetSettings().GetStyleSettings().GetScrollBarSize();
-long nBarH = nBarW;
-
-Size aOutSize( rSize.Width()-nBarW, rSize.Height()-nBarH );
+Size aOutSize( rSize );
 pPreview-SetPosSizePixel( rPos, aOutSize );
-pHorScroll-SetPosSizePixel( Point( rPos.X(), rPos.Y() + aOutSize.Height() 
),
- Size( aOutSize.Width(), nBarH ) );
-pVerScroll-SetPosSizePixel( Point( rPos.X() + aOutSize.Width(), rPos.Y() 
),
- Size( nBarW, aOutSize.Height() ) );
-pCorner-SetPosSizePixel( Point( rPos.X() + aOutSize.Width(), rPos.Y() + 
aOutSize.Height() ),
-  Size( nBarW, nBarH ) );
 
 if ( SVX_ZOOM_WHOLEPAGE == eZoom )
 pPreview-SetZoom( pPreview-GetOptimalZoom(false) );
 else if ( SVX_ZOOM_PAGEWIDTH == eZoom )
-pPreview-SetZoom( pPreview-GetOptimalZoom(sal_True) );
+pPreview-SetZoom( pPreview-GetOptimalZoom(true) );
 
-UpdateScrollBars();
+UpdateNeededScrollBars();
 }
 
 void ScPreviewShell::InnerResizePixel( const Point rOfs, const Size rSize )
@@ -274,7 +265,7 @@ void ScPreviewShell::OuterResizePixel( const Point rOfs, 
const Size rSize )
 AdjustPosSizePixel( rOfs,rSize );
 }
 
-void ScPreviewShell::UpdateScrollBars()
+bool ScPreviewShell::GetPageSize( Size aPageSize )
 {
 ScDocument* pDoc = pDocShell-GetDocument();
 SCTAB nTab = pPreview-GetTab();
@@ -282,13 +273,87 @@ void ScPreviewShell::UpdateScrollBars()
 ScStyleSheetPool*   pStylePool  = pDoc-GetStyleSheetPool();
 SfxStyleSheetBase*  pStyleSheet = pStylePool-Find( pDoc-GetPageStyle( 
nTab ),
 SFX_STYLE_FAMILY_PAGE 
);
-OSL_ENSURE(pStyleSheet,StyleSheet nicht gefunden);
-if (!pStyleSheet) return;
+OSL_ENSURE(pStyleSheet,No style sheet);
+if (!pStyleSheet) return false;
 const SfxItemSet* pParamSet = pStyleSheet-GetItemSet();
 
-Size aPageSize = ((const SvxSizeItem) 
pParamSet-Get

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

2012-03-29 Thread Noel Power
 sc/sdi/cellsh.sdi |3 +
 sc/source/ui/src/popup.src|   25 ++
 sc/source/ui/view/cellsh.cxx  |4 ++
 sc/source/ui/view/cellsh1.cxx |   24 +-
 sfx2/inc/sfx2/sfxcommands.h   |3 +
 sfx2/inc/sfx2/sfxsids.hrc |6 +--
 sfx2/sdi/sfx.sdi  |   72 ++
 7 files changed, 133 insertions(+), 4 deletions(-)

New commits:
commit 710d768aafd6b2c1fdc5627bede25000c3e346d5
Author: Noel Power noel.po...@novell.com
Date:   Thu Mar 29 19:42:54 2012 +0100

add for calc extra paste ctx menu with options to paste text or formula only

diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index ce942e2..4f586e8 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -160,6 +160,9 @@ interface CellSelection
 SID_COPY[ ExecMethod = ExecuteEdit; StateMethod = 
GetBlockState; ]
 SID_PASTE   [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
 SID_PASTE_SPECIAL   [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
+SID_PASTE_ONLY   [ ExecMethod = ExecuteEdit; StateMethod = GetClipState; ]
+SID_PASTE_ONLY_TEXT   [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
+SID_PASTE_ONLY_FORMULA   [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
 SID_CLIPBOARD_FORMAT_ITEMS  [ ExecMethod = ExecuteEdit; StateMethod = 
GetClipState; ]
 SID_EXTERNAL_SOURCE [ ExecMethod = ExecuteEdit; StateMethod = 
GetBlockState; ]
 FID_MERGE_ON[ ExecMethod = Execute; StateMethod = GetState; ]
diff --git a/sc/source/ui/src/popup.src b/sc/source/ui/src/popup.src
index 441c336..de6fba5 100644
--- a/sc/source/ui/src/popup.src
+++ b/sc/source/ui/src/popup.src
@@ -133,6 +133,31 @@ Menu RID_POPUP_CELLS
 HelpId = CMD_SID_PASTE_SPECIAL ;
 Text [ en-US ] = P~aste Special... ;
 };
+
+MenuItem
+{
+Identifier = SID_PASTE_ONLY ;
+HelpId = CMD_SID_PASTE_ONLY ;
+Text [ en-US ] = Paste O~nly ;
+SubMenu = Menu
+{
+ItemList =
+{
+MenuItem
+{
+Identifier = SID_PASTE_ONLY_TEXT ;
+HelpId = CMD_SID_PASTE_ONLY_TEXT ;
+Text [ en-US ] = ~Text ;
+};
+MenuItem
+{
+Identifier = SID_PASTE_ONLY_FORMULA ;
+HelpId = CMD_SID_PASTE_ONLY_FORMULA ;
+Text [ en-US ] = ~Formula ;
+};
+};
+};
+};
  //--
 MenuItem { Separator = TRUE ; };
  //--
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c1e5670..0d76bb7 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -449,6 +449,8 @@ IMPL_LINK( ScCellShell, ClipboardChanged, 
TransferableDataHelper*, pDataHelper )
 SfxBindings rBindings = GetViewData()-GetBindings();
 rBindings.Invalidate( SID_PASTE );
 rBindings.Invalidate( SID_PASTE_SPECIAL );
+rBindings.Invalidate( SID_PASTE_ONLY_TEXT );
+rBindings.Invalidate( SID_PASTE_ONLY_FORMULA );
 rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
 }
 return 0;
@@ -537,6 +539,8 @@ void ScCellShell::GetClipState( SfxItemSet rSet )
 {
 rSet.DisableItem( SID_PASTE );
 rSet.DisableItem( SID_PASTE_SPECIAL );
+rSet.DisableItem( SID_PASTE_ONLY_TEXT );
+rSet.DisableItem( SID_PASTE_ONLY_FORMULA );
 rSet.DisableItem( SID_CLIPBOARD_FORMAT_ITEMS );
 }
 else if ( rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) != 
SFX_ITEM_UNKNOWN )
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 3c6807f..99921c7 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1331,9 +1331,11 @@ void ScCellShell::ExecuteEdit( SfxRequest rReq )
 if ( bAsLink  bOtherDoc )
 
pTabViewShell-PasteFromSystem(SOT_FORMATSTR_ID_LINK);  // DDE insert
 else
+{
 pTabViewShell-PasteFromClip( nFlags, 
pOwnClip-GetDocument(),
 nFunction, bSkipEmpty, bTranspose, bAsLink,
 eMoveMode, IDF_NONE, sal_True );// 
allow warning dialog
+}
 }
 
 if( !pReqArgs )
@@ -1367,7 +1369,27 @@ void ScCellShell::ExecuteEdit( SfxRequest rReq )
 }
 pTabViewShell-CellContentChanged();// = PasteFromXXX ???
 break;
-
+case SID_PASTE_ONLY_TEXT:
+case SID_PASTE_ONLY_FORMULA:
+{
+Window* pWin

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/inc sc/source

2012-03-27 Thread Noel Power
 sc/inc/attarray.hxx|2 +-
 sc/inc/column.hxx  |2 +-
 sc/inc/document.hxx|1 +
 sc/inc/table.hxx   |2 +-
 sc/source/core/data/attarray.cxx   |4 ++--
 sc/source/core/data/column2.cxx|4 ++--
 sc/source/core/data/document.cxx   |   13 +
 sc/source/core/data/table1.cxx |4 ++--
 sc/source/filter/excel/xetable.cxx |2 +-
 9 files changed, 24 insertions(+), 10 deletions(-)

New commits:
commit 6c6a4ed070acc0b106e951864fa5d20927f5c1e0
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Tue Mar 27 05:14:06 2012 +0200

export all style information to xls/xlsx, fdo#46738

Fixes that if more than 84 empty but formatted rows at the end of a file
have been found the export skipped those rows.

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index b58472e..27a086e 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -175,7 +175,7 @@ public:
 boolIsEmpty() const;
 
 boolGetFirstVisibleAttr( SCROW rFirstRow ) const;
-boolGetLastVisibleAttr( SCROW rLastRow, SCROW nLastData ) const;
+boolGetLastVisibleAttr( SCROW rLastRow, SCROW nLastData, bool 
bFullFormattedArea = false ) const;
 boolHasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
 boolIsVisibleEqual( const ScAttrArray rOther,
 SCROW nStartRow, SCROW nEndRow ) const;
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index f86bf9b..313dcd6 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -183,7 +183,7 @@ public:
 boolHasSelectionMatrixFragment(const ScMarkData rMark) const;
 
 boolGetFirstVisibleAttr( SCROW rFirstRow ) const;
-boolGetLastVisibleAttr( SCROW rLastRow ) const;
+boolGetLastVisibleAttr( SCROW rLastRow, bool bFullFormattedArea = 
false ) const;
 boolHasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
 boolIsVisibleAttrEqual( const ScColumn rCol, SCROW nStartRow = 0,
 SCROW nEndRow = MAXROW ) const;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 50bcd27..6167634 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -940,6 +940,7 @@ public:
 SCCOL rEndCol, SCROW rEndRow, bool 
bIncludeOld, bool bOnlyDown ) const;
 SC_DLLPUBLIC bool   GetCellArea( SCTAB nTab, SCCOL rEndCol, 
SCROW rEndRow ) const;
 SC_DLLPUBLIC bool   GetTableArea( SCTAB nTab, SCCOL rEndCol, 
SCROW rEndRow ) const;
+SC_DLLPUBLIC void   GetFormattedAndUsedArea( SCTAB nTab, SCCOL 
rEndCol, SCROW rEndRow ) const;
 SC_DLLPUBLIC bool   GetPrintArea( SCTAB nTab, SCCOL rEndCol, 
SCROW rEndRow,
 bool bNotes = true ) const;
 SC_DLLPUBLIC bool   GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, 
SCROW nEndRow,
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 4f1fe38..10775e2 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -405,7 +405,7 @@ public:
 
 boolGetCellArea( SCCOL rEndCol, SCROW rEndRow ) const;   
 // FALSE = empty
 boolGetTableArea( SCCOL rEndCol, SCROW rEndRow ) const;
-boolGetPrintArea( SCCOL rEndCol, SCROW rEndRow, bool bNotes ) 
const;
+boolGetPrintArea( SCCOL rEndCol, SCROW rEndRow, bool bNotes, 
bool bFullFormattedArea = false ) const;
 boolGetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
 SCCOL rEndCol, bool bNotes ) const;
 boolGetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 2aa660a..5714e7c 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1831,7 +1831,7 @@ bool ScAttrArray::GetFirstVisibleAttr( SCROW rFirstRow ) 
const
 
 const SCROW SC_VISATTR_STOP = 84;
 
-bool ScAttrArray::GetLastVisibleAttr( SCROW rLastRow, SCROW nLastData ) const
+bool ScAttrArray::GetLastVisibleAttr( SCROW rLastRow, SCROW nLastData, bool 
bFullFormattedArea ) const
 {
 //  #i30830# changed behavior:
 //  ignore all attributes starting with the first run of SC_VISATTR_STOP 
equal rows
@@ -1862,7 +1862,7 @@ bool ScAttrArray::GetLastVisibleAttr( SCROW rLastRow, 
SCROW nLastData ) const
 if ( nAttrStartRow = nLastData )
 nAttrStartRow = nLastData + 1;
 SCROW nAttrSize = pData[nEndPos].nRow + 1 - nAttrStartRow;
-if ( nAttrSize = SC_VISATTR_STOP )
+if ( nAttrSize = SC_VISATTR_STOP  !bFullFormattedArea )
 {
 bFound = false;// ignore this range and below
 }
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 22d3da4..95b6cf8 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1443,14

[Libreoffice-commits] .: vcl/source

2012-03-27 Thread Noel Power
 vcl/source/window/toolbox.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 5ae64e4b0c23f209410fe84df041c9445234df74
Author: Noel Power noel.po...@novell.com
Date:   Tue Mar 27 12:32:05 2012 +0100

fix vertical align when switching mode in multibar fdo#44140

switching between SumAssign  OkCancel mode in the multibar results in a 
slight 'jumping' of the toolbar items when end up out of allignment with the 
other toolbar items.

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 4dc2458..7b317a1 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2722,7 +2722,19 @@ void ToolBox::ImplFormat( sal_Bool bResize )
 // if special TBX_LAYOUT_LOCKVERT lock vertical 
position
 // don't recalulate the vertical position of the item
 if ( meLayoutMode == TBX_LAYOUT_LOCKVERT  mnLines == 
1 )
-it-maCalcRect.Top()  =  it-maRect.Top();
+{
+// Somewhat of a hack here, calc deletes and 
re-adds
+// the sum/assign  ok/cancel items dynamically.
+// Because TBX_LAYOUT_LOCKVERT effectively prevents
+// recalculation of the vertical pos of an item the
+// it-maRect.Top() for those newly added items is
+// 0. The hack here is that we want to effectively
+// recalculate the vertical pos for those added
+// items here. ( Note: assume mnMaxItemHeight is
+// equal to the LineSize when multibar has a single
+// line size )
+it-maCalcRect.Top()  =  it-maRect.Top() ? 
it-maRect.Top() : ( nY + ( mnMaxItemHeight-aCurrentItemSize.Height())/2 );
+}
 else
 it-maCalcRect.Top()  = 
nY+(nLineSize-aCurrentItemSize.Height())/2;
 it-maCalcRect.Right()= 
nX+aCurrentItemSize.Width()-1;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oovbaapi/ooo oovbaapi/UnoApi_oovbaapi.mk vbahelper/source

2012-03-20 Thread Noel Power
 oovbaapi/UnoApi_oovbaapi.mk  |1 
 oovbaapi/ooo/vba/SystemColorConstants.idl|   31 +++
 oovbaapi/ooo/vba/msforms/XCheckBox.idl   |3 +
 oovbaapi/ooo/vba/msforms/XComboBox.idl   |3 +
 oovbaapi/ooo/vba/msforms/XCommandButton.idl  |3 +
 oovbaapi/ooo/vba/msforms/XImage.idl  |1 
 oovbaapi/ooo/vba/msforms/XLabel.idl  |2 +
 oovbaapi/ooo/vba/msforms/XTextBox.idl|3 +
 vbahelper/source/msforms/vbabutton.cxx   |   21 ++---
 vbahelper/source/msforms/vbabutton.hxx   |2 +
 vbahelper/source/msforms/vbacheckbox.cxx |   29 ++
 vbahelper/source/msforms/vbacheckbox.hxx |6 +++
 vbahelper/source/msforms/vbacombobox.cxx |   29 ++
 vbahelper/source/msforms/vbacombobox.hxx |6 +++
 vbahelper/source/msforms/vbacontrol.cxx  |   42 +++
 vbahelper/source/msforms/vbacontrol.hxx  |8 +
 vbahelper/source/msforms/vbaimage.cxx|   10 ++
 vbahelper/source/msforms/vbaimage.hxx|2 +
 vbahelper/source/msforms/vbalabel.cxx|   20 
 vbahelper/source/msforms/vbalabel.hxx|4 ++
 vbahelper/source/msforms/vbatextbox.cxx  |   30 +++
 vbahelper/source/msforms/vbatextbox.hxx  |7 
 vbahelper/source/msforms/vbatogglebutton.cxx |   20 ++--
 vbahelper/source/msforms/vbatogglebutton.hxx |2 +
 24 files changed, 275 insertions(+), 10 deletions(-)

New commits:
commit 092d6d9d6f9e6d79dd99d5f502ff39398622c2e1
Author: Noel Power noel.po...@novell.com
Date:   Tue Mar 20 15:35:30 2012 +

add vba support for BackColor, AutoSize, Locked attributes bnc#749960

diff --git a/oovbaapi/UnoApi_oovbaapi.mk b/oovbaapi/UnoApi_oovbaapi.mk
index 57a0c11..00eeb88 100644
--- a/oovbaapi/UnoApi_oovbaapi.mk
+++ b/oovbaapi/UnoApi_oovbaapi.mk
@@ -75,6 +75,7 @@ $(eval $(call 
gb_UnoApiTarget_add_idlfiles,oovbaapi,oovbaapi/ooo/vba,\
 VbMsgBoxStyle \
 VbQueryClose \
 VbStrConv \
+SystemColorConstants \
 VbTriState \
 VbVarType \
XApplicationBase \
diff --git a/oovbaapi/ooo/vba/SystemColorConstants.idl 
b/oovbaapi/ooo/vba/SystemColorConstants.idl
new file mode 100644
index 000..e0760f1
--- /dev/null
+++ b/oovbaapi/ooo/vba/SystemColorConstants.idl
@@ -0,0 +1,31 @@
+module ooo { module vba {
+constants SystemColorConstants {
+
+const long vbScrollBars = -2147483648;// 0x8000;
+const long vbDesktop = -2147483647; //0x8001;
+const long vbActiveTitleBar = -2147483646; //0x8002;
+const long vbInactiveTitleBar = -2147483645; //0x8003;
+const long vbMenuBar = -2147483644; //0x8004;
+const long vbWindowBackground = -2147483643; //0x8005;
+const long vbWindowFrame = -2147483642; //0x8006;
+const long vbMenuText = -2147483641; //0x8007;
+const long vbWindowText = -2147483640; //0x8008;
+const long vbTitleBarText = -2147483639; //0x8009;
+const long vbActiveBorder = -2147483638; //0x800A;
+const long vbInactiveBorder = -2147483637; //0x800B;
+const long vbApplicationWorkspace = -2147483636; //0x800C;
+const long vbHighlight = -2147483635; //0x800D;
+const long vbHighlightText = -2147483634; //0x800E;
+const long vbButtonFace = -2147483633; //0x800F;
+const long vbButtonShadow = -2147483632; //0x8010;
+const long vbGrayText = -2147483631; //0x8011;
+const long vbButtonText = -2147483630; //0x8012;
+const long vbInactiveCaptionText = -2147483629; //0x8013;
+const long vb3DHighlight = -2147483628; //0x8014;
+const long vb3DDKShadow = -2147483627; //0x8015;
+const long vb3DLight = -2147483626; //0x8016;
+const long vbInfoText = -2147483625; //0x8017;
+const long vbInfoBackground = -2147483624; //0x8018;
+
+};
+}; };
diff --git a/oovbaapi/ooo/vba/msforms/XCheckBox.idl 
b/oovbaapi/ooo/vba/msforms/XCheckBox.idl
index ec2c713..fc58d3e 100644
--- a/oovbaapi/ooo/vba/msforms/XCheckBox.idl
+++ b/oovbaapi/ooo/vba/msforms/XCheckBox.idl
@@ -39,6 +39,9 @@ interface XCheckBox: com::sun::star::uno::XInterface
 {
 [attribute] string Caption;
 [attribute] any Value;
+[attribute] long BackColor;
+[attribute] boolean AutoSize;
+[attribute] boolean Locked;
 [attribute, readonly] XNewFont Font;
 };
 
diff --git a/oovbaapi/ooo/vba/msforms/XComboBox.idl 
b/oovbaapi/ooo/vba/msforms/XComboBox.idl
index 77b5e95..7eacf25 100644
--- a/oovbaapi/ooo/vba/msforms/XComboBox.idl
+++ b/oovbaapi/ooo/vba/msforms/XComboBox.idl
@@ -49,6 +49,9 @@ interface XComboBox
 [attribute] long EnterFieldBehavior;
 [attribute] long ListStyle;
 [attribute] long TextAlign;
+[attribute] long BackColor;
+[attribute] boolean AutoSize;
+[attribute] boolean Locked;
 [attribute, readonly] long TextLength;
 [attribute, readonly] XNewFont Font;
 
diff --git

[Libreoffice-commits] .: oox/source

2012-03-15 Thread Noel Power
 oox/source/ole/vbamodule.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1bd695d3ddcbce48899a70130b5e948c48541d17
Author: Noel Power noel.po...@novell.com
Date:   Thu Mar 15 19:50:11 2012 +

fix mishandling of 'End Sub' is there is a trailing comment fod#46889

diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index 9f0e5ff..d5c1db3 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -313,7 +313,7 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, 
const Reference XNam
 procInfo.nPos = aSourceCode.getLength();
 }
 }
-else if ( mbExecutable  aCodeLine.trim().equalsAsciiL( 
RTL_CONSTASCII_STRINGPARAM(End Sub)) )
+else if ( mbExecutable  aCodeLine.trim().matchAsciiL( 
RTL_CONSTASCII_STRINGPARAM(End Sub)) )
 {
 // un-matched End Sub
 if ( !procInfo.bInProcedure )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-03-15 Thread Noel Power
 sc/source/ui/app/inputhdl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e3b1592165d0513e90e28dfee92bc9db032fa221
Author: Noel Power noel.po...@novell.com
Date:   Thu Mar 15 20:10:12 2012 +

fix to update inputbar when setting a range for a formula fdo#46809

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 29a40c5..7232ad3 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1811,7 +1811,7 @@ void ScInputHandler::UpdateActiveView()
 else
 pTableView = NULL;
 
-if (pInputWin  pInputWin-IsInputActive())
+if (pInputWin  eMode == SC_INPUT_TOP )
 pTopView = pInputWin-GetEditView();
 else
 pTopView = NULL;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2012-03-09 Thread Noel Power
 basic/source/classes/sbunoobj.cxx |   16 ++--
 basic/source/inc/sbunoobj.hxx |5 +++--
 basic/source/runtime/step1.cxx|8 +++-
 3 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 7dafa7a3b14441c6a27ab051db01f53e2c434f0a
Author: Noel Power noel.po...@novell.com
Date:   Fri Mar 9 18:44:44 2012 +

fix error comparing a struct vs an uno prop containing a struct fdo#42819

hack to fix the scenario where sometimes we get Object required error 
when comparing an uno property containing a struct with another struct ( if 
that property is MAYBEVOID )

diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 0988d79..9fb8b10 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2616,6 +2616,7 @@ SbUnoProperty::SbUnoProperty
 (
 const rtl::OUString aName_,
 SbxDataType eSbxType,
+SbxDataType eRealSbxType,
 const Property aUnoProp_,
 sal_Int32 nId_,
 bool bInvocation
@@ -2624,6 +2625,7 @@ SbUnoProperty::SbUnoProperty
 , aUnoProp( aUnoProp_ )
 , nId( nId_ )
 , mbInvocation( bInvocation )
+, mRealType( eRealSbxType )
 {
 // as needed establish an dummy array so that SbiRuntime::CheckArray() 
works
 static SbxArrayRef xDummyArray = new SbxArray( SbxVARIANT );
@@ -2670,8 +2672,9 @@ SbxVariable* SbUnoObject::Find( const String rName, 
SbxClassType t )
 else
 eSbxType = unoToSbxType( rProp.Type.getTypeClass() );
 
+SbxDataType eRealSbxType = ( ( rProp.Attributes  
PropertyAttribute::MAYBEVOID ) ? unoToSbxType( rProp.Type.getTypeClass() ) : 
eSbxType );
 // create the property and superimpose it
-SbxVariableRef xVarRef = new SbUnoProperty( rProp.Name, 
eSbxType, rProp, 0, false );
+SbxVariableRef xVarRef = new SbUnoProperty( rProp.Name, 
eSbxType, eRealSbxType, rProp, 0, false );
 QuickInsert( (SbxVariable*)xVarRef );
 pRes = xVarRef;
 }
@@ -2740,7 +2743,7 @@ SbxVariable* SbUnoObject::Find( const String rName, 
SbxClassType t )
 if( mxInvocation-hasProperty( aUName ) )
 {
 // create a property and superimpose it
-SbxVariableRef xVarRef = new SbUnoProperty( aUName, 
SbxVARIANT, aDummyProp, 0, true );
+SbxVariableRef xVarRef = new SbUnoProperty( aUName, 
SbxVARIANT, SbxVARIANT, aDummyProp, 0, true );
 QuickInsert( (SbxVariable*)xVarRef );
 pRes = xVarRef;
 }
@@ -2799,15 +2802,15 @@ void SbUnoObject::implCreateDbgProperties( void )
 Property aProp;
 
 // Id == -1: display the implemented interfaces corresponding the 
ClassProvider
-SbxVariableRef xVarRef = new SbUnoProperty( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_SUPPORTEDINTERFACES)), 
SbxSTRING, aProp, -1, false );
+SbxVariableRef xVarRef = new SbUnoProperty( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_SUPPORTEDINTERFACES)), 
SbxSTRING, SbxSTRING, aProp, -1, false );
 QuickInsert( (SbxVariable*)xVarRef );
 
 // Id == -2: output the properties
-xVarRef = new SbUnoProperty( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_PROPERTIES)), SbxSTRING, 
aProp, -2, false );
+xVarRef = new SbUnoProperty( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_PROPERTIES)), SbxSTRING, 
SbxSTRING, aProp, -2, false );
 QuickInsert( (SbxVariable*)xVarRef );
 
 // Id == -3: output the Methods
-xVarRef = new SbUnoProperty( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_METHODS)), SbxSTRING, aProp, 
-3, false );
+xVarRef = new SbUnoProperty( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_METHODS)), SbxSTRING, 
SbxSTRING, aProp, -3, false );
 QuickInsert( (SbxVariable*)xVarRef );
 }
 
@@ -2848,8 +2851,9 @@ void SbUnoObject::implCreateAll( void )
 else
 eSbxType = unoToSbxType( rProp.Type.getTypeClass() );
 
+SbxDataType eRealSbxType = ( ( rProp.Attributes  
PropertyAttribute::MAYBEVOID ) ? unoToSbxType( rProp.Type.getTypeClass() ) : 
eSbxType );
 // Create property and superimpose it
-SbxVariableRef xVarRef = new SbUnoProperty( rProp.Name, eSbxType, 
rProp, i, false );
+SbxVariableRef xVarRef = new SbUnoProperty( rProp.Name, eSbxType, 
eRealSbxType, rProp, i, false );
 QuickInsert( (SbxVariable*)xVarRef );
 }
 
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 5e833c2..f27e99a 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -138,15 +138,16 @@ class SbUnoProperty : public SbxProperty
 sal_Int32 nId;
 
 bool mbInvocation;  // Property is based on invocation
-
+SbxDataType mRealType;
 virtual ~SbUnoProperty();
 public:
 TYPEINFO();
-SbUnoProperty( const rtl::OUString aName_, SbxDataType

[Libreoffice-commits] .: solenv/gbuild

2012-03-08 Thread Noel Power
 solenv/gbuild/platform/WNT_INTEL_MSC.mk |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c3d806be7d30a437607d924a4d33f13fe20dd1ba
Author: Noel Power noel.po...@novell.com
Date:   Thu Mar 8 16:01:36 2012 +

fix uno bootstrapping for .NET ( and perhaps c++ ) fdo#46832

diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk 
b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index dc661d1..91d2be7 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -366,7 +366,9 @@ $(call gb_Helper_abbreviate_dirs_native,\
$(if $(filter-out StaticLibrary,$(TARGETTYPE)),user32.lib) \
$(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); 
RC=$$?; rm $${RESPONSEFILE} \
$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1)  false; 
fi) \
-   $(if $(filter Executable,$(TARGETTYPE)),; if [ -f $@.manifest ]; then 
mt.exe $(MTFLAGS) -manifest $@.manifest -outputresource:$@\;1; fi) ; exit $$RC)
+$(if $(filter Library,$(TARGETTYPE)),; if [ -f $(DLLTARGET).manifest 
]; then mt.exe $(MTFLAGS) -manifest $(DLLTARGET).manifest 
-outputresource:$(DLLTARGET)\;2; fi) \
+$(if $(filter Executable,$(TARGETTYPE)),; if [ -f $(1).manifest ]; 
then mt.exe $(MTFLAGS) -manifest $(1).manifest -outputresource:$(1)\;1; fi) \
+; exit $$RC)
 endef
 
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

2012-03-06 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 0dfd481888abcb14b601ca039692e9d83c1be19a
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Tue Mar 6 01:16:43 2012 +0100

don't crash when scrolling in input line, fdo#46975

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3e53062..b7592e3 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1609,6 +1609,10 @@ void ScTextWnd::Command( const CommandEvent rCEvt )
 rBindings.Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
 }
 }
+else if ( nCommand == COMMAND_WHEEL )
+{
+//don't call InputChanged for COMMAND_WHEEL
+}
 else
 SC_MOD()-InputChanged( pEditView );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: filter/inc filter/source oovbaapi/ooo vbahelper/inc vbahelper/source

2012-03-05 Thread Noel Power
 filter/inc/filter/msfilter/msvbahelper.hxx|4 
 filter/source/msfilter/msvbahelper.cxx|  128 ++
 oovbaapi/ooo/vba/XApplicationBase.idl |2 
 vbahelper/inc/vbahelper/vbaapplicationbase.hxx|1 
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |   49 
 5 files changed, 181 insertions(+), 3 deletions(-)

New commits:
commit 75fbed472cd689c8cc0b89e13a97969d77a0ea7c
Author: Noel Power noel.po...@novell.com
Date:   Mon Mar 5 14:54:04 2012 +

vba implementation for Application.OnKey

diff --git a/filter/inc/filter/msfilter/msvbahelper.hxx 
b/filter/inc/filter/msfilter/msvbahelper.hxx
index affc8b2..99b20c1 100644
--- a/filter/inc/filter/msfilter/msvbahelper.hxx
+++ b/filter/inc/filter/msfilter/msvbahelper.hxx
@@ -33,8 +33,8 @@
 #include com/sun/star/lang/XInitialization.hpp
 #include com/sun/star/lang/XServiceInfo.hpp
 #include com/sun/star/script/vba/XVBAMacroResolver.hpp
+#include com/sun/star/awt/KeyEvent.hpp
 #include filter/msfilter/msfilterdllapi.h
-
 namespace ooo {
 namespace vba {
 
@@ -55,7 +55,7 @@ MSFILTER_DLLPUBLIC ::rtl::OUString getDefaultProjectName( 
SfxObjectShell* pShell
 MSFILTER_DLLPUBLIC ::rtl::OUString resolveVBAMacro( SfxObjectShell* pShell, 
const ::rtl::OUString rLibName, const ::rtl::OUString rModuleName, const 
::rtl::OUString rMacroName );
 MSFILTER_DLLPUBLIC MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, 
const ::rtl::OUString rMacroName, bool bSearchGlobalTemplates = false );
 MSFILTER_DLLPUBLIC sal_Bool executeMacro( SfxObjectShell* pShell, const 
String sMacroName, com::sun::star::uno::Sequence com::sun::star::uno::Any  
aArgs, com::sun::star::uno::Any aRet, const com::sun::star::uno::Any aCaller 
);
-
+MSFILTER_DLLPUBLIC ::com::sun::star::awt::KeyEvent parseKeyEvent( const 
::rtl::OUString sKey ) throw (::com::sun::star::uno::RuntimeException);
 // 
 
 typedef ::cppu::WeakImplHelper3
diff --git a/filter/source/msfilter/msvbahelper.cxx 
b/filter/source/msfilter/msvbahelper.cxx
index 07a40c0..fb4fd3d 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -42,6 +42,10 @@
 #include osl/file.hxx
 #include unotools/pathoptions.hxx
 
+#include com/sun/star/awt/KeyModifier.hpp
+#include svtools/acceleratorexecute.hxx
+#include map
+
 using namespace ::com::sun::star;
 
 namespace ooo {
@@ -580,6 +584,130 @@ void SAL_CALL VBAMacroResolver::initialize( const 
uno::Sequence uno::Any  rAr
 OSL_ENSURE( false, VBAMacroResolver::resolveScriptURLtoVBAMacro - not 
implemented );
 throw uno::RuntimeException();
 }
+bool getModifier( char c, sal_uInt16 mod )
+{
+static const char modifiers[] = +^%;
+static const sal_uInt16 KEY_MODS[] = {KEY_SHIFT, KEY_MOD1, KEY_MOD2};
+
+for ( unsigned int i=0; iSAL_N_ELEMENTS(modifiers); ++i )
+{
+if ( c == modifiers[i] )
+{
+mod = mod | KEY_MODS[ i ];
+return true;
+}
+}
+return false;
+}
+
+typedef std::map rtl::OUString, sal_uInt16  MSKeyCodeMap;
+
+sal_uInt16 parseChar( char c ) throw ( uno::RuntimeException )
+{
+sal_uInt16 nVclKey = 0;
+// do we care about locale here for isupper etc. ? probably not
+if ( isalpha( c ) )
+nVclKey |= ( toupper( c ) - 'A' ) + KEY_A;
+else if ( isdigit( c ) )
+nVclKey |= ( c  - '0' ) + KEY_0;
+else if ( c == '~' ) // special case
+nVclKey = KEY_RETURN;
+else // I guess we have a problem ( but not sure if locale specific keys 
might come into play here )
+throw uno::RuntimeException();
+return nVclKey;
+}
+
+struct KeyCodeEntry
+{
+   const char* sName;
+   sal_uInt16 nCode;
+};
+
+KeyCodeEntry aMSKeyCodesData[] = {
+{ BACKSPACE, KEY_BACKSPACE },
+{ BS, KEY_BACKSPACE },
+{ DELETE, KEY_DELETE },
+{ DEL, KEY_DELETE },
+{ DOWN, KEY_DOWN },
+{ UP, KEY_UP },
+{ LEFT, KEY_LEFT },
+{ RIGHT, KEY_RIGHT },
+{ END, KEY_END },
+{ ESCAPE, KEY_ESCAPE },
+{ ESC, KEY_ESCAPE },
+{ HELP, KEY_HELP },
+{ HOME, KEY_HOME },
+{ PGDN, KEY_PAGEDOWN },
+{ PGUP, KEY_PAGEUP },
+{ INSERT, KEY_INSERT },
+{ F1, KEY_F1 },
+{ F2, KEY_F2 },
+{ F3, KEY_F3 },
+{ F4, KEY_F4 },
+{ F5, KEY_F5 },
+{ F6, KEY_F6 },
+{ F7, KEY_F7 },
+{ F8, KEY_F8 },
+{ F9, KEY_F1 },
+{ F10, KEY_F10 },
+{ F11, KEY_F11 },
+{ F12, KEY_F12 },
+{ F13, KEY_F13 },
+{ F14, KEY_F14 },
+{ F15, KEY_F15 },
+};
+
+awt::KeyEvent parseKeyEvent( const ::rtl::OUString Key ) throw ( 
uno::RuntimeException )
+{
+static MSKeyCodeMap msKeyCodes;
+if ( msKeyCodes.empty() )
+{
+for ( unsigned int i = 0; i  SAL_N_ELEMENTS( aMSKeyCodesData ); ++i )
+{
+msKeyCodes[ rtl::OUString::createFromAscii( aMSKeyCodesData[ i 
].sName ) ] = aMSKeyCodesData[ i ].nCode;
+}
+}
+rtl::OUString sKeyCode

[Libreoffice-commits] .: filter/inc filter/source oox/source vbahelper/source

2012-03-05 Thread Noel Power
 filter/inc/filter/msfilter/msvbahelper.hxx|2 
 filter/source/msfilter/msvbahelper.cxx|   50 +-
 oox/source/ole/vbamodule.cxx  |   36 +++
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |   28 
 4 files changed, 87 insertions(+), 29 deletions(-)

New commits:
commit 14620c3b33cf0315a9b746a0a2418b78d6154821
Author: Noel Power noel.po...@novell.com
Date:   Mon Mar 5 20:14:13 2012 +

support import of key shortcut for macro ( Excel only )

diff --git a/filter/inc/filter/msfilter/msvbahelper.hxx 
b/filter/inc/filter/msfilter/msvbahelper.hxx
index 99b20c1..e7e6533 100644
--- a/filter/inc/filter/msfilter/msvbahelper.hxx
+++ b/filter/inc/filter/msfilter/msvbahelper.hxx
@@ -34,6 +34,7 @@
 #include com/sun/star/lang/XServiceInfo.hpp
 #include com/sun/star/script/vba/XVBAMacroResolver.hpp
 #include com/sun/star/awt/KeyEvent.hpp
+#include com/sun/star/frame/XModel.hpp
 #include filter/msfilter/msfilterdllapi.h
 namespace ooo {
 namespace vba {
@@ -56,6 +57,7 @@ MSFILTER_DLLPUBLIC ::rtl::OUString resolveVBAMacro( 
SfxObjectShell* pShell, cons
 MSFILTER_DLLPUBLIC MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, 
const ::rtl::OUString rMacroName, bool bSearchGlobalTemplates = false );
 MSFILTER_DLLPUBLIC sal_Bool executeMacro( SfxObjectShell* pShell, const 
String sMacroName, com::sun::star::uno::Sequence com::sun::star::uno::Any  
aArgs, com::sun::star::uno::Any aRet, const com::sun::star::uno::Any aCaller 
);
 MSFILTER_DLLPUBLIC ::com::sun::star::awt::KeyEvent parseKeyEvent( const 
::rtl::OUString sKey ) throw (::com::sun::star::uno::RuntimeException);
+MSFILTER_DLLPUBLIC void applyShortCutKeyBinding ( const 
::com::sun::star::uno::Reference com::sun::star::frame::XModel  rxDoc, const 
::com::sun::star::awt::KeyEvent rKeyEvent, const ::rtl::OUString sMacro ) 
throw (::com::sun::star::uno::RuntimeException);
 // 
 
 typedef ::cppu::WeakImplHelper3
diff --git a/filter/source/msfilter/msvbahelper.cxx 
b/filter/source/msfilter/msvbahelper.cxx
index fb4fd3d..4c7d3f9 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -44,6 +44,8 @@
 
 #include com/sun/star/awt/KeyModifier.hpp
 #include svtools/acceleratorexecute.hxx
+#include com/sun/star/ui/XUIConfigurationManagerSupplier.hpp
+#include com/sun/star/ui/XUIConfigurationManager.hpp
 #include map
 
 using namespace ::com::sun::star;
@@ -584,6 +586,7 @@ void SAL_CALL VBAMacroResolver::initialize( const 
uno::Sequence uno::Any  rAr
 OSL_ENSURE( false, VBAMacroResolver::resolveScriptURLtoVBAMacro - not 
implemented );
 throw uno::RuntimeException();
 }
+
 bool getModifier( char c, sal_uInt16 mod )
 {
 static const char modifiers[] = +^%;
@@ -607,11 +610,17 @@ sal_uInt16 parseChar( char c ) throw ( 
uno::RuntimeException )
 sal_uInt16 nVclKey = 0;
 // do we care about locale here for isupper etc. ? probably not
 if ( isalpha( c ) )
+{
 nVclKey |= ( toupper( c ) - 'A' ) + KEY_A;
+if ( isupper( c ) )
+nVclKey |= KEY_SHIFT;
+}
 else if ( isdigit( c ) )
 nVclKey |= ( c  - '0' ) + KEY_0;
 else if ( c == '~' ) // special case
 nVclKey = KEY_RETURN;
+else if ( c == ' ' ) // special case
+nVclKey = KEY_SPACE;
 else // I guess we have a problem ( but not sure if locale specific keys 
might come into play here )
 throw uno::RuntimeException();
 return nVclKey;
@@ -640,6 +649,9 @@ KeyCodeEntry aMSKeyCodesData[] = {
 { PGDN, KEY_PAGEDOWN },
 { PGUP, KEY_PAGEUP },
 { INSERT, KEY_INSERT },
+{ SCROLLLOCK, KEY_SCROLLLOCK },
+{ NUMLOCK, KEY_NUMLOCK },
+{ TAB, KEY_TAB },
 { F1, KEY_F1 },
 { F2, KEY_F2 },
 { F3, KEY_F3 },
@@ -675,7 +687,7 @@ awt::KeyEvent parseKeyEvent( const ::rtl::OUString Key ) 
throw ( uno::RuntimeEx
 {
 if ( ! getModifier( Key[ i ], nVclKey ) )
 {
-sKeyCode = Key.copy( i ).trim();
+sKeyCode = Key.copy( i );
 break;
 }
 }
@@ -709,6 +721,42 @@ awt::KeyEvent parseKeyEvent( const ::rtl::OUString Key ) 
throw ( uno::RuntimeEx
 return aKeyEvent;
 }
 
+void applyShortCutKeyBinding ( const uno::Reference frame::XModel  rxModel, 
const awt::KeyEvent rKeyEvent, const ::rtl::OUString rMacroName ) throw 
(uno::RuntimeException)
+{
+rtl::OUString MacroName( rMacroName );
+if ( !MacroName.isEmpty() )
+{
+::rtl::OUString sSeparator(RTL_CONSTASCII_USTRINGPARAM(/));
+::rtl::OUString sMacroSeparator(RTL_CONSTASCII_USTRINGPARAM(!));
+::rtl::OUString aMacroName = MacroName.trim();
+if (0 == aMacroName.indexOf('!'))
+MacroName = aMacroName.copy(1).trim();
+SfxObjectShell* pShell = NULL;
+if ( rxModel.is() )
+{
+uno::Reference lang::XUnoTunnel   xObjShellTunnel

[Libreoffice-commits] .: oox/source

2012-03-02 Thread Noel Power
 oox/source/ole/vbamodule.cxx |   48 +++
 1 file changed, 48 insertions(+)

New commits:
commit 24b402d67eb9acc7ff1f0afeee7237f6b3b14644
Author: Noel Power noel.po...@novell.com
Date:   Fri Mar 2 13:04:18 2012 +

weed out unmatched Sub/End Sub statements when importing VBA fdo#46889

diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index 585f28d..d4b041b 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -221,6 +221,7 @@ void VbaModule::createEmptyModule( const Reference 
XNameContainer  rxBasicLib
 OUString VbaModule::readSourceCode( StorageBase rVbaStrg, const Reference 
XNameContainer  rxOleNameOverrides ) const
 {
 OUStringBuffer aSourceCode;
+const static rtl::OUString sUnmatchedRemovedTag( 
RTL_CONSTASCII_USTRINGPARAM( Rem removed unmatched Sub/End:  ) );
 if( !maStreamName.isEmpty()  (mnOffset != SAL_MAX_UINT32) )
 {
 BinaryXInputStream aInStrm( rVbaStrg.openInputStream( maStreamName ), 
true );
@@ -234,6 +235,14 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, 
const Reference XNam
 VbaInputStream aVbaStrm( aInStrm );
 // load the source code line-by-line, with some more processing
 TextInputStream aVbaTextStrm( mxContext, aVbaStrm, meTextEnc );
+
+struct ProcedurePair
+{
+bool bInProcedure;
+sal_uInt32 nPos;
+ProcedurePair() : bInProcedure( false ), nPos( 0 ) {};
+} procInfo;
+
 while( !aVbaTextStrm.isEof() )
 {
 OUString aCodeLine = aVbaTextStrm.readLine();
@@ -244,6 +253,45 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, 
const Reference XNam
 }
 else
 {
+// Hack here to weed out any unmatched End Sub / Sub Foo 
statements.
+// The behaviour of the vba ide practically guarantees the 
case and
+// spacing of Sub statement(s). However, indentation can 
be arbitrary hence
+// the trim.
+rtl::OUString trimLine( aCodeLine.trim() );
+if ( mbExecutable  (
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Sub ) 
) ||
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Public 
Sub ) )  ||
+  trimLine.matchAsciiL( 
RTL_CONSTASCII_STRINGPARAM(Private Sub ) ) ||
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Static 
Sub ) ) ) )
+{
+// this should never happen, basic doesn't support 
nested procedures
+// first Sub Foo must be bogus
+if ( procInfo.bInProcedure )
+{
+// comment out the line
+aSourceCode.insert( procInfo.nPos, 
sUnmatchedRemovedTag );
+// mark location of this Sub
+procInfo.nPos = aSourceCode.getLength();
+}
+else
+{
+procInfo.bInProcedure = true;
+procInfo.nPos = aSourceCode.getLength();
+}
+}
+else if ( mbExecutable  aCodeLine.trim().equalsAsciiL( 
RTL_CONSTASCII_STRINGPARAM(End Sub)) )
+{
+// un-matched End Sub
+if ( !procInfo.bInProcedure )
+{
+aSourceCode.append( sUnmatchedRemovedTag );
+}
+else
+{
+procInfo.bInProcedure = false;
+procInfo.nPos = 0;
+}
+}
 // normal source code line
 if( !mbExecutable )
 aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( 
Rem  ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svx/source

2012-03-01 Thread Noel Power
 svx/source/form/datanavi.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7b860d4970604f08ebd2e818bfd63891dd940804
Author: Noel Power noel.po...@novell.com
Date:   Thu Mar 1 12:10:56 2012 +

fix crash using instances dialog of dataform navigator fdo#44816

also silence a valgrind  'Conditional jump or move depends on uninitialised 
value(s)' where initial state of a checkbox was undefined

diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 38543c6..ebdaff3 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -304,7 +304,8 @@ namespace svxform
 m_pNaviWin  ( _pNaviWin ),
 m_bHasModel ( false ),
 m_eGroup( _eGroup ),
-m_TbxImageList  ( SVX_RES( IL_TBX_BMPS ) )
+m_TbxImageList  ( SVX_RES( IL_TBX_BMPS ) ),
+m_bLinkOnce ( false )
 
 {
 FreeResource();
@@ -1881,7 +1882,6 @@ namespace svxform
 m_aTabCtrl.SetPageText( nId, sNewName );
 bIsDocModified = true;
 }
-delete(pPage);
 }
 break;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - extensions/source

2012-02-23 Thread Noel Power
 extensions/source/ole/unoconversionutilities.hxx |   67 ---
 1 file changed, 26 insertions(+), 41 deletions(-)

New commits:
commit 39d26132445c158b4035b689e8939c8e7fb2d4ee
Author: Joachim Lingner j...@openoffice.org
Date:   Thu Feb 23 12:38:36 2012 +

default conversion of sequences is now again SAFEARRAY of VARIANTs #fdo46165

cws jl166 patch: #i117010# default conversion of sequences is now again 
SAFEARRAY of VARIANTs

Signed-off-by: Michael Meeks michael.me...@suse.com

diff --git a/extensions/source/ole/unoconversionutilities.hxx 
b/extensions/source/ole/unoconversionutilities.hxx
index b6ac7f1..1aae119 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -1318,47 +1318,32 @@ SAFEARRAY*  
UnoConversionUtilitiesT::createUnoSequenceWrapper(const Any rSeq)
 
 typelib_TypeDescription* pSeqElementDesc= NULL;
 TYPELIB_DANGER_GET( pSeqElementDesc, pSeqElementTypeRef);
+sal_Int32 nElementSize= pSeqElementDesc-nSize;
+n= punoSeq-nElements;
 
-// try to find VARIANT type that is related to the UNO type of the 
sequence elements
-// the sequence as a sequence element should be handled in a special way
-VARTYPE eTargetElementType = VT_EMPTY;
-if ( pSeqElementDesc-eTypeClass != TypeClass_SEQUENCE )
-eTargetElementType = mapTypeClassToVartype( static_cast TypeClass ( 
pSeqElementDesc-eTypeClass ) );
+SAFEARRAYBOUND rgsabound[1];
+rgsabound[0].lLbound = 0;
+rgsabound[0].cElements = n;
+VARIANT oleElement;
+long safeI[1];
 
-if ( eTargetElementType != VT_EMPTY )
-pArray = createUnoSequenceWrapper( rSeq, eTargetElementType );
+pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
 
-if ( !pArray )
-{
-sal_Int32 nElementSize= pSeqElementDesc-nSize;
-n= punoSeq-nElements;
-
-SAFEARRAYBOUND rgsabound[1];
-rgsabound[0].lLbound = 0;
-rgsabound[0].cElements = n;
-VARIANT oleElement;
-long safeI[1];
-
-pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
-
-Any unoElement;
-//  sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq-pElements;
-sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq-elements;
+Any unoElement;
+sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq-elements;
 
-for (sal_uInt32 i = 0; i  n; i++)
-{
-unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc);
-VariantInit(oleElement);
+for (sal_uInt32 i = 0; i  n; i++)
+{
+unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc);
+VariantInit(oleElement);
 
-anyToVariant(oleElement, unoElement);
+anyToVariant(oleElement, unoElement);
 
-safeI[0] = i;
-SafeArrayPutElement(pArray, safeI, oleElement);
+safeI[0] = i;
+SafeArrayPutElement(pArray, safeI, oleElement);
 
-VariantClear(oleElement);
-}
+VariantClear(oleElement);
 }
-
 TYPELIB_DANGER_RELEASE( pSeqElementDesc);
 
 return pArray;
commit 84a70824e2acbb50728540b4944c4243b6bd8e21
Author: Noel Power noel.po...@novell.com
Date:   Thu Feb 23 12:36:05 2012 +

Revert fix handling of SAFEARRAY(s) returned as variant in olebridge 
(fdo#38441)

This reverts commit 3fcb94311fd7dd40c05ca132e3a30a888316cbbe.

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/extensions/source/ole/unoconversionutilities.hxx 
b/extensions/source/ole/unoconversionutilities.hxx
index 359009e..b6ac7f1 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -134,7 +134,7 @@ public:
 /** @exception com.sun.star.lang.IllegalArgumentException
 If rSeq does not contain a sequence then the exception is thrown.
 */
-VARTYPE createUnoSequenceWrapper(const Any rSeq, SAFEARRAY* pOutArray );
+SAFEARRAY*  createUnoSequenceWrapper(const Any rSeq);
 /** @exception com.sun.star.lang.IllegalArgumentException
 If rSeq does not contain a sequence or elemtype has no proper value
 then the exception is thrown.
@@ -779,12 +779,11 @@ void UnoConversionUtilitiesT::anyToVariant(VARIANT* 
pVariant, const Any rAny)
 }
 case TypeClass_SEQUENCE:// sequence ??? SafeArray descriptor
 {
-SAFEARRAY* pOutArray = NULL;
-VARTYPE eArrayType = createUnoSequenceWrapper(rAny, pOutArray );
-if (pOutArray)
+SAFEARRAY* pArray = createUnoSequenceWrapper(rAny);
+if (pArray)
 {
-V_VT(pVariant) = VT_ARRAY | eArrayType;
-V_ARRAY(pVariant) = pOutArray;
+V_VT(pVariant) = VT_ARRAY | VT_VARIANT;
+V_ARRAY(pVariant) = pArray;
 }
 else
 {
@@ -1296,8 +1295,9 @@ void  
UnoConversionUtilitiesT

[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 2 commits - extensions/source

2012-02-23 Thread Noel Power
 extensions/source/ole/unoconversionutilities.hxx |   67 ---
 1 file changed, 26 insertions(+), 41 deletions(-)

New commits:
commit 21f1ed4c20b6409037ac215ec96abcacd581660e
Author: Joachim Lingner j...@openoffice.org
Date:   Thu Feb 23 15:47:49 2012 +

default conversion of sequences is now again SAFEARRAY of VARIANTs #fdo46165

cws jl166 patch: #i117010# default conversion of sequences is now again 
SAFEARRAY of VARIANTs

Signed-off-by: Michael Meeks michael.me...@suse.com

diff --git a/extensions/source/ole/unoconversionutilities.hxx 
b/extensions/source/ole/unoconversionutilities.hxx
index 328fec4..df2e402 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -1318,47 +1318,32 @@ SAFEARRAY*  
UnoConversionUtilitiesT::createUnoSequenceWrapper(const Any rSeq)
 
 typelib_TypeDescription* pSeqElementDesc= NULL;
 TYPELIB_DANGER_GET( pSeqElementDesc, pSeqElementTypeRef);
+sal_Int32 nElementSize= pSeqElementDesc-nSize;
+n= punoSeq-nElements;
 
-// try to find VARIANT type that is related to the UNO type of the 
sequence elements
-// the sequence as a sequence element should be handled in a special way
-VARTYPE eTargetElementType = VT_EMPTY;
-if ( pSeqElementDesc-eTypeClass != TypeClass_SEQUENCE )
-eTargetElementType = mapTypeClassToVartype( static_cast TypeClass ( 
pSeqElementDesc-eTypeClass ) );
+SAFEARRAYBOUND rgsabound[1];
+rgsabound[0].lLbound = 0;
+rgsabound[0].cElements = n;
+VARIANT oleElement;
+long safeI[1];
 
-if ( eTargetElementType != VT_EMPTY )
-pArray = createUnoSequenceWrapper( rSeq, eTargetElementType );
+pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
 
-if ( !pArray )
-{
-sal_Int32 nElementSize= pSeqElementDesc-nSize;
-n= punoSeq-nElements;
-
-SAFEARRAYBOUND rgsabound[1];
-rgsabound[0].lLbound = 0;
-rgsabound[0].cElements = n;
-VARIANT oleElement;
-long safeI[1];
-
-pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
-
-Any unoElement;
-// sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq-pElements;
-sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq-elements;
+Any unoElement;
+sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq-elements;
 
-for (sal_uInt32 i = 0; i  n; i++)
-{
-unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc);
-VariantInit(oleElement);
+for (sal_uInt32 i = 0; i  n; i++)
+{
+unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc);
+VariantInit(oleElement);
 
-anyToVariant(oleElement, unoElement);
+anyToVariant(oleElement, unoElement);
 
-safeI[0] = i;
-SafeArrayPutElement(pArray, safeI, oleElement);
+safeI[0] = i;
+SafeArrayPutElement(pArray, safeI, oleElement);
 
-VariantClear(oleElement);
-}
+VariantClear(oleElement);
 }
-
 TYPELIB_DANGER_RELEASE( pSeqElementDesc);
 
 return pArray; 
commit dcbc2f5417a96b34d2dab7a6ea1e30ce4fb6a8d2
Author: Noel Power noel.po...@novell.com
Date:   Thu Feb 23 15:16:23 2012 +

Revert fix handling of SAFEARRAY(s) returned as variant in olebridge 
(fdo#38441)

This reverts commit ab802aee181ca6df397ca53e461d5f53808cef9d.

Signed-off-by: Michael Meeksmichael.me...@suse.com

diff --git a/extensions/source/ole/unoconversionutilities.hxx 
b/extensions/source/ole/unoconversionutilities.hxx
index 99f49c9..328fec4 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -134,7 +134,7 @@ public:
 /** @exception com.sun.star.lang.IllegalArgumentException
 If rSeq does not contain a sequence then the exception is thrown.
 */
-VARTYPE createUnoSequenceWrapper(const Any rSeq, SAFEARRAY* pOutArray );
+SAFEARRAY* createUnoSequenceWrapper(const Any rSeq);
 /** @exception com.sun.star.lang.IllegalArgumentException
 If rSeq does not contain a sequence or elemtype has no proper value
 then the exception is thrown.
@@ -779,12 +779,11 @@ void UnoConversionUtilitiesT::anyToVariant(VARIANT* 
pVariant, const Any rAny)
 }
 case TypeClass_SEQUENCE:   // sequence ??? SafeArray 
descriptor
 {
-SAFEARRAY* pOutArray = NULL;
-VARTYPE eArrayType = createUnoSequenceWrapper(rAny, pOutArray );
-if (pOutArray)
+SAFEARRAY* pArray = createUnoSequenceWrapper(rAny);
+if (pArray)
 {
-V_VT(pVariant) = VT_ARRAY | eArrayType;
-V_ARRAY(pVariant) = pOutArray;
+V_VT(pVariant) = VT_ARRAY | VT_VARIANT;
+V_ARRAY(pVariant) = pArray

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - solenv/gbuild

2012-02-22 Thread Noel Power
 solenv/gbuild/JavaClassSet.mk |   10 +-
 solenv/gbuild/JunitTest.mk|8 
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 19ea1b173ae9004a438903d1cb4ac197d27bacee
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Fri Dec 9 14:31:53 2011 +0200

Don't misuse CLASSPATH for what goes into the -cp option to javac

CLASSPATH is supposed to show where to find the classes needed by Java
programs running at build time. The -cp switch to javac tells where to
find classes referenced by the code being compiled. These are
different things. (But it doesn't seem to have mattered much in our
build system.) So use T_CP instead, named in the same fashion as
T_CXXFLAGS etc.

But... for some reason this change, which as such should be just more
or less cosmetic, also fixes a build problem in the scripting module
on Windows, seen by Noel Grandin

(http://comments.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/19016
) and me.

Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index d8c648e..9104b9c 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -43,7 +43,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
$(filter-out $(JARDEPS),$(4)  \
$(if $(3),$(gb_JavaClassSet_JAVACCOMMAND) \
$(gb_JavaClassSet_JAVACDEBUG) \
-   -cp $(CLASSPATH)$(gb_CLASSPATHSEP)$(call 
gb_JavaClassSet_get_classdir,$(2)) \
+   -cp $(T_CP)$(gb_CLASSPATHSEP)$(call 
gb_JavaClassSet_get_classdir,$(2)) \
-d $(call gb_JavaClassSet_get_classdir,$(2)) \
@$$RESPONSEFILE ) \
rm -f $$RESPONSEFILE  \
@@ -60,8 +60,8 @@ $(call gb_JavaClassSet_get_clean_target,%) :
$(call gb_Helper_abbreviate_dirs,\
rm -rf $(dir $(call gb_JavaClassSet_get_target,$*)))
 
-# no initialization of scoped variable CLASSPATH as it is inherited from 
controlling instance (e.g. JUnitTest, Jar)
 # UGLY: cannot use target local variable for REPO because it's needed in prereq
+# No idea what above comment means, and whether still relevant
 define gb_JavaClassSet_JavaClassSet
 $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS :=
 endef
@@ -81,7 +81,7 @@ $(foreach sourcefile,$(2),$(call 
gb_JavaClassSet_add_sourcefile,$(1),$(sourcefil
 endef
 
 define gb_JavaClassSet_set_classpath
-$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := $(2))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := $(2))
 
 endef
 
@@ -89,13 +89,13 @@ endef
 # build order dependency is a hack to get these prerequisites out of the way 
in the build command
 define gb_JavaClassSet_add_jar
 $(eval $(call gb_JavaClassSet_get_target,$(1)) : $(2))
-$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := 
$$(CLASSPATH)$(gb_CLASSPATHSEP)$(strip $(2)))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := 
$$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2)))
 $(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2))
 endef
 
 # this does not generate dependency on the jar
 define gb_JavaClassSet_add_system_jar
-$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := 
$$(CLASSPATH)$(gb_CLASSPATHSEP)$(strip $(2)))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := 
$$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2)))
 $(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2))
 endef
 
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 5afe595..177cad6 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -47,7 +47,7 @@ $(call gb_JunitTest_get_target,%) :
 rm -rf $(call gb_JunitTest_get_userdir,$*)  \
mkdir -p $(call gb_JunitTest_get_userdir,$*)  \
 (DBGSV_ERROR_OUT=shell $(gb_JunitTest_JAVACOMMAND) \
--cp $(CLASSPATH) \
+-cp $(T_CP) \
 $(DEFS) \
 org.junit.runner.JUnitCore \
 $(CLASSES)  $@.log 21 || \
@@ -69,7 +69,7 @@ $(call gb_JunitTest_get_target,%) :
$(CLEAN_CMD)
 
 define gb_JunitTest_JunitTest
-$(call gb_JunitTest_get_target,$(1)) : CLASSPATH := $(value 
XCLASSPATH)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(call 
gb_JunitTest_get_classsetname,$(1)))$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(gb_CLASSPATHSEP)$(OUTDIR)/lib
+$(call gb_JunitTest_get_target,$(1)) : T_CP := $(value 
XCLASSPATH)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(call 
gb_JunitTest_get_classsetname,$(1)))$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(gb_CLASSPATHSEP)$(OUTDIR)/lib
 $(call gb_JunitTest_get_target,$(1)) : CLASSES :=
 $(call gb_JunitTest_JunitTest_platform,$(1))
 
@@ -105,12 +105,12 @@ $(foreach sourcefile,$(2),$(call 
gb_JunitTest_add_sourcefile,$(1),$(sourcefile))
 endef
 
 define gb_JunitTest_set_classpath
-$(call gb_JunitTest_get_target,$(1)) : CLASSPATH := $(2)
+$(call gb_JunitTest_get_target,$(1)) : T_CP := 

[Libreoffice-commits] .: basic/source

2012-02-21 Thread Noel Power
 basic/source/comp/io.cxx  |2 ++
 basic/source/comp/scanner.cxx |5 +++--
 basic/source/comp/token.cxx   |9 +
 basic/source/inc/scanner.hxx  |1 +
 4 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 634b211632847dcb04b31f478296e5e6d732ac73
Author: Noel Power noel.po...@novell.com
Date:   Tue Feb 21 12:22:32 2012 +

allow keyword Append to be used as a variable. bnc#745930

statements like
  Dim AppEnd As Integer
will generate compiler errors because Append is a special symbol/keyword in 
libreoffice basic. This restriction though is too strict because 'Append' is 
only such a keyword when used within the 'Open' statement ( where it refers to 
one of the possible values for a paramater ).

diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index df02a4e..efd34f2 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -178,6 +178,7 @@ void SbiParser::Input()
 
 void SbiParser::Open()
 {
+bInStatement = true;
 SbiExpression aFileName( this );
 SbiToken eTok;
 TestToken( FOR );
@@ -273,6 +274,7 @@ void SbiParser::Open()
 aGen.Gen( _OPEN, nMode, nFlags );
 delete pLen;
 delete pChan;
+bInStatement = false;
 }
 
 // NAME file AS file
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 872bdd7..a664e57 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -53,9 +53,10 @@ SbiScanner::SbiScanner( const ::rtl::OUString rBuf, 
StarBASIC* p ) : aBuf( rBuf
 bSymbol  =
 bCompatible =
 bVBASupportOn =
-bPrevLineExtentsComment = sal_False;
+bInStatement =
+bPrevLineExtentsComment = false;
 bHash=
-bErrors  = sal_True;
+bErrors  = true;
 }
 
 SbiScanner::~SbiScanner()
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index 63c9867..0ed6636 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -401,6 +401,15 @@ special:
 return eCurTok = SYMBOL;
 else if( tp-t == TEXT )
 return eCurTok = SYMBOL;
+// maybe we can expand this for other statements that have parameters
+// that are keywords ( and those keywords are only used within such
+// statements )
+// what's happening here is that if we come across 'append' ( and we are
+// not in the middle of parsing a special statement ( like 'Open')
+// we just treat keyword 'append' as a normal 'SYMBOL'.
+// Also we accept Dim APPEND
+else if ( ( !bInStatement || eCurTok == DIM )  tp-t == APPEND )
+return eCurTok = SYMBOL;
 
 // #i92642: Special LINE token handling - SbiParser::Line()
 
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 926706c..9e33f7a 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -73,6 +73,7 @@ protected:
 bool   bVBASupportOn;   // sal_True: OPTION VBASupport 1 
otherwise default False
 bool   bPrevLineExtentsComment; // sal_True: Previous line is comment 
and ends on ... _
 
+bool   bInStatement;
 void   GenError( SbError );
 public:
 SbiScanner( const ::rtl::OUString, StarBASIC* = NULL );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-02-16 Thread Noel Power
 oox/source/ole/vbamodule.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 2174d4d44eeb83378f76ea34086b8a1989b70b76
Author: Noel Power noel.po...@novell.com
Date:   Thu Feb 16 10:34:59 2012 +

use stream name for module names when importing vba. fdo#46151  bnc#747323

diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index d907051..585f28d 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -156,6 +156,9 @@ void VbaModule::importDirRecords( BinaryInputStream 
rDirStrm )
 break;
 case VBA_ID_MODULESTREAMNAME:
 maStreamName = aRecStrm.readCharArrayUC( nRecSize, meTextEnc );
+// Actually the stream name seems the best name to use
+// the VBA_ID_MODULENAME name can sometimes be the wrong case
+maName = maStreamName;
 break;
 case VBA_ID_MODULESTREAMNAMEUNICODE:
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - oox/source toolkit/inc toolkit/source

2012-02-13 Thread Noel Power
 oox/source/ole/axcontrol.cxx   |1 
 toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx |1 
 toolkit/inc/toolkit/controls/dialogcontrol.hxx |4 +
 toolkit/inc/toolkit/controls/unocontrols.hxx   |   13 +++
 toolkit/source/controls/controlmodelcontainerbase.cxx  |   25 ---
 toolkit/source/controls/dialogcontrol.cxx  |   35 --
 toolkit/source/controls/unocontrols.cxx|   44 -
 7 files changed, 89 insertions(+), 34 deletions(-)

New commits:
commit 58255c47b1d540fd2493b4ed132aa7fa82da156e
Author: Noel Power noel.po...@novell.com
Date:   Mon Feb 13 14:50:09 2012 +

handle imported picture attribute from MSO Dialog ( fdo#45995 )

diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 791920d..81a1f0e 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2496,6 +2496,7 @@ void AxUserFormModel::convertProperties( PropertyMap 
rPropMap, const ControlCon
 {
 rPropMap.setProperty( PROP_Title, maCaption );
 rConv.convertColor( rPropMap, PROP_BackgroundColor, mnBackColor );
+rConv.convertAxPicture( rPropMap, maPictureData, AX_PICPOS_CENTER  );
 AxContainerModelBase::convertProperties( rPropMap, rConv );
 }
 
commit 468c588875b4858711b708bbc66e0740263bb1f3
Author: Noel Power noel.po...@novell.com
Date:   Mon Feb 13 14:19:22 2012 +

fix support for embedded images for basic Dialogs ( fdo#45992 )

diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx 
b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
index 9e99968..d307c2a 100644
--- a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
@@ -234,7 +234,6 @@ protected:
 virtual voidImplSetPosSize( ::com::sun::star::uno::Reference 
::com::sun::star::awt::XControl  rxCtrl );
 voidImplUpdateResourceResolver();
 voidImplStartListingForResourceEvents();
-::com::sun::star::uno::Reference ::com::sun::star::graphic::XGraphic  
Impl_getGraphicFromURL_nothrow( const ::rtl::OUString _rURL );
 
 ControlContainerBase();
 
diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx 
b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
index 961d449..7c9a674 100644
--- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
@@ -34,6 +34,7 @@
 #include com/sun/star/awt/XDialog2.hpp
 #include com/sun/star/awt/XSimpleTabController.hpp
 #include com/sun/star/resource/XStringResourceResolver.hpp
+#include com/sun/star/graphic/XGraphicObject.hpp
 #include toolkit/helper/servicenames.hxx
 #include toolkit/helper/macros.hxx
 #include toolkit/controls/unocontrolcontainer.hxx
@@ -48,8 +49,11 @@
 class UnoControlDialogModel :   public ControlModelContainerBase
 {
 protected:
+::com::sun::star::uno::Reference 
::com::sun::star::graphic::XGraphicObject  mxGrfObj;
 ::com::sun::star::uno::Any  ImplGetDefaultValue( sal_uInt16 
nPropId ) const;
 ::cppu::IPropertyArrayHelper   SAL_CALL getInfoHelper();
+// ::cppu::OPropertySetHelper
+   void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, 
const ::com::sun::star::uno::Any rValue ) throw 
(::com::sun::star::uno::Exception);
 public:
 UnoControlDialogModel( const 
::com::sun::star::uno::Reference ::com::sun::star::lang::XMultiServiceFactory 
 i_factory );
 UnoControlDialogModel( const UnoControlDialogModel 
rModel );
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx 
b/toolkit/inc/toolkit/controls/unocontrols.hxx
index 201858d..2ed2cf7 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -72,6 +72,19 @@
 #define UNO_NAME_GRAPHOBJ_URLPREFIX 
vnd.sun.star.GraphicObject:
 #define UNO_NAME_GRAPHOBJ_URLPKGPREFIX  vnd.sun.star.Package:
 
+class ImageHelper
+{
+public:
+// The routine will always attempt to return a valid XGraphic for the
+// passed _rURL, additionallly xOutGraphicObject will contain the
+// associated XGraphicObject ( if url is valid for that ) and is set
+// appropriately ( e.g. NULL if non GraphicObject scheme ) or a valid
+// object if the rURL points to a valid object
+static ::com::sun::star::uno::Reference 
::com::sun::star::graphic::XGraphic  
getGraphicAndGraphicObjectFromURL_nothrow( ::com::sun::star::uno::Reference 
::com::sun::star::graphic::XGraphicObject  xOutGraphicObject, const 
::rtl::OUString _rURL );
+static ::com::sun::star::uno::Reference 
::com::sun::star::graphic::XGraphic  getGraphicFromURL_nothrow( const 
::rtl::OUString _rURL );
+
+};
+
 //  
 //  class UnoControlEditModel
 //  
diff --git

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

2012-02-13 Thread Noel Power
 sc/source/ui/inc/tpdefaults.hxx|7 -
 sc/source/ui/optdlg/tpdefaults.cxx |   49 +++--
 sc/source/ui/src/optdlg.src|6 ++--
 3 files changed, 46 insertions(+), 16 deletions(-)

New commits:
commit 0c998c462aa553f52b849a26e3ca8df077fb5622
Author: Noel Power noel.po...@novell.com
Date:   Mon Feb 13 15:20:58 2012 +

some very minor tweak(s) to Improvment-of-Custom-Sheet-Prefix-Option

a) allow blank default prefix
b) select the entire last good prefix is some illegal character used

diff --git a/sc/source/ui/optdlg/tpdefaults.cxx 
b/sc/source/ui/optdlg/tpdefaults.cxx
index ec29550..ba294c5 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -127,10 +127,12 @@ void ScTpDefaultsOptions::CheckPrefix(Edit* pEdit)
 
 OUString aSheetPrefix = pEdit-GetText();
 
-if ( !ScDocument::ValidTabName( aSheetPrefix ) )
+if ( !aSheetPrefix.isEmpty()  !ScDocument::ValidTabName( aSheetPrefix ) )
 {
-// Revert to last good Prefix
-pEdit-SetText( maOldPrefixValue );
+// Revert to last good Prefix and also select it to
+// indicate something illegal was typed
+Selection aSel( 0,  maOldPrefixValue.getLength() );
+pEdit-SetText( maOldPrefixValue, aSel );
 }
 else
 {
commit afeb347c909fa2deb37694d4b9fd6509ec305366
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Thu Feb 9 15:26:27 2012 +0100

Improvment of Custom Sheet Prefix Option

diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx
index 606d174..7369988 100644
--- a/sc/source/ui/inc/tpdefaults.hxx
+++ b/sc/source/ui/inc/tpdefaults.hxx
@@ -53,10 +53,12 @@ private:
 virtual ~ScTpDefaultsOptions();
 
 void CheckNumSheets();
-void CheckPrefix();
+void CheckPrefix(Edit* pEdit);
+void OnFocusPrefixInput(Edit* pEdit);
 
 DECL_LINK( NumModifiedHdl, NumericField* );
 DECL_LINK( PrefixModifiedHdl, Edit* );
+DECL_LINK( PrefixEditOnFocusHdl, Edit* );
 
 private:
 FixedLine aFLInitSpreadSheet;
@@ -65,6 +67,9 @@ private:
 FixedText aFtSheetPrefix;
 Edit  aEdSheetPrefix;
 
+// Stores old Sheet Prefix
+::rtl::OUString maOldPrefixValue;
+
 ::boost::shared_ptrScDocOptions mpOldOptions;
 ::boost::shared_ptrScDocOptions mpNewOptions;
 };
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx 
b/sc/source/ui/optdlg/tpdefaults.cxx
index 8c97c83..ec29550 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -29,8 +29,6 @@
 
 #undef SC_DLLIMPLEMENTATION
 
-#include vcl/msgbox.hxx
-
 #include tpdefaults.hxx
 #include optdlg.hrc
 #include scresid.hxx
@@ -49,9 +47,9 @@ ScTpDefaultsOptions::ScTpDefaultsOptions(Window *pParent, 
const SfxItemSet rCor
 SfxTabPage(pParent, ScResId(RID_SCPAGE_DEFAULTS), rCoreAttrs),
 aFLInitSpreadSheet ( this, ScResId( FL_INIT_SPREADSHEET ) ),
 aFtNSheets ( this, ScResId( FT_NSHEETS ) ),
-aEdNSheets( this, ScResId( ED_NSHEETS ) ),
-aFtSheetPrefix( this, ScResId( FT_SHEETPREFIX ) ),
-aEdSheetPrefix( this, ScResId( ED_SHEETPREFIX ) )
+aEdNSheets ( this, ScResId( ED_NSHEETS ) ),
+aFtSheetPrefix ( this, ScResId( FT_SHEETPREFIX ) ),
+aEdSheetPrefix ( this, ScResId( ED_SHEETPREFIX ) )
 {
 FreeResource();
 
@@ -70,9 +68,10 @@ ScTpDefaultsOptions::ScTpDefaultsOptions(Window *pParent, 
const SfxItemSet rCor
 Point aNewPoint = aEdNSheets.GetPosPixel();
 aNewPoint.X() += ( nTxtW - nCtrlW );
 aEdNSheets.SetPosPixel( aNewPoint );
-}
+   }
 aEdNSheets.SetModifyHdl( LINK(this, ScTpDefaultsOptions, NumModifiedHdl) );
 aEdSheetPrefix.SetModifyHdl( LINK(this, ScTpDefaultsOptions, 
PrefixModifiedHdl) );
+aEdSheetPrefix.SetGetFocusHdl( LINK(this, ScTpDefaultsOptions, 
PrefixEditOnFocusHdl) );
 }
 
 ScTpDefaultsOptions::~ScTpDefaultsOptions()
@@ -121,14 +120,31 @@ void ScTpDefaultsOptions::CheckNumSheets()
 aEdNSheets.SetValue(INIT_SHEETS_MIN);
 }
 
-void ScTpDefaultsOptions::CheckPrefix()
+void ScTpDefaultsOptions::CheckPrefix(Edit* pEdit)
 {
-OUString aSheetPrefix = aEdSheetPrefix.GetText();
+if (!pEdit)
+return;
+
+OUString aSheetPrefix = pEdit-GetText();
 
 if ( !ScDocument::ValidTabName( aSheetPrefix ) )
 {
- ErrorBox(this,WinBits(WB_OK|WB_DEF_OK), 
ScGlobal::GetRscString(STR_INVALIDTABNAME) ).Execute();
+// Revert to last good Prefix
+pEdit-SetText( maOldPrefixValue );
 }
+else
+{
+OnFocusPrefixInput(pEdit);
+}
+}
+
+void ScTpDefaultsOptions::OnFocusPrefixInput(Edit* pEdit)
+{
+if (!pEdit)
+return;
+
+// Store Prefix in case we need to revert
+maOldPrefixValue = pEdit-GetText();
 }
 
 
@@ -138,10 +154,17 @@ IMPL_LINK( ScTpDefaultsOptions, NumModifiedHdl, 
NumericField*, EMPTYARG )
 return 0;
 }
 
-IMPL_LINK

[Libreoffice-commits] .: sc/source

2012-02-07 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   17 +
 sc/source/ui/inc/inputwin.hxx |4 
 2 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 09d7b5e6039827d0f02f424370f929caff179ac9
Author: Noel Power noel.po...@novell.com
Date:   Tue Feb 7 15:36:29 2012 +

make ctrl-shift-f2 change focus to the inputline fdo#40957

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3771d37..ebdea66 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -697,7 +697,7 @@ void ScInputWindow::StopEditEngine( sal_Bool bAll )
 
 void ScInputWindow::TextGrabFocus()
 {
-aTextWindow.GrabFocus();
+aTextWindow.TextGrabFocus();
 }
 
 void ScInputWindow::TextInvalidate()
@@ -712,12 +712,13 @@ void ScInputWindow::SwitchToTextWin()
 aTextWindow.StartEditEngine();
 if ( SC_MOD()-IsEditMode() )
 {
-aTextWindow.GrabFocus();
+aTextWindow.TextGrabFocus();
 EditView* pView = aTextWindow.GetEditView();
 if (pView)
 {
-xub_StrLen nLen = pView-GetEditEngine()-GetTextLen(0);
-ESelection aSel( 0, nLen, 0, nLen );
+sal_uInt16 nPara =  pView-GetEditEngine()-GetParagraphCount() ? 
( pView-GetEditEngine()-GetParagraphCount() - 1 ) : 0;
+xub_StrLen nLen = pView-GetEditEngine()-GetTextLen( nPara );
+ESelection aSel( nPara, nLen, nPara, nLen );
 pView-SetSelection( aSel );// set cursor to end 
of text
 }
 }
@@ -1115,6 +1116,10 @@ IMPL_LINK( ScInputBarGroup, Impl_ScrollHdl, ScrollBar*, 
EMPTYARG )
 return 0;
 }
 
+void ScInputBarGroup::TextGrabFocus()
+{
+aMultiTextWnd.TextGrabFocus();
+}
 
 //
 //  ScMultiTextWnd
@@ -2022,6 +2027,10 @@ void ScTextWnd::DataChanged( const DataChangedEvent 
rDCEvt )
 Window::DataChanged( rDCEvt );
 }
 
+void ScTextWnd::TextGrabFocus()
+{
+GrabFocus();
+}
 
 //
 //  Positionsfenster
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 185ac45..b0facf1 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -65,6 +65,7 @@ public:
 virtual voidMakeDialogEditView() = 0;
 virtual voidSetFormulaMode( sal_Bool bSet ) = 0;
 virtual sal_BoolIsInputActive() = 0;
+virtual voidTextGrabFocus() = 0;
 };
 
 class ScTextWnd : public ScTextWndBase, public DragSourceHelper // edit 
window
@@ -85,6 +86,8 @@ public:
 virtual voidStartEditEngine();
 virtual voidStopEditEngine( sal_Bool bAll );
 
+virtual voidTextGrabFocus();
+
 virtual voidDataChanged( const DataChangedEvent rDCEvt );
 
 virtual voidSetFormulaMode( sal_Bool bSet );
@@ -225,6 +228,7 @@ public:
 virtual voidResize();
 virtual const String   GetTextString() const;
 virtual voidStopEditEngine( sal_Bool bAll );
+virtual voidTextGrabFocus();
 voidInitEditEngine(SfxObjectShell* pObjSh);
 voidSetFormulaMode( sal_Bool bSet );
 boolIsFocus();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 4 commits - officecfg/registry sc/source xmloff/inc xmloff/source

2012-02-07 Thread Noel Power
 officecfg/registry/data/org/openoffice/Office/Common.xcu |2 -
 sc/source/filter/xml/xmlstyle.cxx|4 +-
 xmloff/inc/xmloff/txtparae.hxx   |3 +
 xmloff/source/draw/sdpropls.cxx  |   23 +++
 xmloff/source/text/txtparae.cxx  |   30 ---
 5 files changed, 51 insertions(+), 11 deletions(-)

New commits:
commit dae8fff9289edbfda3317bd19acd233400528a95
Author: Michael Stahl mst...@redhat.com
Date:   Thu Feb 2 12:44:03 2012 +0100

fdo#45534: ODF export: fix draw:fit-to-size

In ODF 1.1 and 1.2 this attribute is of type boolean, so only write the
new values if the extended format is selected.
(regression introduced with e479f47f7d48dbd0d701bf347b6a2d5121ba3d34)

diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 88ffa2e..c5f77e5 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -619,6 +619,15 @@ SvXMLEnumMapEntry const pXML_VerticalAlign_Enum[] =
 { XML_TOKEN_INVALID, 0 }
 };
 
+SvXMLEnumMapEntry const pXML_FitToSize_Enum_Odf12[] =
+{
+{ XML_FALSE,drawing::TextFitToSizeType_NONE },
+{ XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL },
+{ XML_TRUE, drawing::TextFitToSizeType_ALLLINES },
+{ XML_TRUE, drawing::TextFitToSizeType_AUTOFIT },
+{ XML_TOKEN_INVALID, 0 }
+};
+
 SvXMLEnumMapEntry const pXML_FitToSize_Enum[] =
 {
 { XML_FALSE,drawing::TextFitToSizeType_NONE },
@@ -1047,7 +1056,19 @@ const XMLPropertyHandler* 
XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
 pHdl = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum, 
::getCppuType((const com::sun::star::drawing::TextVerticalAdjust*)0) );
 break;
 case XML_SD_TYPE_FITTOSIZE:
-pHdl = new XMLEnumPropertyHdl( pXML_FitToSize_Enum, 
::getCppuType((const com::sun::star::drawing::TextFitToSizeType*)0) );
+{
+if (mpExport  (mpExport-getDefaultVersion()
+= SvtSaveOptions::ODFVER_012))
+{
+pHdl = new 
XMLEnumPropertyHdl(pXML_FitToSize_Enum_Odf12,
+::getCppuType(static_castconst 
com::sun::star::drawing::TextFitToSizeType*(0)));
+}
+else
+{
+pHdl = new XMLEnumPropertyHdl(pXML_FitToSize_Enum,
+::getCppuType(static_castconst 
com::sun::star::drawing::TextFitToSizeType*(0)));
+}
+}
 break;
 case XML_SD_TYPE_MEASURE_UNIT:
 pHdl = new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum, 
::getCppuType((const sal_Int32*)0) );
commit c6bf0fdf82c9ba0626ea6356923d293820e75565
Author: Michael Stahl mst...@redhat.com
Date:   Wed Feb 1 21:32:14 2012 +0100

fdo#45450: sc: ODF export: cell styles:

Only write style:vertical-justify and css3t:text-justify in ODF
extended mode.
(regression from 7da57d17b6179e71c8b6d7549ad89eaf3a4a28c6)

diff --git a/sc/source/filter/xml/xmlstyle.cxx 
b/sc/source/filter/xml/xmlstyle.cxx
index 0e91a0d..7956c6f 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -90,7 +90,7 @@ const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
 MAP( HoriJustify, XML_NAMESPACE_FO, XML_TEXT_ALIGN, 
XML_TYPE_PROP_PARAGRAPH|XML_SC_TYPE_HORIJUSTIFY|MID_FLAG_MERGE_PROPERTY, 0 ),
 MAP( HoriJustify, XML_NAMESPACE_STYLE, XML_TEXT_ALIGN_SOURCE, 
XML_TYPE_PROP_TABLE_CELL|XML_SC_TYPE_HORIJUSTIFYSOURCE|MID_FLAG_MERGE_PROPERTY, 
0 ),
 MAP( HoriJustify, XML_NAMESPACE_STYLE, XML_REPEAT_CONTENT, 
XML_TYPE_PROP_TABLE_CELL|XML_SC_TYPE_HORIJUSTIFYREPEAT|MID_FLAG_MERGE_PROPERTY, 
0 ),
-MAP( SC_UNONAME_CELLHJUS_METHOD, XML_NAMESPACE_CSS3TEXT, XML_TEXT_JUSTIFY, 
XML_TYPE_PROP_PARAGRAPH|XML_SC_TYPE_HORIJUSTIFY_METHOD, 0 ),
+MAP_EXT( SC_UNONAME_CELLHJUS_METHOD, XML_NAMESPACE_CSS3TEXT, 
XML_TEXT_JUSTIFY, XML_TYPE_PROP_PARAGRAPH|XML_SC_TYPE_HORIJUSTIFY_METHOD, 0 ),
 MAP( IsCellBackgroundTransparent, XML_NAMESPACE_FO, 
XML_BACKGROUND_COLOR, 
XML_TYPE_PROP_TABLE_CELL|XML_TYPE_ISTRANSPARENT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE,
 0 ),
 MAP( IsTextWrapped, XML_NAMESPACE_FO, XML_WRAP_OPTION, 
XML_TYPE_PROP_TABLE_CELL|XML_SC_ISTEXTWRAPPED, 0 ),
 MAP( LeftBorder, XML_NAMESPACE_FO, XML_BORDER, 
XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER, CTF_SC_ALLBORDER ),
@@ -117,7 +117,7 @@ const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
 MAP( UserDefinedAttributes, XML_NAMESPACE_TEXT, XML_XMLNS, 
XML_TYPE_PROP_TABLE_CELL|XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 
0 ),
 MAP( ValidationXML, XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATION, 
XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BUILDIN_CMP_ONLY, CTF_SC_VALIDATION ),
 MAP( 

[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 2 commits - xmloff/inc xmloff/source

2012-02-07 Thread Noel Power
 xmloff/inc/xmloff/txtparae.hxx  |3 ++-
 xmloff/source/draw/sdpropls.cxx |   23 ++-
 xmloff/source/text/txtparae.cxx |   30 --
 3 files changed, 48 insertions(+), 8 deletions(-)

New commits:
commit 2fb5f7cf09f33b7ae924b07dac45bf3e698da90c
Author: Michael Stahl mst...@redhat.com
Date:   Tue Feb 7 10:54:04 2012 +

fdo#45534: ODF export: fix draw:fit-to-size

In ODF 1.1 and 1.2 this attribute is of type boolean, so only write the
new values if the extended format is selected.
(regression introduced with e479f47f7d48dbd0d701bf347b6a2d5121ba3d34)

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index a87690d..4df1b01 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -619,6 +619,15 @@ SvXMLEnumMapEntry const pXML_VerticalAlign_Enum[] =
 { XML_TOKEN_INVALID, 0 }
 };
 
+SvXMLEnumMapEntry const pXML_FitToSize_Enum_Odf12[] =
+{
+{ XML_FALSE,drawing::TextFitToSizeType_NONE },
+{ XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL },
+{ XML_TRUE, drawing::TextFitToSizeType_ALLLINES },
+{ XML_TRUE, drawing::TextFitToSizeType_AUTOFIT },
+{ XML_TOKEN_INVALID, 0 }
+};
+
 SvXMLEnumMapEntry const pXML_FitToSize_Enum[] =
 {
 { XML_FALSE,   drawing::TextFitToSizeType_NONE },
@@ -1047,7 +1056,19 @@ const XMLPropertyHandler* 
XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
 pHdl = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum, 
::getCppuType((const com::sun::star::drawing::TextVerticalAdjust*)0) );
 break;
 case XML_SD_TYPE_FITTOSIZE:
-pHdl = new XMLEnumPropertyHdl( pXML_FitToSize_Enum, 
::getCppuType((const com::sun::star::drawing::TextFitToSizeType*)0) );
+{
+if (mpExport  (mpExport-getDefaultVersion()
+= SvtSaveOptions::ODFVER_012))
+{
+pHdl = new 
XMLEnumPropertyHdl(pXML_FitToSize_Enum_Odf12,
+::getCppuType(static_castconst 
com::sun::star::drawing::TextFitToSizeType*(0)));
+}
+else
+{
+pHdl = new XMLEnumPropertyHdl(pXML_FitToSize_Enum,
+::getCppuType(static_castconst 
com::sun::star::drawing::TextFitToSizeType*(0)));
+}
+}
 break;
 case XML_SD_TYPE_MEASURE_UNIT:
 pHdl = new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum, 
::getCppuType((const sal_Int32*)0) );
commit eb7c38705c03b12770d1d964f6e15c1d12719cc4
Author: Michael Stahl mst...@redhat.com
Date:   Tue Feb 7 10:48:59 2012 +

fdo#45449: ODF export: frames: invalid min-width

XMLTextParagraphExport::addTextFrameAttributes: delay writing of the
fo:min-width and fo:min-height attributes so that they end up at the
draw:text-box element, and not at draw:frame where they are invalid.

Testing reveals that the ODF import can already handle reading the
attributes from the draw:text-box elements, so there doesn't seem to be
a backward compatibility problem.

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx
index dcb2d6f..dbe865e 100644
--- a/xmloff/inc/xmloff/txtparae.hxx
+++ b/xmloff/inc/xmloff/txtparae.hxx
@@ -266,7 +266,8 @@ protected:
 const ::com::sun::star::uno::Reference 
 ::com::sun::star::beans::XPropertySet  rPropSet,
 sal_Bool bShape,
-::rtl::OUString *pMinHeightValue = 0 );
+::rtl::OUString *pMinHeightValue = 0,
+::rtl::OUString *pMinWidthValue = 0 );
 
 virtual void exportStyleAttributes(
 const ::com::sun::star::uno::Reference
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index d5962ec..066266d 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2479,7 +2479,8 @@ sal_Bool lcl_txtpara_isBoundAsChar(
 sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
 const Reference  XPropertySet  rPropSet,
 sal_Bool bShape,
-OUString *pMinHeightValue )
+OUString *pMinHeightValue,
+OUString *pMinWidthValue)
 {
 sal_Int32 nShapeFeatures = SEF_DEFAULT;
 
@@ -2582,8 +2583,13 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
 }
 GetExport().GetMM100UnitConverter().convertMeasure( sValue, nWidth );
 if( SizeType::FIX != nWidthType )
-GetExport().AddAttribute( XML_NAMESPACE_FO, XML_MIN_WIDTH,
-  sValue.makeStringAndClear() );
+{
+assert(pMinWidthValue);
+if (pMinWidthValue)
+{
+*pMinWidthValue

[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 3 commits - sw/qa sw/source

2012-02-07 Thread Noel Power
 sw/qa/unoapi/knownissues.xcl |3 ---
 sw/source/ui/uiview/view.cxx |2 +-
 sw/source/ui/uno/unomod.cxx  |7 +++
 3 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 7fcb1bb88d0809c64ac4be2aa95a96a883e55af8
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Sep 12 12:19:54 2011 +0200

fs34b: #i117545# (patch provided by mathias.ba...@oracle.com)

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index fd32cc5..ff33fcf 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -748,8 +748,13 @@ void SwXViewSettings::_setSingleValue( const 
comphelper::PropertyInfo  rInfo, c
 aOpt.setBrowseMode( bVal );
 pView-GetWrtShell().ApplyViewOptions( aOpt );
 pView-RecheckBrowseMode();
+
+// must be set in mpViewOption as this will overwrite settings 
in _post!
 if(mpViewOption)
 mpViewOption-setBrowseMode(bVal);
+
+// disable multiple layout
+pView-GetDocShell()-ToggleBrowserMode(bVal, pView );
 }
 }
 break;
commit 1f5f826f54684f8f19e69408cffa04cf25b5ad72
Author: Bjoern Michaelsen bjoern.michael...@canonical.com
Date:   Tue Feb 7 17:15:03 2012 +

fdo#35661: fix sw.SwXViewSettings::com::sun::star::text::ViewSettings

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
index 3cea081..a9315fe 100644
--- a/sw/qa/unoapi/knownissues.xcl
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -188,8 +188,5 @@ sw.SwXTextViewCursor::com::sun::star::view::XScreenCursor
 ### fd#35660 ###
 sw.DocumentSettings::com::sun::star::text::PrintSettings
 
-### fd#35661 ###
-sw.SwXViewSettings::com::sun::star::text::ViewSettings
-
 ### fd#35662 ###
 sw.SwXPrintSettings::com::sun::star::text::PrintSettings
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index 8139a07..fd32cc5 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -748,6 +748,8 @@ void SwXViewSettings::_setSingleValue( const 
comphelper::PropertyInfo  rInfo, c
 aOpt.setBrowseMode( bVal );
 pView-GetWrtShell().ApplyViewOptions( aOpt );
 pView-RecheckBrowseMode();
+if(mpViewOption)
+mpViewOption-setBrowseMode(bVal);
 }
 }
 break;
commit fe3ddc22e24a6815481c16e17cd1050bd91b5fe2
Author: Michael Stahl mst...@redhat.com
Date:   Wed Feb 1 15:49:16 2012 +0100

fdo#37024: SwView::SwView: fix BROWSE_MODE setting:

Apparently there is a check in SwDoc::SetAllUniqueFlyNames so that when
frames with certain anchor types are in a document, then SetLoaded()
is never called.  Checking this flag via IsLoaded() here seems
unnecessary.
This problem was introduced with ebc5777548dea42ed966a16c66d879b1485bbfb4,
from CWS swlayoutrefactoring.

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index f6912af..b2c920a 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -835,7 +835,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh 
)
 
 if( !bOldShellWasSrcView  pWebDShell  !bOldShellWasPagePreView )
 aUsrPref.setBrowseMode( sal_True );
-else if( rDoc.IsLoaded() )
+else
 aUsrPref.setBrowseMode( 
rDoc.get(IDocumentSettingAccess::BROWSE_MODE) );
 
 //Fuer den BrowseMode wollen wir keinen Factor uebernehmen.
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerfilter/source

2012-02-02 Thread Noel Power
 writerfilter/source/dmapper/DomainMapper.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit d8cb61f5f32247a8bbaf89fb910c015b6107f051
Author: Muhammad Haggag mhag...@gmail.com
Date:   Wed Feb 1 20:56:12 2012 +0200

dmapper: Switch paragraphs to RTL based on the value of w:BiDi.

This is a fix for 43398: FORMATTING: Documents opened in LibreOffice Writer 
incorrectly appear as right justified.

Cause: dmapper used to treat the presence of a w:BiDi element in a 
paragraph's properties as an indicator of RTL directionality, which is 
incorrect. A w:BiDi  element may have a value of 0, indicating LTR.

Fix: Inspect the integral value of w:BiDi elements before switching to RTL.

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 851ded2..34c23f7 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1812,8 +1812,13 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 }
 break;  // sprmPOutLvl
 case NS_sprm::LN_PFBiDi:
-rContext-Insert(PROP_WRITING_MODE, false, uno::makeAny( 
text::WritingMode2::RL_TB ));
-rContext-Insert(PROP_PARA_ADJUST, false, uno::makeAny( 
style::ParagraphAdjust_RIGHT ));
+{
+if (nIntValue != 0)
+{
+rContext-Insert(PROP_WRITING_MODE, false, uno::makeAny( 
text::WritingMode2::RL_TB ));
+rContext-Insert(PROP_PARA_ADJUST, false, uno::makeAny( 
style::ParagraphAdjust_RIGHT ));
+}
+}
 
 break;  // sprmPFBiDi
 case NS_ooxml::LN_EG_SectPrContents_bidi:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sd/source

2012-02-01 Thread Noel Power
 sd/source/ui/dlg/sdpreslt.cxx |   43 +++---
 sd/source/ui/inc/sdpreslt.hxx |5 ++--
 2 files changed, 19 insertions(+), 29 deletions(-)

New commits:
commit e8b7f1faaf3b0fd837a236a4a53d0f7392723713
Author: Noel Grandin n...@peralex.com
Date:   Wed Feb 1 12:58:45 2012 +

convert SdPresLayoutDlg from tools/list.hxx to boost::ptr_vector

diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index 98f2df5..db30dff 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -76,8 +76,6 @@ SdPresLayoutDlg::SdPresLayoutDlg(
 {
 FreeResource();
 
-mpLayoutNames = new List;
-
 maVS.SetDoubleClickHdl(LINK(this, SdPresLayoutDlg, ClickLayoutHdl));
 maBtnLoad.SetClickHdl(LINK(this, SdPresLayoutDlg, ClickLoadHdl));
 
@@ -92,14 +90,6 @@ SdPresLayoutDlg::SdPresLayoutDlg(
 
 SdPresLayoutDlg::~SdPresLayoutDlg()
 {
-String* pName = (String*)mpLayoutNames-First();
-while (pName)
-{
-delete pName;
-pName = (String*)mpLayoutNames-Next();
-}
-
-delete mpLayoutNames;
 }
 
 /*
@@ -131,10 +121,10 @@ void SdPresLayoutDlg::Reset()
 
 FillValueSet();
 
-mnLayoutCount = mpLayoutNames-Count();
+mnLayoutCount = maLayoutNames.size();
 for( nName = 0; nName  mnLayoutCount; nName++ )
 {
-if (*((String*)mpLayoutNames-GetObject(nName)) == maName)
+if (maLayoutNames[nName] == maName)
 break;
 }
 DBG_ASSERT(nName  mnLayoutCount, Layout nicht gefunden);
@@ -161,11 +151,11 @@ void SdPresLayoutDlg::GetAttr(SfxItemSet rOutAttrs)
 {
 aLayoutName = maName;
 aLayoutName.Append( DOCUMENT_TOKEN );
-aLayoutName.Append( *(String*)mpLayoutNames-GetObject( nId - 1 ) );
+aLayoutName.Append( maLayoutNames[ nId - 1 ] );
 }
 else
 {
-aLayoutName = *(String*)mpLayoutNames-GetObject( nId - 1 );
+aLayoutName = maLayoutNames[ nId - 1 ];
 if( aLayoutName == maStrNone )
 aLayoutName.Erase(); //  so wird - keine - codiert (s.u.)
 }
@@ -202,10 +192,10 @@ void SdPresLayoutDlg::FillValueSet()
 {
 String aLayoutName(pMaster-GetLayoutName());
 aLayoutName.Erase( aLayoutName.SearchAscii( SD_LT_SEPARATOR ) );
-mpLayoutNames-Insert(new String(aLayoutName), LIST_APPEND);
+maLayoutNames.push_back(new String(aLayoutName));
 
 Bitmap aBitmap(mpDocSh-GetPagePreviewBitmap(pMaster, 90));
-maVS.InsertItem((sal_uInt16)mpLayoutNames-Count(), aBitmap, 
aLayoutName);
+maVS.InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, 
aLayoutName);
 }
 }
 
@@ -274,21 +264,20 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
 {
 // Pruefen, ob Vorlage schon vorhanden
 sal_Bool bExists = sal_False;
-String* pName = (String*)mpLayoutNames-First();
 String aCompareStr( maName );
 if( maName.Len() == 0 )
 aCompareStr = maStrNone;
 
-while( pName  !bExists )
+sal_uInt16 aPos = 0;
+for (boost::ptr_vectorString::iterator it = maLayoutNames.begin();
+ it != maLayoutNames.end()  !bExists; ++it, ++aPos)
 {
-if( aCompareStr == *pName )
+if( aCompareStr == *it )
 {
 bExists = sal_True;
 // Vorlage selektieren
-sal_uInt16 nId = (sal_uInt16) mpLayoutNames-GetCurPos() + 1;
-maVS.SelectItem( nId );
+maVS.SelectItem( aPos + 1 );
 }
-pName = (String*)mpLayoutNames-Next();
 }
 
 if( !bExists )
@@ -313,10 +302,10 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
 {
 String aLayoutName(pMaster-GetLayoutName());
 aLayoutName.Erase( aLayoutName.SearchAscii( 
SD_LT_SEPARATOR ) );
-mpLayoutNames-Insert(new String(aLayoutName), 
LIST_APPEND);
+maLayoutNames.push_back(new String(aLayoutName));
 
 Bitmap 
aBitmap(pTemplDocSh-GetPagePreviewBitmap(pMaster, 90));
-
maVS.InsertItem((sal_uInt16)mpLayoutNames-Count(), aBitmap, aLayoutName);
+maVS.InsertItem((sal_uInt16)maLayoutNames.size(), 
aBitmap, aLayoutName);
 }
 }
 }
@@ -330,15 +319,15 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
 else
 {
 // leeres Layout
-mpLayoutNames-Insert( new String( maStrNone ), LIST_APPEND );
-maVS.InsertItem( (sal_uInt16) mpLayoutNames-Count(),
+maLayoutNames.push_back( new String( maStrNone ) );
+maVS.InsertItem( 

[Libreoffice-commits] .: sw/source

2012-01-31 Thread Noel Power
 sw/source/core/layout/pagechg.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit b446a1fb30b5a7097824acfe6143f4284b03
Author: Andreas Schierl openoff...@schierla.de
Date:   Mon Jan 30 23:34:56 2012 +0100

ClrContourCache for SwAnchoredDrawObjects

diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index 55fdefe..4b7092b 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -2035,6 +2035,9 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point 
rOffset )
 const Point aNewAnchorPos( ( aCurrAnchorPos + rOffset ) );
 pAnchoredDrawObj-DrawObj()-SetAnchorPos( aNewAnchorPos );
 pAnchoredDrawObj-SetLastObjRect( 
pAnchoredDrawObj-GetObjRect().SVRect() );
+
+// clear contour cache
+ClrContourCache( pAnchoredDrawObj-GetDrawObj() );
 }
 // #i92511#
 // cache for object rectangle inclusive spaces has to be invalidated.
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-01-31 Thread Noel Power
 sc/inc/scdll.hxx  |1 
 sc/source/core/inc/ddelink.hxx|1 
 sc/source/core/tool/ddelink.cxx   |   11 -
 sc/source/ui/app/scdll.cxx|   10 
 sc/source/ui/dbgui/fieldwnd.cxx   |5 
 sc/source/ui/inc/areasave.hxx |1 
 sc/source/ui/inc/cellmergeoption.hxx  |1 
 sc/source/ui/inc/fieldwnd.hxx |1 
 sc/source/ui/inc/scuitphfedit.hxx |4 ---
 sc/source/ui/pagedlg/scuitphfedit.cxx |   39 --
 sc/source/ui/undo/areasave.cxx|5 
 sc/source/ui/view/cellmergeoption.cxx |9 ---
 unusedcode.easy   |9 ---
 13 files changed, 97 deletions(-)

New commits:
commit 9c66fca6ceaa3ba4ad79264a56a992828a92f536
Author: Elton Chung el...@elton.tk
Date:   Tue Jan 31 12:36:47 2012 +

Remove unsed code

diff --git a/sc/inc/scdll.hxx b/sc/inc/scdll.hxx
index 93cff7e..43a9c9f 100644
--- a/sc/inc/scdll.hxx
+++ b/sc/inc/scdll.hxx
@@ -61,7 +61,6 @@ public:
 
 // DLL-init/exit-code must be linked to the DLL only
 static void Init(); // called directly after loading the DLL
-static void Exit(); // called directly befor unloading the DLL
 
 static sal_uLongDetectFilter( SfxMedium rMedium, const SfxFilter** 
ppFilter,
 SfxFilterFlags nMust, SfxFilterFlags nDont 
);
diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx
index e3794e4..216d6d6 100644
--- a/sc/source/core/inc/ddelink.hxx
+++ b/sc/source/core/inc/ddelink.hxx
@@ -87,7 +87,6 @@ public:
 const String   GetItem() const { return aItem; }
 sal_uInt8   GetMode() const { return nMode; }
 
-voidResetValue();   // Wert zuruecksetzen
 voidTryUpdate();
 
 sal_BoolNeedsUpdate() const { return bNeedUpdate; }
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 3bd75ae..5d36e52 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -228,17 +228,6 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged(
 return SUCCESS;
 }
 
-void ScDdeLink::ResetValue()
-{
-pResult.reset();
-
-//  Es hat sich was getan...
-//  Tracking, FID_DATACHANGED etc. passiert von aussen
-
-if (HasListeners())
-Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) );
-}
-
 void ScDdeLink::ListenersGone()
 {
 sal_Bool bWas = bIsInUpdate;
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 9cf9555..0a57bf6 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -312,16 +312,6 @@ void ScDLL::Init()
 //  StarOne Services are now handled in the registry
 }
 
-void ScDLL::Exit()
-{
-// the SxxModule must be destroyed
-ScModule **ppShlPtr = (ScModule**) GetAppData(SHL_CALC);
-delete (*ppShlPtr);
-(*ppShlPtr) = NULL;
-
-//  ScGlobal::Clear ist schon im Module-dtor
-}
-
 //--
 //  Statusbar
 //--
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 40eb873..9139be4 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -254,11 +254,6 @@ size_t ScDPFieldControlBase::GetSelectedField() const
 return mnFieldSelected;
 }
 
-void ScDPFieldControlBase::SetSelectedField(size_t nSelected)
-{
-mnFieldSelected = nSelected;
-}
-
 vectorScDPFieldControlBase::FieldName ScDPFieldControlBase::GetFieldNames()
 {
 return maFieldNames;
diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx
index c9ff348..1a0b1cd 100644
--- a/sc/source/ui/inc/areasave.hxx
+++ b/sc/source/ui/inc/areasave.hxx
@@ -78,7 +78,6 @@ public:
 
 const ScAreaLinkSaver* operator[](size_t nIndex) const;
 size_t size() const;
-void clear();
 void push_back(ScAreaLinkSaver* p);
 };
 
diff --git a/sc/source/ui/inc/cellmergeoption.hxx 
b/sc/source/ui/inc/cellmergeoption.hxx
index ad5fe34..62e4279 100644
--- a/sc/source/ui/inc/cellmergeoption.hxx
+++ b/sc/source/ui/inc/cellmergeoption.hxx
@@ -44,7 +44,6 @@ struct ScCellMergeOption
 SCROW mnEndRow;
 bool mbCenter;
 
-explicit ScCellMergeOption();
 explicit ScCellMergeOption(const ScRange rRange);
 explicit ScCellMergeOption(SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 2b232cf..49fc2ed 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -149,7 +149,6 @@ public:
 voidGetExistingIndex( const Point rPos, size_t rnIndex );
 
 size_t GetSelectedField() const;
-void SetSelectedField(size_t nSelected);
 
 /** Selects the next field. Called i.e. after 

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

2012-01-31 Thread Noel Power
 sd/inc/cusshow.hxx   |   14 +-
 sd/source/core/cusshow.cxx   |   28 ++--
 sd/source/core/drawdoc_animations.cxx|3 ++-
 sd/source/filter/ppt/pptin.cxx   |2 +-
 sd/source/ui/dlg/custsdlg.cxx|   26 +-
 sd/source/ui/dlg/sdtreelb.cxx|4 ++--
 sd/source/ui/slideshow/slideshowimpl.cxx |   10 +-
 sd/source/ui/unoidl/unocpres.cxx |   16 ++--
 8 files changed, 52 insertions(+), 51 deletions(-)

New commits:
commit 5a71069339b3a3c118f3015d978799ef66db7564
Author: Noel Grandin n...@peralex.com
Date:   Tue Jan 31 14:16:38 2012 +

convert SdCustomeShow from tools/list to vector

diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx
index 1f981e9..1bd3614 100644
--- a/sd/inc/cusshow.hxx
+++ b/sd/inc/cusshow.hxx
@@ -29,7 +29,7 @@
 #ifndef _SD_CUSSHOW_HXX
 #define _SD_CUSSHOW_HXX
 
-#include tools/list.hxx
+#include vector
 #include tools/stream.hxx
 #include tools/string.hxx
 #include cppuhelper/weakref.hxx
@@ -43,9 +43,13 @@ class SdPage;
 |* CustomShow
 |*
 \/
-class SD_DLLPUBLIC SdCustomShow : public List
+class SD_DLLPUBLIC SdCustomShow
 {
+public:
+typedef ::std::vectorconst SdPage* PageVec;
+
 private:
+PageVec   maPages;
 String  aName;
 SdDrawDocument* pDoc;
 
@@ -65,14 +69,14 @@ public:
 // @@@ copy ctor, but no copy assignment? @@@
 SdCustomShow( const SdCustomShow rShow );
 
+PageVec PagesVector();
+void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage );
+
 void   SetName(const String rName);
 String GetName() const;
 
 SdDrawDocument* GetDoc() const { return pDoc; }
 
-void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage );
-void RemovePage( const SdPage* pPage );
-
 ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface  
getUnoCustomShow();
 };
 
diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx
index c604344..dcdb343 100644
--- a/sd/source/core/cusshow.cxx
+++ b/sd/source/core/cusshow.cxx
@@ -45,7 +45,7 @@ using namespace ::com::sun::star;
 |*
 \/
 SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc)
-  : List(),
+  : maPages(),
   pDoc(pDrawDoc)
 {
 }
@@ -56,14 +56,14 @@ SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc)
 |*
 \/
 SdCustomShow::SdCustomShow( const SdCustomShow rShow )
-: List( rShow )
+: maPages(rShow.maPages)
 {
 aName = rShow.GetName();
 pDoc = rShow.GetDoc();
 }
 
 SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc, 
::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface  xShow )
-  : List(),
+  : maPages(),
   pDoc(pDrawDoc),
   mxUnoCustomShow( xShow )
 {
@@ -97,28 +97,20 @@ uno::Reference uno::XInterface  
SdCustomShow::getUnoCustomShow()
 return xShow;
 }
 
+SdCustomShow::PageVec SdCustomShow::PagesVector()
+{
+return maPages;
+}
+
 void SdCustomShow::ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage 
)
 {
 if( !pNewPage )
 {
-RemovePage( pOldPage );
+::std::remove(maPages.begin(), maPages.end(), pOldPage);
 }
 else
 {
-sal_uLong nPos;
-while( (nPos = GetPos( (void*)pOldPage )) != CONTAINER_ENTRY_NOTFOUND  
)
-{
-Replace( (void*)pNewPage, nPos );
-}
-}
-}
-
-void SdCustomShow::RemovePage( const SdPage* pPage )
-{
-sal_uLong nPos;
-while( (nPos = GetPos( (void*)pPage )) != CONTAINER_ENTRY_NOTFOUND  )
-{
-Remove( nPos );
+::std::replace(maPages.begin(), maPages.end(), pOldPage, pNewPage);
 }
 }
 
diff --git a/sd/source/core/drawdoc_animations.cxx 
b/sd/source/core/drawdoc_animations.cxx
index 5b41d0c..de62ec5 100644
--- a/sd/source/core/drawdoc_animations.cxx
+++ b/sd/source/core/drawdoc_animations.cxx
@@ -44,7 +44,8 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* 
pOldPage, const SdP
 {
 SdCustomShow* pCustomShow = (SdCustomShow*) 
mpCustomShowList-GetObject(i);
 if( pNewPage == 0 )
-pCustomShow-RemovePage(pOldPage);
+::std::remove(pCustomShow-PagesVector().begin(), 
pCustomShow-PagesVector().end(),
+pOldPage);
 else
 pCustomShow-ReplacePage(pOldPage,pNewPage);
 }
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 203d2f3..af5dd14 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1301,7 +1301,7 @@ sal_Bool ImplSdPPTImport::Import()
 SdPage* pPage = 
mpDoc-GetSdPage( nPage, PK_STANDARD );
 if ( pPage )

[Libreoffice-commits] .: sw/source

2012-01-31 Thread Noel Power
 sw/source/core/layout/pagechg.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 84370b807279cd8336c3e77278bae42b904324b4
Author: Andreas Schierl openoff...@schierla.de
Date:   Tue Jan 31 14:29:32 2012 +

only call ClrContour for contour wrapped drawing objects

diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index 4b7092b..403f64d 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -39,6 +39,7 @@
 #include fmtfordr.hxx
 #include fmtfld.hxx
 #include fmtornt.hxx
+#include fmtsrnd.hxx
 #include ftninfo.hxx
 #include tgrditem.hxx
 #include viewopt.hxx
@@ -2037,7 +2038,8 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point 
rOffset )
 pAnchoredDrawObj-SetLastObjRect( 
pAnchoredDrawObj-GetObjRect().SVRect() );
 
 // clear contour cache
-ClrContourCache( pAnchoredDrawObj-GetDrawObj() );
+if ( pAnchoredDrawObj-GetFrmFmt().GetSurround().IsContour() )
+ClrContourCache( pAnchoredDrawObj-GetDrawObj() );
 }
 // #i92511#
 // cache for object rectangle inclusive spaces has to be invalidated.
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - desktop/source

2012-01-30 Thread Noel Power
 desktop/source/migration/migration.cxx |   62 +
 1 file changed, 40 insertions(+), 22 deletions(-)

New commits:
commit 305d20133c1418405418a6c698b48eb8114ade5b
Author: Petr Mladek pmla...@suse.cz
Date:   Fri Jan 27 18:07:03 2012 +0100

allow to migrate the shared registrymodifications.xcu

LO-3.3 and older wrote configuration into many files under
user/registry/data. LO-3.4 spped up startup by moving these
files into a single /user/registrymodifications.xcu.

officecfg/registry/data/org/openoffice/Setup.xcu defines what registry
nodes are migrated and what are excluded.

Finally, the old migration code detected the name of the .xcu file
by the first entry in IncludedNodes. This fix allows to search
the data in the single registrymodifications.xcu when available.

diff --git a/desktop/source/migration/migration.cxx 
b/desktop/source/migration/migration.cxx
index 7520eb8..d7f9765 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -773,33 +773,51 @@ void MigrationImpl::copyConfig() {
 }
 }
 }
+
+// check if the shared registrymodifications.xcu file exists
+bool bRegistryModificationsXcuExists = false;
+rtl::OUString regFilePath(m_aInfo.userdata);
+regFilePath += 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(/user/registrymodifications.xcu));
+File regFile(regFilePath);
+::osl::FileBase::RC nError = regFile.open(osl_File_OpenFlag_Read);
+if ( nError == ::osl::FileBase::E_None ) {
+bRegistryModificationsXcuExists = true;
+regFile.close();
+}
+
 for (Components::const_iterator i(comps.begin()); i != comps.end(); ++i) {
 if (!i-second.includedPaths.empty()) {
-rtl::OUStringBuffer buf(m_aInfo.userdata);
-buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(/user/registry/data));
-sal_Int32 n = 0;
-do {
-rtl::OUString seg(i-first.getToken(0, '.', n));
-rtl::OUString enc(
-rtl::Uri::encode(
-seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
-RTL_TEXTENCODING_UTF8));
-if (enc.getLength() == 0  seg.getLength() != 0) {
-OSL_TRACE(
-(configuration migration component %s ignored (cannot
-  be encoded as file path)),
-rtl::OUStringToOString(
-i-first, RTL_TEXTENCODING_UTF8).getStr());
-goto next;
-}
-buf.append(sal_Unicode('/'));
-buf.append(enc);
-} while (n = 0);
-buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(.xcu));
+if (!bRegistryModificationsXcuExists) {
+// shared registrymodifications.xcu does not exists
+// the configuration is split in many registry files
+// determine the file names from the first element in included 
paths
+rtl::OUStringBuffer buf(m_aInfo.userdata);
+
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(/user/registry/data));
+sal_Int32 n = 0;
+do {
+rtl::OUString seg(i-first.getToken(0, '.', n));
+rtl::OUString enc(
+rtl::Uri::encode(
+seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
+RTL_TEXTENCODING_UTF8));
+if (enc.getLength() == 0  seg.getLength() != 0) {
+OSL_TRACE(
+(configuration migration component %s ignored 
(cannot
+ be encoded as file path)),
+rtl::OUStringToOString(
+i-first, RTL_TEXTENCODING_UTF8).getStr());
+goto next;
+}
+buf.append(sal_Unicode('/'));
+buf.append(enc);
+} while (n = 0);
+buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(.xcu));
+regFilePath = buf.toString();
+}
 configuration::Update::get(
 comphelper::getProcessComponentContext())-
 insertModificationXcuFile(
-buf.makeStringAndClear(), 
setToSeq(i-second.includedPaths),
+regFilePath, setToSeq(i-second.includedPaths),
 setToSeq(i-second.excludedPaths));
 } else {
 OSL_TRACE(
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - officecfg/registry

2012-01-30 Thread Noel Power
 officecfg/registry/data/org/openoffice/Setup.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fcc91f9df71c2b5f06e5cd0729f4cc0fed6b1ded
Author: Andras Timar ati...@suse.com
Date:   Fri Jan 27 19:25:32 2012 +0100

use the correct application icon of Writer/Web under Windows

diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu 
b/officecfg/registry/data/org/openoffice/Setup.xcu
index 237e824..4163b1b 100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -454,7 +454,7 @@
 value /value
 /prop
 prop oor:name=ooSetupFactoryIcon
-value 1/value
+value 11/value
 /prop
 prop oor:name=ooSetupFactoryTemplateFile
 value /value
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - cui/source svtools/inc svtools/source

2012-01-30 Thread Noel Power
 cui/source/tabpages/border.src |2 +-
 svtools/inc/svtools/ctrlbox.hxx|4 
 svtools/source/control/ctrlbox.cxx |2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 2f23703cf6b2f1e5b28b5d5153e3f247ff3aa223
Author: Michael Stahl mst...@redhat.com
Date:   Fri Jan 27 23:44:26 2012 +0100

SvxBorderTabPage: the minimal border width is 1 twip

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/cui/source/tabpages/border.src b/cui/source/tabpages/border.src
index 8496f18..45b412d 100644
--- a/cui/source/tabpages/border.src
+++ b/cui/source/tabpages/border.src
@@ -116,7 +116,7 @@ TabPage RID_SVXPAGE_BORDER
 First = 25 ;
 Last = 900 ;
 Maximum = 900 ;
-Minimum = 25 ;
+Minimum = 5 ;
 DecimalDigits = 2 ;
 Unit = FUNIT_POINT ;
 };
commit 4362a5d2cebfcb0146fd61ba82147d2195485338
Author: Michael Stahl mst...@redhat.com
Date:   Fri Jan 27 23:45:53 2012 +0100

svtools: LineListBox: fix handling of none style

This was erroneously mapped to SOLID, thus effectively preventing the
removal of borders via the list box.

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 3ab9e31..1174beb 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -48,9 +48,13 @@ typedef ::std::vector ImplColorListData* ImpColorList;
 typedef ::std::vector ImpLineListData*   ImpLineList;
 typedef ::std::vector ImplFontNameListData*  ImplFontList;
 
+// FIXME: STYLE_* duplicate values from editeng::SvxBorderStyle,
+// which in turn duplicates values from com::sun::star::table::BorderLineStyle:
+// this needs cleaning up on master
 #define STYLE_SOLID( ( sal_uInt16 ) 0 )
 #define STYLE_DOTTED   ( ( sal_uInt16 ) 1 )
 #define STYLE_DASHED   ( ( sal_uInt16 ) 2 )
+#define STYLE_NONE ( ( sal_uInt16 ) -1)
 
 #define CHANGE_LINE1   ( ( sal_uInt16 ) 1 )
 #define CHANGE_LINE2   ( ( sal_uInt16 ) 2 )
diff --git a/svtools/source/control/ctrlbox.cxx 
b/svtools/source/control/ctrlbox.cxx
index cf7df79..6d8db08 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -879,7 +879,7 @@ long LineListBox::GetEntryDistance( sal_uInt16 nPos ) const
 sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const
 {
 ImpLineListData* pData = (nPos  pLineList-size()) ? (*pLineList)[ nPos ] 
: NULL;
-return ( pData ) ? pData-GetStyle() : STYLE_SOLID;
+return ( pData ) ? pData-GetStyle() : STYLE_NONE;
 }
 
 // ---
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - cui/source

2012-01-30 Thread Noel Power
 cui/source/tabpages/border.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 27e607c744bd8cbb26b8a6bdf42384eb4f77888c
Author: Michael Stahl mst...@redhat.com
Date:   Fri Jan 27 23:44:26 2012 +0100

SvxBorderTabPage: the minimal border width is 1 twip

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/cui/source/tabpages/border.src b/cui/source/tabpages/border.src
index 10599d5..d1372c3 100644
--- a/cui/source/tabpages/border.src
+++ b/cui/source/tabpages/border.src
@@ -116,7 +116,7 @@ TabPage RID_SVXPAGE_BORDER
 First = 25 ;
 Last = 900 ;
 Maximum = 900 ;
-Minimum = 25 ;
+Minimum = 5 ;
 DecimalDigits = 2 ;
 Unit = FUNIT_POINT ;
 };
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - editeng/qa editeng/source

2012-01-30 Thread Noel Power
 editeng/qa/items/borderline_test.cxx |2 +-
 editeng/source/items/borderline.cxx  |   21 ++---
 2 files changed, 19 insertions(+), 4 deletions(-)

New commits:
commit ed41167d5ffae11efdd9cb43b2d88a8147e6d13f
Author: Michael Stahl mst...@redhat.com
Date:   Wed Jan 25 22:43:39 2012 +0100

fdo#38542: SvxBorderLine::GuessLinesWidths:

Importing style:border-line-width=0.002cm 0.088cm 0.141cm (which older
OOo/LO apparently could write) fails, because GuessLinesWidths can't find
a matching style (result: standard double border, 3 equal width parts).
Try to create a custom BorderWidthImpl of type DOUBLE instead, that
preserves the individual widths.

Signed-off-by: Cédric Bosdonnat cedric.bosdonnat@free.fr
Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/editeng/qa/items/borderline_test.cxx 
b/editeng/qa/items/borderline_test.cxx
index 5d67b62..05172d6 100644
--- a/editeng/qa/items/borderline_test.cxx
+++ b/editeng/qa/items/borderline_test.cxx
@@ -85,7 +85,7 @@ void BorderLineTest::testGuessWidthNoMatch()
 line.GuessLinesWidths( DOUBLE,
 TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 );
 CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetStyle() );
-CPPUNIT_ASSERT_EQUAL( long( 0 ), line.GetWidth() );
+CPPUNIT_ASSERT_EQUAL( long( (3 * TEST_WIDTH) + 6 ), line.GetWidth() );
 }
 
 void BorderLineTest::testGuessWidthThinthickSmallgap()
diff --git a/editeng/source/items/borderline.cxx 
b/editeng/source/items/borderline.cxx
index de24284..88adf29 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -279,10 +279,25 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle 
nStyle, sal_uInt16 nOut, sa
 
 // If anything matched, then set it
 if ( nWidth  0 )
+{
 nStyle = nTestStyle;
-
-SetStyle( nStyle );
-m_nWidth = nWidth;
+SetStyle( nStyle );
+m_nWidth = nWidth;
+}
+else
+{
+// fdo#38542: not a known double, default to something custom...
+SetStyle( nStyle );
+m_nWidth = nOut + nIn + nDist;
+if (nOut + nIn + nDist)
+{
+m_aWidthImpl = BorderWidthImpl(
+CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST,
+static_castdouble(nOut ) / static_castdouble(m_nWidth),
+static_castdouble(nIn  ) / static_castdouble(m_nWidth),
+static_castdouble(nDist) / 
static_castdouble(m_nWidth));
+}
+}
 }
 else
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - svtools/inc svtools/source

2012-01-30 Thread Noel Power
 svtools/inc/svtools/ctrlbox.hxx|4 
 svtools/source/control/ctrlbox.cxx |2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit c59ecb9a758cb61f1b146d8a844030fcd085eb65
Author: Michael Stahl mst...@redhat.com
Date:   Fri Jan 27 23:45:53 2012 +0100

svtools: LineListBox: fix handling of none style

This was erroneously mapped to SOLID, thus effectively preventing the
removal of borders via the list box.

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 267a104..8813820 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -47,9 +47,13 @@ typedef ::std::vector ImplColorListData* ImpColorList;
 typedef ::std::vector ImpLineListData*   ImpLineList;
 typedef ::std::vector ImplFontNameListData*  ImplFontList;
 
+// FIXME: STYLE_* duplicate values from editeng::SvxBorderStyle,
+// which in turn duplicates values from com::sun::star::table::BorderLineStyle:
+// this needs cleaning up on master
 #define STYLE_SOLID( ( sal_uInt16 ) 0 )
 #define STYLE_DOTTED   ( ( sal_uInt16 ) 1 )
 #define STYLE_DASHED   ( ( sal_uInt16 ) 2 )
+#define STYLE_NONE ( ( sal_uInt16 ) -1)
 
 #define CHANGE_LINE1   ( ( sal_uInt16 ) 1 )
 #define CHANGE_LINE2   ( ( sal_uInt16 ) 2 )
diff --git a/svtools/source/control/ctrlbox.cxx 
b/svtools/source/control/ctrlbox.cxx
index 70a040e..68047af 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -866,7 +866,7 @@ long LineListBox::GetEntryDistance( sal_uInt16 nPos ) const
 sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const
 {
 ImpLineListData* pData = (nPos  pLineList-size()) ? (*pLineList)[ nPos ] 
: NULL;
-return ( pData ) ? pData-GetStyle() : STYLE_SOLID;
+return ( pData ) ? pData-GetStyle() : STYLE_NONE;
 }
 
 // ---
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 2 commits - sw/source

2012-01-30 Thread Noel Power
 sw/source/filter/xml/xmlithlp.cxx |   35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)

New commits:
commit fcdf6cde90c7f9f941a5664d4b0866adcfab5db9
Author: Michael Stahl mst...@redhat.com
Date:   Wed Jan 25 17:56:08 2012 +0100

fdo#38542: sw: ODF import: prevent border width overriding:

If there is a width in fo:border{,-left,-right,-top,-bottom}, then
it should not override the values from
style:border-line-width{,-left,-right,-top,-bottom}, which are more
specific in case of double borders.

Signed-off-by: Cédric Bosdonnat cedric.bosdonnat@free.fr
Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/sw/source/filter/xml/xmlithlp.cxx 
b/sw/source/filter/xml/xmlithlp.cxx
index 7946b81..6fe9072 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -198,23 +198,28 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine* 
rpLine,
sal_Bool bDouble = (bHasWidth  API_LINE_DOUBLE == nStyle ) ||
rpLine-GetDistance();
 
-   // The width has to be changed
-   if( bHasWidth  USHRT_MAX != nNamedWidth )
+   // fdo#38542: for double borders, do not override the width
+   // set via style:border-line-width{,-left,-right,-top,-bottom}
+   if (!bDouble || !rpLine-GetWidth())
{
-   if ( bDouble )
-   rpLine-SetStyle( ::editeng::DOUBLE );
-   rpLine-SetWidth( aBorderWidths[nNamedWidth] );
-   }
-   else
-   {
-   if( !bHasWidth )
-   nWidth = rpLine-GetInWidth() + rpLine-GetDistance() +
-   rpLine-GetOutWidth();
-
-   rpLine-SetWidth( nWidth );
-   if (bDouble)
-   {   // fdo#38542: divide width by 3 for outer line, gap, inner line
-   rpLine-ScaleMetrics(1, 3);
+   // The width has to be changed
+   if (bHasWidth  USHRT_MAX != nNamedWidth)
+   {
+   if (bDouble)
+   rpLine-SetStyle( ::editeng::DOUBLE );
+   rpLine-SetWidth( aBorderWidths[nNamedWidth] );
+   }
+   else
+   {
+   if (!bHasWidth)
+   nWidth = rpLine-GetInWidth() + rpLine-GetDistance() +
+   rpLine-GetOutWidth();
+
+   rpLine-SetWidth( nWidth );
+   if (bDouble)
+   { // fdo#38542: divide width by 3 for outer line, gap, inner 
line
+   rpLine-ScaleMetrics(1, 3);
+   }
}
}
lcl_frmitems_setXMLBorderStyle( *rpLine, nStyle );
commit 8e184c376ce77b3c27d7a2722b15b8f36de71ea5
Author: Michael Stahl mst...@redhat.com
Date:   Wed Jan 25 17:44:36 2012 +0100

fdo#38542: sw: ODF import: divide width by 3 for double borders

The problem is that the width from the fo:border{,-left,-right,-top,-bottom}
attributes is effectively tripled for double borders.

Signed-off-by: Cédric Bosdonnat cedric.bosdonnat@free.fr
Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/sw/source/filter/xml/xmlithlp.cxx 
b/sw/source/filter/xml/xmlithlp.cxx
index 6a50937..7946b81 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -212,6 +212,10 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine* rpLine,
rpLine-GetOutWidth();
 
rpLine-SetWidth( nWidth );
+   if (bDouble)
+   {   // fdo#38542: divide width by 3 for outer line, gap, inner line
+   rpLine-ScaleMetrics(1, 3);
+   }
}
lcl_frmitems_setXMLBorderStyle( *rpLine, nStyle );
}
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sal/systools

2012-01-30 Thread Noel Power
 sal/systools/win32/uwinapi/uwinapi.dxp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b572ebecf0b04288870d3a22fb8828dcf091d03d
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Sat Jan 28 13:49:16 2012 +0100

Avoid accidental linking with GetShortPathNameW from uwinapi.dll

Signed-off-by: Noel Power noel.po...@novell.com

diff --git a/sal/systools/win32/uwinapi/uwinapi.dxp 
b/sal/systools/win32/uwinapi/uwinapi.dxp
index 0eeb2a3..ff5bc44 100755
--- a/sal/systools/win32/uwinapi/uwinapi.dxp
+++ b/sal/systools/win32/uwinapi/uwinapi.dxp
@@ -22,4 +22,4 @@
 ;
 ;*
 
-GetShortPathNameW
+GetShortPathNameW PRIVATE
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: officecfg/registry sc/inc sc/source

2012-01-30 Thread Noel Power
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   13 +++-
 sc/inc/docoptio.hxx  |7 +-
 sc/source/core/data/document.cxx |   16 -
 sc/source/core/tool/docoptio.cxx |   17 -
 sc/source/ui/inc/optdlg.hrc  |2 
 sc/source/ui/inc/tpdefaults.hxx  |7 +-
 sc/source/ui/optdlg/tpdefaults.cxx   |   46 ---
 sc/source/ui/src/optdlg.src  |   13 
 8 files changed, 103 insertions(+), 18 deletions(-)

New commits:
commit 58ee2fad1ecb326f46795249b42fb23be3f8403e
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Mon Jan 30 12:56:37 2012 +

Option to set tab prefix for new worksheets

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 3efc2e3..700d716 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1610,11 +1610,11 @@
  info
descContains various defaults settings./desc
  /info
- group oor:name=Other
+ group oor:name=Sheet
info
- descOther Program defaults/desc
+ descSheet defaults/desc
/info
-   prop oor:name=TabCount oor:type=xs:int 
oor:nillable=false
+   prop oor:name=SheetCount oor:type=xs:int 
oor:nillable=false
  !-- UIHints: Tools - Options - Spreadsheet - 
Defaults --
  info
authorAlbert Thuswaldner/author
@@ -1622,6 +1622,13 @@
  /info
  value3/value
/prop
+   prop oor:name=SheetPrefix oor:type=xs:string
+ !-- UIHints: Tools - Options - Spreadsheet - 
Defaults --
+ info
+   authorAlbert Thuswaldner/author
+   descOption to set the prefix name for new 
sheet tabs/desc
+ /info
+   /prop
  /group
/group
   /component
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index 8557a82..a960ec0 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -42,7 +42,8 @@ class SC_DLLPUBLIC ScDocOptions
 {
 double fIterEps;// epsilon value dazu
 sal_uInt16 nIterCount;  // number
-SCTAB nInitTabCount;// number of Tabs for new Spreadssheet doc
+SCTAB nInitTabCount;// number of Tabs for new Spreadsheet doc
+::rtl::OUString aInitTabPrefix;   // The Tab prefix name in new 
Spreadsheet doc
 sal_uInt16 nPrecStandardFormat; // precision for standard format
 ScOptionsUtil::KeyBindingType eKeyBindingType;
 sal_uInt16 nDay;// Null date:
@@ -83,6 +84,8 @@ public:
 void   SetIterCount( sal_uInt16 nCount) { nIterCount = nCount; }
 SCTAB GetInitTabCount() const   { return nInitTabCount; }
 void   SetInitTabCount( SCTAB nTabs) { nInitTabCount = nTabs; }
+void   SetInitTabPrefix( ::rtl::OUString aPrefix) { aInitTabPrefix = 
aPrefix; }
+::rtl::OUString GetInitTabPrefix() const   { return 
aInitTabPrefix; }
 double GetIterEps() const   { return fIterEps; }
 void   SetIterEps( double fEps ){ fIterEps = fEps; }
 
@@ -139,6 +142,7 @@ inline const ScDocOptions ScDocOptions::operator=( const 
ScDocOptions rCpy )
 bIsIter = rCpy.bIsIter;
 nIterCount  = rCpy.nIterCount;
 nInitTabCount   = rCpy.nInitTabCount;
+aInitTabPrefix  = rCpy.aInitTabPrefix;
 fIterEps= rCpy.fIterEps;
 nPrecStandardFormat = rCpy.nPrecStandardFormat;
 eKeyBindingType = rCpy.eKeyBindingType;
@@ -168,6 +172,7 @@ inline bool ScDocOptions::operator==( const ScDocOptions 
rOpt ) const
   rOpt.bIsIter== bIsIter
   rOpt.nIterCount == nIterCount
   rOpt.nInitTabCount  == nInitTabCount
+  rOpt.aInitTabPrefix == aInitTabPrefix
   rOpt.fIterEps   == fIterEps
   rOpt.nPrecStandardFormat== nPrecStandardFormat
   rOpt.eKeyBindingType== eKeyBindingType
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index e5420cb..02790bc 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -95,6 +95,7 @@
 #include tabprotection.hxx
 #include clipparam.hxx
 #include stlalgorithm.hxx
+#include docoptio.hxx
 
 #include map
 #include limits
@@ -142,7 +143,10 @@ void ScDocument::MakeTable( SCTAB nTab,bool 
_bNeedsNameCheck )
 {
 if ( ValidTab(nTab)  ( nTab = 

[Libreoffice-commits] .: sc/source

2012-01-25 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   18 +++---
 sc/source/ui/inc/inputwin.hxx |2 ++
 2 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 7580fff93292d08bc6f42792f256b832f5c4bad6
Author: Noel Power noel.po...@novell.com
Date:   Wed Jan 25 12:36:17 2012 +

fix initial height of multiline input window

There is a hardcoded preferred height for the input window that was getting 
picked up becuase the result of GetTextHeight was just '1' ( due to no font 
being set up ) We shouldn't use a hardcoded value, we should always use the 
proper text height e.g. the result of a successfull call to  GetTextHeight() ( 
the patch makes sure we get a decent result from this call )

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 1ae727c..3771d37 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1128,6 +1128,15 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, 
ScTabViewShell* pViewSh
 mnLastExpandedLines( INPUTWIN_MULTILINES ),
 mbInvalidate( false )
 {
+// Calculate the text height, need to set a font for that. Probably we 
could set the font
+// here ( on this Window ) and avoid the temp Window. OTOH vcl is such a 
mystery I prefer
+// to minimise possible unexpected side-affects this way
+Window aTmp(this, WB_BORDER );
+aTmp.SetFont(aTextFont);
+mnTextHeight = LogicToPixel(Size(0,aTmp.GetTextHeight())).Height() ;
+Size aBorder;
+aBorder = CalcWindowSize( aBorder);
+mnBorderHeight = aBorder.Height();
 nTextStartPos = TEXT_MULTI_STARTPOS;
 }
 
@@ -1158,13 +1167,8 @@ EditView* ScMultiTextWnd::GetEditView()
 
 long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
 {
-long height = ( LogicToPixel(Size(0,GetTextHeight())).Height() );
-// need to figure out why GetTextHeight is not set up when I need it
-// some initialisation timing issue ?
-height = Max ( long( 14 ), height );
-// add padding ( for the borders of the window I guess ) otherwise we
-// chop slightly the top and bottom of whatever is in the inputbox
-return ( nLines *  height ) + 4;
+// add padding ( for the borders of the window )
+return ( nLines *  mnTextHeight ) + mnBorderHeight;
 }
 
 void ScMultiTextWnd::SetNumLines( long nLines )
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index eec7fed..185ac45 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -204,6 +204,8 @@ private:
 ScInputBarGroup mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
+long mnTextHeight;
+long mnBorderHeight;
 bool mbInvalidate;
 };
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source solenv/bin

2012-01-24 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   15 +++
 sc/source/ui/inc/inputwin.hxx |1 +
 solenv/bin/ooinstall  |2 +-
 3 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit 1f0ba007489e77e4145fc840cc3a878772494fd7
Author: Noel Power noel.po...@novell.com
Date:   Tue Jan 24 10:40:21 2012 +

fix ( hopefully ) viewing artifacts in input line fdo#44391

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index f6404a7..1ae727c 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1125,7 +1125,8 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, 
ScTabViewShell* pViewSh
 ScTextWnd( pParen, pViewSh ),
 mrGroupBar(* pParen ),
 mnLines( 1 ),
-mnLastExpandedLines( INPUTWIN_MULTILINES )
+mnLastExpandedLines( INPUTWIN_MULTILINES ),
+mbInvalidate( false )
 {
 nTextStartPos = TEXT_MULTI_STARTPOS;
 }
@@ -1138,7 +1139,14 @@ void ScMultiTextWnd::Paint( const Rectangle rRec )
 {
 EditView* pView = GetEditView();
 if ( pView )
-pView-Paint( rRec );
+{
+if ( mbInvalidate )
+{
+pView-Invalidate();
+mbInvalidate = false;
+}
+pEditView-Paint( rRec );
+}
 }
 
 EditView* ScMultiTextWnd::GetEditView()
@@ -1403,8 +1411,7 @@ void ScMultiTextWnd::SetTextString( const String 
rNewString )
 // inputbar window scrolled to the bottom if we do that here ( because the 
tableview and topview
 // are synced I guess ).
 // should fix that I suppose :-/ need to look a bit further into that
-if ( pEditView )
-pEditView-Invalidate();
+mbInvalidate = true; // ensure next Paint ( that uses editengine ) call 
will call Invalidate first
 ScTextWnd::SetTextString( rNewString );
 SetScrollBarRange();
 DoScroll();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 7b5bc28..eec7fed 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -204,6 +204,7 @@ private:
 ScInputBarGroup mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
+bool mbInvalidate;
 };
 
 class ScInputBarGroup : public ScTextWndBase
diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall
index 794e81b..3b60909 100755
--- a/solenv/bin/ooinstall
+++ b/solenv/bin/ooinstall
@@ -50,7 +50,7 @@ for $arg (@ARGV) {
$path = Cwd::realpath( $ENV{DESTDIR} . $arg );
if (!$do_link) {
my $destdir = Cwd::realpath( $ENV{DESTDIR} );
-   $path =~ s|$destdir||;
+#  $path =~ s|$destdir||;
}
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - solenv/bin

2012-01-24 Thread Noel Power
 solenv/bin/ooinstall |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f00b387faeca2902909ce181f2f772a51ec4527f
Author: Noel Power noel.po...@novell.com
Date:   Tue Jan 24 11:14:38 2012 +

fix ( hopefully ) viewing artifacts in input line fdo#44391

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index f6404a7..1ae727c 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1125,7 +1125,8 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, 
ScTabViewShell* pViewSh
 ScTextWnd( pParen, pViewSh ),
 mrGroupBar(* pParen ),
 mnLines( 1 ),
-mnLastExpandedLines( INPUTWIN_MULTILINES )
+mnLastExpandedLines( INPUTWIN_MULTILINES ),
+mbInvalidate( false )
 {
 nTextStartPos = TEXT_MULTI_STARTPOS;
 }
@@ -1138,7 +1139,14 @@ void ScMultiTextWnd::Paint( const Rectangle rRec )
 {
 EditView* pView = GetEditView();
 if ( pView )
-pView-Paint( rRec );
+{
+if ( mbInvalidate )
+{
+pView-Invalidate();
+mbInvalidate = false;
+}
+pEditView-Paint( rRec );
+}
 }
 
 EditView* ScMultiTextWnd::GetEditView()
@@ -1403,8 +1411,7 @@ void ScMultiTextWnd::SetTextString( const String 
rNewString )
 // inputbar window scrolled to the bottom if we do that here ( because the 
tableview and topview
 // are synced I guess ).
 // should fix that I suppose :-/ need to look a bit further into that
-if ( pEditView )
-pEditView-Invalidate();
+mbInvalidate = true; // ensure next Paint ( that uses editengine ) call 
will call Invalidate first
 ScTextWnd::SetTextString( rNewString );
 SetScrollBarRange();
 DoScroll();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 7b5bc28..eec7fed 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -204,6 +204,7 @@ private:
 ScInputBarGroup mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
+bool mbInvalidate;
 };
 
 class ScInputBarGroup : public ScTextWndBase
commit e8681bede97a64d03eaa01556d19f5822f898c26
Author: Noel Power noel.po...@novell.com
Date:   Tue Jan 24 11:13:04 2012 +

Revert fix ( hopefully ) viewing artifacts in input line fdo#44391

This reverts commit 1f0ba007489e77e4145fc840cc3a878772494fd7.

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 1ae727c..f6404a7 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1125,8 +1125,7 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, 
ScTabViewShell* pViewSh
 ScTextWnd( pParen, pViewSh ),
 mrGroupBar(* pParen ),
 mnLines( 1 ),
-mnLastExpandedLines( INPUTWIN_MULTILINES ),
-mbInvalidate( false )
+mnLastExpandedLines( INPUTWIN_MULTILINES )
 {
 nTextStartPos = TEXT_MULTI_STARTPOS;
 }
@@ -1139,14 +1138,7 @@ void ScMultiTextWnd::Paint( const Rectangle rRec )
 {
 EditView* pView = GetEditView();
 if ( pView )
-{
-if ( mbInvalidate )
-{
-pView-Invalidate();
-mbInvalidate = false;
-}
-pEditView-Paint( rRec );
-}
+pView-Paint( rRec );
 }
 
 EditView* ScMultiTextWnd::GetEditView()
@@ -1411,7 +1403,8 @@ void ScMultiTextWnd::SetTextString( const String 
rNewString )
 // inputbar window scrolled to the bottom if we do that here ( because the 
tableview and topview
 // are synced I guess ).
 // should fix that I suppose :-/ need to look a bit further into that
-mbInvalidate = true; // ensure next Paint ( that uses editengine ) call 
will call Invalidate first
+if ( pEditView )
+pEditView-Invalidate();
 ScTextWnd::SetTextString( rNewString );
 SetScrollBarRange();
 DoScroll();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index eec7fed..7b5bc28 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -204,7 +204,6 @@ private:
 ScInputBarGroup mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
-bool mbInvalidate;
 };
 
 class ScInputBarGroup : public ScTextWndBase
diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall
index 3b60909..794e81b 100755
--- a/solenv/bin/ooinstall
+++ b/solenv/bin/ooinstall
@@ -50,7 +50,7 @@ for $arg (@ARGV) {
$path = Cwd::realpath( $ENV{DESTDIR} . $arg );
if (!$do_link) {
my $destdir = Cwd::realpath( $ENV{DESTDIR} );
-#  $path =~ s|$destdir||;
+   $path =~ s|$destdir||;
}
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2012-01-24 Thread Noel Power
 basic/source/sbx/sbxvalue.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 68a55b78362209fb6244ed31e23042af60c39c85
Author: Noel Power noel.po...@novell.com
Date:   Tue Jan 24 12:27:19 2012 +

tweak treatment of '+/-' operators when dealing with Date types

Any '+' operation involving Date types results in a Date, '-' of a Date 
type results in a Date except if both LHS  RHS are Date(s)

diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index e67335c..f4aab28 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1272,10 +1272,15 @@ Lbl_OpIsDouble:
 SetError( SbxERR_NOTIMP );
 }
 // Date with + or - needs special handling that
-// forces the Date type ( except if lhs AND rhs are already
-// Date types
-if( ( eOp == SbxPLUS || eOp == SbxMINUS )  ( ( GetType() 
== SbxDATE || rOp.GetType() == SbxDATE )  ( GetType() != rOp.GetType() ) ) )
-aL.eType = SbxDATE;
+// forces the Date type. If the operation is '+' the
+// result is always a Date, if '-' the result is only
+// a Date if one of lhs or rhs ( but not both ) is already
+// a Date
+if( ( GetType() == SbxDATE || rOp.GetType() == SbxDATE ) )
+{
+if( eOp == SbxPLUS  || ( ( eOp == SbxMINUS )   ( 
GetType() != rOp.GetType() ) ) )
+aL.eType = SbxDATE;
+}
 
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source

2012-01-17 Thread Noel Power
 basic/source/sbx/sbxvalue.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 9eef1e2961f9607fb235b43516bfe9f8fc24eaef
Author: Noel Power noel.po...@novell.com
Date:   Tue Jan 17 10:11:22 2012 +

fix Date 'operation' Date foobar

Post commit 9df90559d40f029479c4481e31f88737b70742f6 we have problems where 
Date types are added and subtracted. In fact that commit makes a subset of 
numberic operation return the date type. This fix ensures that the Date type is 
only applied when processing '+' ( old behaviour broken by the commit above ) 
and '-' ( new behaviour for consistency ) If both LHS  RHS are Date types then 
the result of the operations in question return the Double type.

diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index add49e1..e1aa67d 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1271,8 +1271,10 @@ Lbl_OpIsDouble:
 default:
 SetError( SbxERR_NOTIMP );
 }
-// #45465 Date needs with + a special handling: forces 
date type
-if( GetType() == SbxDATE || rOp.GetType() == SbxDATE )
+// Date with + or - needs special handling that
+// forces the Date type ( except if lhs AND rhs are already
+// Date types
+if( ( eOp == SbxPLUS || eOp == SbxMINUS )  ( ( GetType() 
== SbxDATE || rOp.GetType() == SbxDATE )  ( GetType() != rOp.GetType() ) ) )
 aL.eType = SbxDATE;
 
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - basic/source

2012-01-13 Thread Noel Power
 basic/source/sbx/sbxvalue.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 726344abbbec4beab5525c7890a360f9877d1ffa
Author: Noel Power noel.po...@novell.com
Date:   Thu Jan 12 15:46:52 2012 +

restore special DATE handling code for SbxValue::Compute fdo#44385

restore code that seemed to be erroneously moved as part of the currency 
enhancement feature

diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index e21234c..6d9d718 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1311,9 +1311,6 @@ Lbl_OpIsDouble:
 else aL.nDouble /= aR.nDouble; break;
 case SbxPLUS:
 aL.nDouble += aR.nDouble; break;
-// #45465 Date needs with + a special handling: 
forces date type
-if( GetType() == SbxDATE || rOp.GetType() == 
SbxDATE )
-aL.eType = SbxDATE;
 case SbxMINUS:
 aL.nDouble -= aR.nDouble; break;
 case SbxNEG:
@@ -1321,6 +1318,9 @@ Lbl_OpIsDouble:
 default:
 SetError( SbxERR_NOTIMP );
 }
+// #45465 Date needs with + a special handling: forces 
date type
+if( Op == SbxPLUS  (GetType() == SbxDATE || 
rOp.GetType() == SbxDATE )
+aL.eType = SbxDATE;
 
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-01-13 Thread Noel Power
 sc/source/filter/excel/xename.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit a0b20e1f023dedc849baf68f278c6f6df0660b11
Author: Noel Power noel.po...@novell.com
Date:   Thu Jan 12 13:00:55 2012 +

fix definedName corruption for xlsx export ( bnc#741182 )

set symbol for builtin name using rangelist

diff --git a/sc/source/filter/excel/xename.cxx 
b/sc/source/filter/excel/xename.cxx
index 08fae59..0c82a08 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -139,7 +139,7 @@ public:
 sal_uInt16  InsertName( SCTAB nTab, sal_uInt16 nScNameIdx );
 
 /** Inserts a new built-in defined name. */
-sal_uInt16  InsertBuiltInName( sal_Unicode cBuiltIn, 
XclTokenArrayRef xTokArr, SCTAB nScTab );
+sal_uInt16  InsertBuiltInName( sal_Unicode cBuiltIn, 
XclTokenArrayRef xTokArr, SCTAB nScTab, const ScRangeList aRangeList );
 sal_uInt16  InsertBuiltInName( sal_Unicode cBuiltIn, 
XclTokenArrayRef xTokArr, const ScRange aRange );
 /** Inserts a new defined name. Sets another unused name, if rName already 
exists. */
 sal_uInt16  InsertUniqueName( const String rName, 
XclTokenArrayRef xTokArr, SCTAB nScTab );
@@ -410,11 +410,14 @@ sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( 
sal_Unicode cBuiltIn, XclTo
 return Append( xName );
 }
 
-sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, 
XclTokenArrayRef xTokArr, SCTAB nScTab )
+sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, 
XclTokenArrayRef xTokArr, SCTAB nScTab, const ScRangeList rRangeList )
 {
 XclExpNameRef xName( new XclExpName( GetRoot(), cBuiltIn ) );
 xName-SetTokenArray( xTokArr );
 xName-SetLocalTab( nScTab );
+String sSymbol;
+rRangeList.Format( sSymbol, SCR_ABS_3D, GetDocPtr(), 
::formula::FormulaGrammar::CONV_XL_A1 );
+xName-SetSymbol( sSymbol );
 return Append( xName );
 }
 
@@ -725,7 +728,7 @@ sal_uInt16 XclExpNameManager::InsertBuiltInName( 
sal_Unicode cBuiltIn, const ScR
 if( !rRangeList.empty() )
 {
 XclTokenArrayRef xTokArr = GetFormulaCompiler().CreateFormula( 
EXC_FMLATYPE_NAME, rRangeList );
-nNameIdx = mxImpl-InsertBuiltInName( cBuiltIn, xTokArr, 
rRangeList.front()-aStart.Tab() );
+nNameIdx = mxImpl-InsertBuiltInName( cBuiltIn, xTokArr, 
rRangeList.front()-aStart.Tab(), rRangeList );
 }
 return nNameIdx;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basctl/uiconfig default_images/cmd officecfg/registry ooo_custom_images/hicontrast ooo_custom_images/human ooo_custom_images/industrial ooo_custom_images/oxygen sv

2012-01-10 Thread Noel Power
 ooo_custom_images/oxygen/cmd/lch_insertformcheck.png  |binary
 ooo_custom_images/oxygen/cmd/lch_insertformcombo.png  |binary
 ooo_custom_images/oxygen/cmd/lch_insertformhscroll.png|binary
 ooo_custom_images/oxygen/cmd/lch_insertformlist.png   |binary
 ooo_custom_images/oxygen/cmd/lch_insertformradio.png  |binary
 ooo_custom_images/oxygen/cmd/lch_insertformspin.png   |binary
 ooo_custom_images/oxygen/cmd/lch_insertformvscroll.png|binary
 ooo_custom_images/oxygen/cmd/sc_insertformcheck.png   |binary
 ooo_custom_images/oxygen/cmd/sc_insertformcombo.png   |binary
 ooo_custom_images/oxygen/cmd/sc_insertformhscroll.png |binary
 ooo_custom_images/oxygen/cmd/sc_insertformlist.png|binary
 ooo_custom_images/oxygen/cmd/sc_insertformradio.png   |binary
 ooo_custom_images/oxygen/cmd/sc_insertformspin.png|binary
 ooo_custom_images/oxygen/cmd/sc_insertformvscroll.png |binary
 ooo_custom_images/oxygen/cmd/sch_insertformcheck.png  |binary
 ooo_custom_images/oxygen/cmd/sch_insertformcombo.png  |binary
 ooo_custom_images/oxygen/cmd/sch_insertformhscroll.png|binary
 ooo_custom_images/oxygen/cmd/sch_insertformlist.png   |binary
 ooo_custom_images/oxygen/cmd/sch_insertformradio.png  |binary
 ooo_custom_images/oxygen/cmd/sch_insertformspin.png   |binary
 ooo_custom_images/oxygen/cmd/sch_insertformvscroll.png|binary
 svx/sdi/svx.sdi   |   14 
-
 85 files changed, 21 insertions(+), 22 deletions(-)

New commits:
commit ffbd3846d40eaf3dc8e8fa37e57d48ff7da88a5b
Author: Noel Power noel.po...@novell.com
Date:   Fri Jan 6 09:43:42 2012 +

some misc tidyup ( that was reverted )

some id and string renaming from b08e273015d72251b68bca86535cf5919dd9e40e 
was reverted, those parts of the changes are reapplied here

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index de61601..2f03dde 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -471,43 +471,43 @@ shell BasicIDEShell
 StateMethod = GetState;
 ]
 
-SID_INSERT_RADIO
+SID_INSERT_FORM_RADIO
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_CHECK
+SID_INSERT_FORM_CHECK
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_LIST
+SID_INSERT_FORM_LIST
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_COMBO
+SID_INSERT_FORM_COMBO
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_VSCROLL
+SID_INSERT_FORM_VSCROLL
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_HSCROLL
+SID_INSERT_FORM_HSCROLL
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_SPIN
+SID_INSERT_FORM_SPIN
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 2b5829b..55e72c9 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -401,13 +401,13 @@ void DialogWindow::GetState( SfxItemSet rSet )
 rSet.DisableItem( nWh );
 }
 break;
-case SID_INSERT_RADIO:
-case SID_INSERT_CHECK:
-case SID_INSERT_LIST:
-case SID_INSERT_COMBO:
-case SID_INSERT_VSCROLL:
-case SID_INSERT_HSCROLL:
-case SID_INSERT_SPIN:
+case SID_INSERT_FORM_RADIO:
+case SID_INSERT_FORM_CHECK:
+case SID_INSERT_FORM_LIST:
+case SID_INSERT_FORM_COMBO:
+case SID_INSERT_FORM_VSCROLL:
+case SID_INSERT_FORM_HSCROLL:
+case SID_INSERT_FORM_SPIN:
 {
 if ( !bIsCalc || IsReadOnly() )
 rSet.DisableItem( nWh );
@@ -453,31 +453,31 @@ void DialogWindow::ExecuteCommand( SfxRequest rReq )
 pBindings-Invalidate( SID_DOC_MODIFIED );
 }
 break;
-case SID_INSERT_RADIO:
+case SID_INSERT_FORM_RADIO:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMRADIO );
 break;
-case SID_INSERT_CHECK:
+case SID_INSERT_FORM_CHECK:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMCHECK );
 break;
-case SID_INSERT_LIST:
+case SID_INSERT_FORM_LIST

[Libreoffice-commits] .: basic/source

2012-01-09 Thread Noel Power
 basic/source/sbx/sbxvalue.cxx |   13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 9df90559d40f029479c4481e31f88737b70742f6
Author: Noel Power noel.po...@novell.com
Date:   Mon Jan 9 13:09:37 2012 +

restore special DATE handling code for SbxValue::Compute

restore code that seemed to be erroneously moved as part of the currency 
enhancement feature

diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 7f00ecc..add49e1 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1264,16 +1264,6 @@ Lbl_OpIsDouble:
 else aL.nDouble /= aR.nDouble; break;
 case SbxPLUS:
 aL.nDouble += aR.nDouble; break;
-#if 0
-// See 'break' on preceding line... this
-// is unreachable code. Do not delete this
-// #if 0 block unless you know for sure
-// the 'break' above is intentional.
-
-// #45465 Date needs with + a special handling: 
forces date type
-if( GetType() == SbxDATE || rOp.GetType() == 
SbxDATE )
-aL.eType = SbxDATE;
-#endif
 case SbxMINUS:
 aL.nDouble -= aR.nDouble; break;
 case SbxNEG:
@@ -1281,6 +1271,9 @@ Lbl_OpIsDouble:
 default:
 SetError( SbxERR_NOTIMP );
 }
+// #45465 Date needs with + a special handling: forces 
date type
+if( GetType() == SbxDATE || rOp.GetType() == SbxDATE )
+aL.eType = SbxDATE;
 
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - basctl/uiconfig default_images/cmd officecfg/registry ooo_custom_images/hicontrast ooo_custom_images/human ooo_custom_images/industrial

2012-01-09 Thread Noel Power
 ooo_custom_images/oxygen/cmd/lch_insertformcheck.png  |binary
 ooo_custom_images/oxygen/cmd/lch_insertformcombo.png  |binary
 ooo_custom_images/oxygen/cmd/lch_insertformhscroll.png|binary
 ooo_custom_images/oxygen/cmd/lch_insertformlist.png   |binary
 ooo_custom_images/oxygen/cmd/lch_insertformradio.png  |binary
 ooo_custom_images/oxygen/cmd/lch_insertformspin.png   |binary
 ooo_custom_images/oxygen/cmd/lch_insertformvscroll.png|binary
 ooo_custom_images/oxygen/cmd/sc_insertformcheck.png   |binary
 ooo_custom_images/oxygen/cmd/sc_insertformcombo.png   |binary
 ooo_custom_images/oxygen/cmd/sc_insertformhscroll.png |binary
 ooo_custom_images/oxygen/cmd/sc_insertformlist.png|binary
 ooo_custom_images/oxygen/cmd/sc_insertformradio.png   |binary
 ooo_custom_images/oxygen/cmd/sc_insertformspin.png|binary
 ooo_custom_images/oxygen/cmd/sc_insertformvscroll.png |binary
 ooo_custom_images/oxygen/cmd/sch_insertformcheck.png  |binary
 ooo_custom_images/oxygen/cmd/sch_insertformcombo.png  |binary
 ooo_custom_images/oxygen/cmd/sch_insertformhscroll.png|binary
 ooo_custom_images/oxygen/cmd/sch_insertformlist.png   |binary
 ooo_custom_images/oxygen/cmd/sch_insertformradio.png  |binary
 ooo_custom_images/oxygen/cmd/sch_insertformspin.png   |binary
 ooo_custom_images/oxygen/cmd/sch_insertformvscroll.png|binary
 svx/sdi/svx.sdi   |   14 
-
 85 files changed, 21 insertions(+), 22 deletions(-)

New commits:
commit bffe72a6ac6f4bbfc5be689aaf5839157221970d
Author: Noel Power noel.po...@novell.com
Date:   Fri Jan 6 09:43:42 2012 +

some misc tidyup ( that was reverted )

some id and string renaming from b08e273015d72251b68bca86535cf5919dd9e40e 
was reverted, those parts of the changes are reapplied here

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index de61601..2f03dde 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -471,43 +471,43 @@ shell BasicIDEShell
 StateMethod = GetState;
 ]
 
-SID_INSERT_RADIO
+SID_INSERT_FORM_RADIO
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_CHECK
+SID_INSERT_FORM_CHECK
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_LIST
+SID_INSERT_FORM_LIST
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_COMBO
+SID_INSERT_FORM_COMBO
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_VSCROLL
+SID_INSERT_FORM_VSCROLL
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_HSCROLL
+SID_INSERT_FORM_HSCROLL
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_SPIN
+SID_INSERT_FORM_SPIN
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 2f7ccfb..a4fbd19 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -402,13 +402,13 @@ void DialogWindow::GetState( SfxItemSet rSet )
 rSet.DisableItem( nWh );
 }
 break;
-case SID_INSERT_RADIO:
-case SID_INSERT_CHECK:
-case SID_INSERT_LIST:
-case SID_INSERT_COMBO:
-case SID_INSERT_VSCROLL:
-case SID_INSERT_HSCROLL:
-case SID_INSERT_SPIN:
+case SID_INSERT_FORM_RADIO:
+case SID_INSERT_FORM_CHECK:
+case SID_INSERT_FORM_LIST:
+case SID_INSERT_FORM_COMBO:
+case SID_INSERT_FORM_VSCROLL:
+case SID_INSERT_FORM_HSCROLL:
+case SID_INSERT_FORM_SPIN:
 {
 if ( !bIsCalc || IsReadOnly() )
 rSet.DisableItem( nWh );
@@ -454,31 +454,31 @@ void DialogWindow::ExecuteCommand( SfxRequest rReq )
 pBindings-Invalidate( SID_DOC_MODIFIED );
 }
 break;
-case SID_INSERT_RADIO:
+case SID_INSERT_FORM_RADIO:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMRADIO );
 break;
-case SID_INSERT_CHECK:
+case SID_INSERT_FORM_CHECK:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMCHECK );
 break;
-case SID_INSERT_LIST:
+case SID_INSERT_FORM_LIST

[Libreoffice-commits] .: basctl/source

2011-12-15 Thread Noel Power
 basctl/source/basicide/scriptdocument.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f269629d1b0182d89b2f5a769fbb0f8dcb815ec3
Author: Noel Power noel.po...@novell.com
Date:   Thu Dec 15 15:13:04 2011 +

fix mistaken String::CreateFromInt32 - OUString::valueOf conversion

diff --git a/basctl/source/basicide/scriptdocument.cxx 
b/basctl/source/basicide/scriptdocument.cxx
index e75affa..a194029 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -1311,7 +1311,7 @@ namespace basctl
 ::std::insert_iterator ::std::set ::rtl::OUString  ( 
aUsedNamesCheck, aUsedNamesCheck.begin() ) );
 
 bool bValid = false;
-sal_uInt16 i = 1;
+sal_Int32 i = 1;
 while ( !bValid )
 {
 aObjectName = aBaseName;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-15 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |7 ---
 sc/source/ui/inc/inputwin.hxx |1 -
 unusedcode.easy   |1 -
 3 files changed, 9 deletions(-)

New commits:
commit 63a817d2fb00f248053566c8b8364667432fa8b3
Author: Noel Power noel.po...@novell.com
Date:   Wed Dec 14 14:02:29 2011 +

remove unused ScInputBarGroup::GainFocus

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 2588cae..1793fae 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -987,13 +987,6 @@ void ScInputBarGroup::Resize()
 Invalidate();
 }
 
-
-void ScInputBarGroup::GainFocus()
-{
-aMultiTextWnd.GrabFocus();
-}
-
-
 void ScInputBarGroup::StopEditEngine( sal_Bool bAll )
 {
 aMultiTextWnd.StopEditEngine( bAll );
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 1f200c1..7b5bc28 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -223,7 +223,6 @@ public:
 virtual const String   GetTextString() const;
 virtual voidStopEditEngine( sal_Bool bAll );
 voidInitEditEngine(SfxObjectShell* pObjSh);
-voidGainFocus();
 voidSetFormulaMode( sal_Bool bSet );
 boolIsFocus();
 voidMakeDialogEditView();
diff --git a/unusedcode.easy b/unusedcode.easy
index 47b983a..7b36792 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -349,7 +349,6 @@ ScHTMLColOffset_SAR::Replace(unsigned long const, unsigned 
short)
 ScHTMLColOffset_SAR::Replace(unsigned long const*, unsigned short, unsigned 
short)
 ScHTMLColOffset_SAR::_ForEach(unsigned short, unsigned short, unsigned char 
(*)(unsigned long const, void*), void*)
 ScHorizontalValueIterator::GetCurNumFmtInfo(short, unsigned long)
-ScInputBarGroup::GainFocus()
 ScJobSetup::ScJobSetup(SfxPrinter*)
 ScLeftFooterEditPage::GetRanges()
 ScLeftHeaderEditPage::GetRanges()
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sc/source unusedcode.easy

2011-12-15 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   10 +++---
 sc/source/ui/inc/inputwin.hxx |1 -
 unusedcode.easy   |1 -
 3 files changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 9cd03b7a91c63066cb061966b474ee736ceddbdd
Author: Noel Power noel.po...@novell.com
Date:   Wed Dec 14 14:02:29 2011 +

remove unused ScInputBarGroup::GainFocus

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 2588cae..1793fae 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -987,13 +987,6 @@ void ScInputBarGroup::Resize()
 Invalidate();
 }
 
-
-void ScInputBarGroup::GainFocus()
-{
-aMultiTextWnd.GrabFocus();
-}
-
-
 void ScInputBarGroup::StopEditEngine( sal_Bool bAll )
 {
 aMultiTextWnd.StopEditEngine( bAll );
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 1f200c1..7b5bc28 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -223,7 +223,6 @@ public:
 virtual const String   GetTextString() const;
 virtual voidStopEditEngine( sal_Bool bAll );
 voidInitEditEngine(SfxObjectShell* pObjSh);
-voidGainFocus();
 voidSetFormulaMode( sal_Bool bSet );
 boolIsFocus();
 voidMakeDialogEditView();
diff --git a/unusedcode.easy b/unusedcode.easy
index b6db194..7ef3336 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -392,7 +392,6 @@ ScHTMLColOffset_SAR::Replace(unsigned long const, unsigned 
short)
 ScHTMLColOffset_SAR::Replace(unsigned long const*, unsigned short, unsigned 
short)
 ScHTMLColOffset_SAR::_ForEach(unsigned short, unsigned short, unsigned char 
(*)(unsigned long const, void*), void*)
 ScHorizontalValueIterator::GetCurNumFmtInfo(short, unsigned long)
-ScInputBarGroup::GainFocus()
 ScJobSetup::ScJobSetup(SfxPrinter*)
 ScLeftFooterEditPage::GetRanges()
 ScLeftHeaderEditPage::GetRanges()
commit ea925e2415bb751488f510ca48b96d5702fa87f9
Author: Noel Power noel.po...@novell.com
Date:   Wed Dec 14 12:49:28 2011 +

if editing in formulabar restore focus to inputline after expand/collapse

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index b9ab412..2588cae 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1061,6 +1061,9 @@ IMPL_LINK( ScInputBarGroup, ClickHdl, PushButton*, 
EMPTYARG )
 aMultiTextWnd.SetNumLines( aMultiTextWnd.GetLastNumExpandedLines() );
 }
 TriggerToolboxLayout();
+// Restore focus to input line(s) if necessary
+if (  SC_MOD()-GetInputHdl()-IsTopMode() )
+aMultiTextWnd.GrabFocus();
 return 0;
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sc/source vcl/inc vcl/source

2011-12-14 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   29 +
 sc/source/ui/inc/inputwin.hxx |4 +++-
 vcl/inc/vcl/toolbox.hxx   |   11 +--
 vcl/source/window/toolbox.cxx |6 --
 4 files changed, 37 insertions(+), 13 deletions(-)

New commits:
commit cefd323936db42b3414c01c4a6dfe1550b364ed3
Author: Noel Power noel.po...@novell.com
Date:   Wed Dec 14 10:49:10 2011 +

stop formulabar controls being repositioned vertically in multiline mode

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index a324994..b9ab412 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -534,6 +534,18 @@ void ScInputWindow::Resize()
 aTextWindow.Resize();
 Size aSize = GetSizePixel();
 aSize.Height() = CalcWindowSizePixel().Height();
+ScInputBarGroup* pGroupBar = dynamic_cast ScInputBarGroup*  ( 
pRuntimeWindow.get() );
+if ( pGroupBar )
+{
+// To ensure smooth display and prevent the items in the toolbar 
being
+// repositioned ( vertically ) we lock the vertical positioning of 
the toolbox
+// items when we are displaying  1 line.
+// So, we need to adjust the height of the toolbox accordingly. If 
we don't
+// then the largest item ( e.g. the GroupBar window ) will 
actually be
+// positioned such that the toolbar will cut off the bottom of 
that item
+if ( pGroupBar-GetNumLines()  1 )
+aSize.Height() += pGroupBar-GetVertOffset();
+}
 SetSizePixel(aSize);
 Invalidate();
 }
@@ -861,7 +873,8 @@ ScInputBarGroup::ScInputBarGroup(Window* pParent, 
ScTabViewShell* pViewSh)
 :   ScTextWndBase( pParent, WinBits(WB_HIDE |  WB_TABSTOP ) ),
 aMultiTextWnd( this, pViewSh ),
 aButton  ( this, WB_TABSTOP | WB_RECTSTYLE ),
-aScrollBar   ( this, WB_TABSTOP | WB_VERT | WB_DRAG )
+aScrollBar   ( this, WB_TABSTOP | WB_VERT | WB_DRAG ),
+nVertOffset  ( 0 )
 {
   aMultiTextWnd.Show();
   aMultiTextWnd.SetQuickHelpText( ScResId( SCSTR_QHELP_INPUTWND ) );
@@ -1057,6 +1070,13 @@ void ScInputBarGroup::TriggerToolboxLayout()
 ScInputWindow *pParent;
 pParent=dynamic_castScInputWindow*(w);
 SfxViewFrame* pViewFrm = SfxViewFrame::Current();
+
+// Capture the vertical position of this window in the toolbar, when we 
increase
+// the size of the toolbar to accomadate expanded line input we need to 
take this
+// into account
+if ( !nVertOffset )
+nVertOffset = pParent-GetItemPosRect( pParent-GetItemCount() - 1 
).Top();
+
 if ( pViewFrm )
 {
 Reference com::sun::star::beans::XPropertySet  xPropSet( 
pViewFrm-GetFrame().GetFrameInterface(), UNO_QUERY );
@@ -1071,7 +1091,7 @@ void ScInputBarGroup::TriggerToolboxLayout()
 if ( xLayoutManager.is() )
 {
 if ( aMultiTextWnd.GetNumLines()  1)
-pParent-SetToolbarLayoutMode( TBX_LAYOUT_TOP );
+pParent-SetToolbarLayoutMode( TBX_LAYOUT_LOCKVERT );
 else
 pParent-SetToolbarLayoutMode( TBX_LAYOUT_NORMAL );
 xLayoutManager-lock();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 1e896e7..1f200c1 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -231,12 +231,14 @@ public:
 ScrollBar  GetScrollBar() { return aScrollBar; }
 voidIncrementVerticalSize();
 voidDecrementVerticalSize();
+longGetNumLines() { return aMultiTextWnd.GetNumLines(); }
+longGetVertOffset() { return  nVertOffset; }
 private:
 voidTriggerToolboxLayout();
 ScMultiTextWnd  aMultiTextWnd;
 PushButton  aButton;
 ScrollBar   aScrollBar;
-
+longnVertOffset;
 DECL_LINK( ClickHdl,PushButton* );
 DECL_LINK( Impl_ScrollHdl,  ScrollBar* );
 
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 8b39005..039a0e3 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -160,12 +160,11 @@ enum ToolBoxButtonSize { TOOLBOX_BUTTONSIZE_DONTCARE, 
TOOLBOX_BUTTONSIZE_SMALL,
 // used for internal sizing calculations
 enum FloatingSizeMode { FSMODE_AUTO, FSMODE_FAVOURWIDTH, FSMODE_FAVOURHEIGHT };
 
-// TBX_LAYOUT_NORMAL - traditional layout, items are centered in the toolbar
-// TBX_LAYOUT_TOP- special mode (currently used for calc input/formula bar)
-//   where items are aligned with the top of highest item
-//  ( currently only valid for docked, single line,  horizontal
-//  toolbars )
-enum ToolBoxLayoutMode { TBX_LAYOUT_NORMAL, TBX_LAYOUT_TOP };
+// TBX_LAYOUT_NORMAL   - traditional layout, items are centered in the toolbar
+// TBX_LAYOUT_LOCKVERT - special mode (currently used

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

2011-12-13 Thread Noel Power
 sc/source/ui/app/inputhdl.cxx |4 +-
 sc/source/ui/app/inputwin.cxx |   69 --
 sc/source/ui/inc/inputwin.hxx |   15 ++---
 3 files changed, 45 insertions(+), 43 deletions(-)

New commits:
commit 4b6e0d42d72f8d2f5a18a0e0af595d884d96f552
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Tue Dec 13 00:08:41 2011 -0500

Pass the correct ScTabViewShell instance to the input box.

This eliminates the need to store the assigned doc pointer to cross-check
against whenever the edit engine is initialized.  It's cleaner this way
 fdo#43614 still remains fixed.

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 649050b..5843cda 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -159,18 +159,27 @@ bool lcl_isExperimentalMode()
 //  class ScInputWindow
 //==
 
-ScTextWndBase* lcl_chooseRuntimeImpl( Window* pParent )
+ScTextWndBase* lcl_chooseRuntimeImpl( Window* pParent, SfxBindings* pBind )
 {
+ScTabViewShell* pViewSh = NULL;
+SfxDispatcher* pDisp = pBind-GetDispatcher();
+if ( pDisp )
+{
+SfxViewFrame* pViewFrm = pDisp-GetFrame();
+if ( pViewFrm )
+pViewSh = PTR_CAST( ScTabViewShell, pViewFrm-GetViewShell() );
+}
+
 if ( !lcl_isExperimentalMode() )
-return new ScTextWnd( pParent );
-return new ScInputBarGroup( pParent );
+return new ScTextWnd( pParent, pViewSh );
+return new ScInputBarGroup( pParent, pViewSh );
 }
 
 ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
 // mit WB_CLIPCHILDREN, sonst Flicker
 ToolBox ( pParent, 
WinBits(WB_BORDER|WB_3DLOOK|WB_CLIPCHILDREN) ),
 aWndPos ( this ),
-pRuntimeWindow ( lcl_chooseRuntimeImpl( this ) ),
+pRuntimeWindow ( lcl_chooseRuntimeImpl( this, pBind ) ),
 aTextWindow( *pRuntimeWindow ),
 pInputHdl   ( NULL ),
 pBindings   ( pBind ),
@@ -848,9 +857,9 @@ void ScInputWindow::MouseButtonUp( const MouseEvent rMEvt )
 //  ScInputBarGroup
 //
 
-ScInputBarGroup::ScInputBarGroup(Window* pParent)
+ScInputBarGroup::ScInputBarGroup(Window* pParent, ScTabViewShell* pViewSh)
 :   ScTextWndBase( pParent, WinBits(WB_HIDE |  WB_TABSTOP ) ),
-aMultiTextWnd( this ),
+aMultiTextWnd( this, pViewSh ),
 aButton  ( this, WB_TABSTOP | WB_RECTSTYLE ),
 aScrollBar   ( this, WB_TABSTOP | WB_VERT | WB_DRAG )
 {
@@ -1094,11 +1103,10 @@ IMPL_LINK( ScInputBarGroup, Impl_ScrollHdl, ScrollBar*, 
EMPTYARG )
 //  ScMultiTextWnd
 //
 
-ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen )
+ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, ScTabViewShell* 
pViewSh )
 :
-ScTextWnd( pParen/*, WB_TABSTOP*/ ),
+ScTextWnd( pParen, pViewSh ),
 mrGroupBar(* pParen ),
-mpAssignedDocument( NULL ),
 mnLines( 1 ),
 mnLastExpandedLines( INPUTWIN_MULTILINES )
 {
@@ -1119,7 +1127,7 @@ void ScMultiTextWnd::Paint( const Rectangle rRec )
 EditView* ScMultiTextWnd::GetEditView()
 {
 if ( !pEditView )
-InitEditEngine( SfxObjectShell::Current() );
+InitEditEngine();
 return pEditView;
 }
 
@@ -1226,7 +1234,7 @@ void ScMultiTextWnd::StartEditEngine()
 
 if ( !pEditView || !pEditEngine )
 {
-InitEditEngine(pObjSh);
+InitEditEngine();
 }
 
 SC_MOD()-SetInputMode( SC_INPUT_TOP );
@@ -1281,31 +1289,15 @@ void lcl_ModifyRTLVisArea( EditView* pEditView )
 }
 
 
-void ScMultiTextWnd::InitEditEngine(SfxObjectShell* pObjSh)
+void ScMultiTextWnd::InitEditEngine()
 {
 ScFieldEditEngine* pNew;
-ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
+ScTabViewShell* pViewSh = GetViewShell();
+ScDocShell* pDocSh = NULL;
 if ( pViewSh )
 {
+pDocSh = pViewSh-GetViewData()-GetDocShell();
 const ScDocument* pDoc = pViewSh-GetViewData()-GetDocument();
-
-// fdo#43614 If called from Paint() because pEditEngine==0 it may be
-// that StopEditEngine() was previously called when opening another
-// document or switching documents, the Paint() wants to paint the
-// previous document, but GetActiveViewShell() already returns the
-// shell of the new document. In that case we'd create an EditEngine
-// with the wrong item pool that later crashes when the corresponding
-// document was closed and may lead to other sorts of trouble.
-
-if (mpAssignedDocument)
-{
-if (mpAssignedDocument != pDoc)
-return; // Bail out, don't create and remember an
-  

[Libreoffice-commits] .: sc/source

2011-12-11 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit bee8375b7205d4a468a2d3a928249e7923b2147a
Author: Noel Power noel.po...@novell.com
Date:   Mon Dec 12 00:59:52 2011 +

double check pEditView ( appears some re-entrency foo can zap it )

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 2983c44..649050b 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -,7 +,9 @@ ScMultiTextWnd::~ScMultiTextWnd()
 
 void ScMultiTextWnd::Paint( const Rectangle rRec )
 {
-GetEditView()-Paint( rRec );
+EditView* pView = GetEditView();
+if ( pView )
+pView-Paint( rRec );
 }
 
 EditView* ScMultiTextWnd::GetEditView()
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sc/source

2011-12-11 Thread Noel Power
 sc/source/ui/app/inputhdl.cxx |3 ++-
 sc/source/ui/app/inputwin.cxx |   33 +++--
 sc/source/ui/inc/inputwin.hxx |2 +-
 3 files changed, 18 insertions(+), 20 deletions(-)

New commits:
commit 1b28a657678f2cc64861030cbe3bea13d1bebd95
Author: Noel Power noel.po...@novell.com
Date:   Mon Dec 12 00:59:52 2011 +

double check pEditView ( appears some re-entrency foo can zap it )

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 2983c44..649050b 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -,7 +,9 @@ ScMultiTextWnd::~ScMultiTextWnd()
 
 void ScMultiTextWnd::Paint( const Rectangle rRec )
 {
-GetEditView()-Paint( rRec );
+EditView* pView = GetEditView();
+if ( pView )
+pView-Paint( rRec );
 }
 
 EditView* ScMultiTextWnd::GetEditView()
commit 445d348837aca032b81edc92a23fee128758ee0f
Author: Noel Power noel.po...@novell.com
Date:   Sun Dec 11 16:40:52 2011 +

fix autocorrection sync problem with input/formulabar

also,
* make the GetEditView explicitly create EditEngine/EditView *always*
* remove the bogus GetLine method
* reset NotifyHdl when stopping the edit engine

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index f4fe965..98cfac2 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2046,7 +2046,8 @@ void ScInputHandler::SyncViews( EditView* pSourceView )
 if (pTableView  pTableView != pSourceView)
 lcl_SetTopSelection( pTableView, aSel );
 }
-else if (pTopView  pTableView)
+// Only sync selection from topView if we are actually editiing there
+else if ( ( eMode == SC_INPUT_TOP )  pTopView  pTableView)
 {
 aSel = pTopView-GetSelection();
 lcl_SetTopSelection( pTableView, aSel );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 83bdb8a..2983c44 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1109,29 +1109,18 @@ ScMultiTextWnd::~ScMultiTextWnd()
 {
 }
 
-int ScMultiTextWnd::GetLineCount()
+void ScMultiTextWnd::Paint( const Rectangle rRec )
 {
-   if(pEditView)
-   {
-   return pEditEngine-GetLineCount(0);
-   }
-   return 1;
+GetEditView()-Paint( rRec );
 }
 
-void ScMultiTextWnd::Paint( const Rectangle rRec )
+EditView* ScMultiTextWnd::GetEditView()
 {
-// We always use edit engine to draw text at all times.
-if (!pEditEngine)
-InitEditEngine(SfxObjectShell::Current());
-//StartEditEngine();
-
-if (pEditView)
-{
-pEditView-Paint(rRec);
-}
+if ( !pEditView )
+InitEditEngine( SfxObjectShell::Current() );
+return pEditView;
 }
 
-
 long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
 {
 long height = ( LogicToPixel(Size(0,GetTextHeight())).Height() );
@@ -1229,7 +1218,6 @@ ScMultiTextWnd::DoScroll()
 void ScMultiTextWnd::StartEditEngine()
 {
 // Bei eigener Modalitaet (Doc-modale Dialoge) nicht aktivieren
-
 SfxObjectShell* pObjSh = SfxObjectShell::Current();
 if ( pObjSh  pObjSh-IsInModalMode() )
 return;
@@ -1393,11 +1381,18 @@ void ScMultiTextWnd::InitEditEngine(SfxObjectShell* 
pObjSh)
 
 void ScMultiTextWnd::StopEditEngine( sal_Bool bAll )
 {
+if ( pEditEngine )
+pEditEngine-SetNotifyHdl(Link());
 ScTextWnd::StopEditEngine( bAll );
 }
 
 void ScMultiTextWnd::SetTextString( const String rNewString )
 {
+// Ideally it would be best to create on demand the EditEngine/EditView 
here, but... for
+// the initialisation scenario where a cell is first clicked on we end up 
with the text in the
+// inputbar window scrolled to the bottom if we do that here ( because the 
tableview and topview
+// are synced I guess ).
+// should fix that I suppose :-/ need to look a bit further into that
 if ( pEditView )
 pEditView-Invalidate();
 ScTextWnd::SetTextString( rNewString );
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index c0f4234..9f70ecb 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -176,8 +176,8 @@ public:
 virtual ~ScMultiTextWnd();
 virtual void StartEditEngine();
 virtual void StopEditEngine( sal_Bool bAll );
-int GetLineCount();
 virtual void Resize();
+virtual EditView*  GetEditView();
 long GetPixelHeightForLines( long nLines );
 long GetEditEngTxtHeight();
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-12-07 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   25 +++--
 sc/source/ui/inc/inputwin.hxx |2 +-
 2 files changed, 12 insertions(+), 15 deletions(-)

New commits:
commit fa83f16b4e3c42d102dd5b9edffe0732ea46b897
Author: Noel Power noel.po...@novell.com
Date:   Wed Dec 7 15:40:28 2011 +

better sizing of inputbar ( removed weird calculations I didn't understand )

gsoc input bar now (should) snuggly wrap the text when collapsed, if 
multilines exist then scrolling with the keys should be clean and no spill from 
upper or lower lines visible. Removed some strange ( pseudo padding ) 
apparently for taking into account the window border and reorganized the resize 
logic so the padding is added ( and commented why ) in just one place.

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 8b32bc9..a04451f 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -864,7 +864,7 @@ ScInputBarGroup::ScInputBarGroup(Window* pParent)
   // too bad at the size from 'Settings' for me
   // set button width to scrollbar width then for the moment
   aButton.SetClickHdl  ( LINK( this, ScInputBarGroup, ClickHdl ) );
-  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
TBX_WINDOW_HEIGHT) );
+  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
aMultiTextWnd.GetPixelHeightForLines(1)) );
   aButton.Enable();
   aButton.SetSymbol( SYMBOL_SPIN_DOWN  );
   aButton.SetQuickHelpText( ScResId( SCSTR_QHELP_EXPAND_FORMULA ) );
@@ -1123,18 +1123,16 @@ void ScMultiTextWnd::Paint( const Rectangle rRec )
 }
 }
 
-long ScMultiTextWnd::GetPixelTextHeight()
+
+long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
 {
 long height = ( LogicToPixel(Size(0,GetTextHeight())).Height() );
 // need to figure out why GetTextHeight is not set up when I need it
 // some initialisation timing issue ?
-return Max ( long( 14 ), height );
-}
-
-
-long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
-{
-return nLines *  GetPixelTextHeight();
+height = Max ( long( 14 ), height );
+// add padding ( for the borders of the window I guess ) otherwise we
+// chop slightly the top and bottom of whatever is in the inputbox
+return ( nLines *  height ) + 4;
 }
 
 void ScMultiTextWnd::SetNumLines( long nLines )
@@ -1153,14 +1151,14 @@ void ScMultiTextWnd::Resize()
 // parent/container window
 Size aTextBoxSize  = GetSizePixel();
 
-aTextBoxSize.Height()=( GetPixelHeightForLines( mnLines ) ) + 8;
+aTextBoxSize.Height()=( GetPixelHeightForLines( mnLines ) );
+SetSizePixel(aTextBoxSize);
 
 if(pEditView)
 {
 Size aOutputSize = GetOutputSizePixel();
-Size aLineSize = Size(0,GetPixelTextHeight());
-int nDiff = (aOutputSize.Height() - ( mnLines *aLineSize.Height()))/2;
-Point aPos1(TEXT_STARTPOS,nDiff);
+Size aLineSize = Size(0,aTextBoxSize.Height());
+Point aPos1(TEXT_STARTPOS,0);
 Point aPos2(aOutputSize.Width(),aOutputSize.Height());
 
 pEditView-SetOutputArea(
@@ -1170,7 +1168,6 @@ void ScMultiTextWnd::Resize()
 }
 
 SetScrollBarRange();
-SetSizePixel(aTextBoxSize);
 }
 
 IMPL_LINK(ScMultiTextWnd, ModifyHdl, EENotify*, pNotify)
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 76730b6..7a1da05 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -176,7 +176,6 @@ public:
 virtual void StopEditEngine( sal_Bool bAll );
 int GetLineCount();
 virtual void Resize();
-long GetPixelTextHeight();
 long GetPixelHeightForLines( long nLines );
 long GetEditEngTxtHeight();
 
@@ -193,6 +192,7 @@ protected:
 DECL_LINK( NotifyHdl, EENotify* );
 DECL_LINK( ModifyHdl, EENotify* );
 private:
+long GetPixelTextHeight();
 ScInputBarGroup mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-12-07 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit fe1e91678f68c4f06d6566ea8af918b984fde85b
Author: Noel Power noel.po...@novell.com
Date:   Wed Dec 7 15:53:20 2011 +

remove unused variable

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index a04451f..a271487 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1157,7 +1157,6 @@ void ScMultiTextWnd::Resize()
 if(pEditView)
 {
 Size aOutputSize = GetOutputSizePixel();
-Size aLineSize = Size(0,aTextBoxSize.Height());
 Point aPos1(TEXT_STARTPOS,0);
 Point aPos2(aOutputSize.Width(),aOutputSize.Height());
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sc/source

2011-12-07 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   24 ++--
 sc/source/ui/inc/inputwin.hxx |2 +-
 2 files changed, 11 insertions(+), 15 deletions(-)

New commits:
commit 2e580e9b1b0d095cda7991614f58681c75336a83
Author: Noel Power noel.po...@novell.com
Date:   Wed Dec 7 15:53:20 2011 +

remove unused variable

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index a04451f..a271487 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1157,7 +1157,6 @@ void ScMultiTextWnd::Resize()
 if(pEditView)
 {
 Size aOutputSize = GetOutputSizePixel();
-Size aLineSize = Size(0,aTextBoxSize.Height());
 Point aPos1(TEXT_STARTPOS,0);
 Point aPos2(aOutputSize.Width(),aOutputSize.Height());
 
commit d65ca4394166675335a8c3061c6c0f179271f65e
Author: Noel Power noel.po...@novell.com
Date:   Wed Dec 7 15:40:28 2011 +

better sizing of inputbar ( removed weird calculations I didn't understand )

gsoc input bar now (should) snuggly wrap the text when collapsed, if 
multilines exist then scrolling with the keys should be clean and no spill from 
upper or lower lines visible. Removed some strange ( pseudo padding ) 
apparently for taking into account the window border and reorganized the resize 
logic so the padding is added ( and commented why ) in just one place.

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 8b32bc9..a04451f 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -864,7 +864,7 @@ ScInputBarGroup::ScInputBarGroup(Window* pParent)
   // too bad at the size from 'Settings' for me
   // set button width to scrollbar width then for the moment
   aButton.SetClickHdl  ( LINK( this, ScInputBarGroup, ClickHdl ) );
-  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
TBX_WINDOW_HEIGHT) );
+  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
aMultiTextWnd.GetPixelHeightForLines(1)) );
   aButton.Enable();
   aButton.SetSymbol( SYMBOL_SPIN_DOWN  );
   aButton.SetQuickHelpText( ScResId( SCSTR_QHELP_EXPAND_FORMULA ) );
@@ -1123,18 +1123,16 @@ void ScMultiTextWnd::Paint( const Rectangle rRec )
 }
 }
 
-long ScMultiTextWnd::GetPixelTextHeight()
+
+long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
 {
 long height = ( LogicToPixel(Size(0,GetTextHeight())).Height() );
 // need to figure out why GetTextHeight is not set up when I need it
 // some initialisation timing issue ?
-return Max ( long( 14 ), height );
-}
-
-
-long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
-{
-return nLines *  GetPixelTextHeight();
+height = Max ( long( 14 ), height );
+// add padding ( for the borders of the window I guess ) otherwise we
+// chop slightly the top and bottom of whatever is in the inputbox
+return ( nLines *  height ) + 4;
 }
 
 void ScMultiTextWnd::SetNumLines( long nLines )
@@ -1153,14 +1151,14 @@ void ScMultiTextWnd::Resize()
 // parent/container window
 Size aTextBoxSize  = GetSizePixel();
 
-aTextBoxSize.Height()=( GetPixelHeightForLines( mnLines ) ) + 8;
+aTextBoxSize.Height()=( GetPixelHeightForLines( mnLines ) );
+SetSizePixel(aTextBoxSize);
 
 if(pEditView)
 {
 Size aOutputSize = GetOutputSizePixel();
-Size aLineSize = Size(0,GetPixelTextHeight());
-int nDiff = (aOutputSize.Height() - ( mnLines *aLineSize.Height()))/2;
-Point aPos1(TEXT_STARTPOS,nDiff);
+Size aLineSize = Size(0,aTextBoxSize.Height());
+Point aPos1(TEXT_STARTPOS,0);
 Point aPos2(aOutputSize.Width(),aOutputSize.Height());
 
 pEditView-SetOutputArea(
@@ -1170,7 +1168,6 @@ void ScMultiTextWnd::Resize()
 }
 
 SetScrollBarRange();
-SetSizePixel(aTextBoxSize);
 }
 
 IMPL_LINK(ScMultiTextWnd, ModifyHdl, EENotify*, pNotify)
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 76730b6..7a1da05 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -176,7 +176,6 @@ public:
 virtual void StopEditEngine( sal_Bool bAll );
 int GetLineCount();
 virtual void Resize();
-long GetPixelTextHeight();
 long GetPixelHeightForLines( long nLines );
 long GetEditEngTxtHeight();
 
@@ -193,6 +192,7 @@ protected:
 DECL_LINK( NotifyHdl, EENotify* );
 DECL_LINK( ModifyHdl, EENotify* );
 private:
+long GetPixelTextHeight();
 ScInputBarGroup mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/sdi basctl/source basctl/uiconfig default_images/cmd officecfg/registry ooo_custom_images/hicontrast ooo_custom_images/human ooo_custom_images/industrial ooo_custom_ima

2011-12-06 Thread Noel Power
 basctl/sdi/baside.sdi |   14 
++---
 basctl/source/basicide/baside3.cxx|   28 
+-
 basctl/source/basicide/basides1.cxx   |   14 
++---
 basctl/uiconfig/basicide/toolbar/formcontrolsbar.xml  |   14 
++---
 dev/null  |binary
 officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu |   28 
+-
 svx/inc/svx/svxids.hrc|   16 
++---
 svx/sdi/svx.sdi   |   14 
++---
 8 files changed, 64 insertions(+), 64 deletions(-)

New commits:
commit 83a28682f21f7b284aa57f9c336bae551621da03
Author: Noel Power noel.po...@novell.com
Date:   Tue Dec 6 14:52:51 2011 +

remove duplicated images for basic dialog form controls (  misc tidyup )

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index de61601..2f03dde 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -471,43 +471,43 @@ shell BasicIDEShell
 StateMethod = GetState;
 ]
 
-SID_INSERT_RADIO
+SID_INSERT_FORM_RADIO
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_CHECK
+SID_INSERT_FORM_CHECK
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_LIST
+SID_INSERT_FORM_LIST
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_COMBO
+SID_INSERT_FORM_COMBO
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_VSCROLL
+SID_INSERT_FORM_VSCROLL
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_HSCROLL
+SID_INSERT_FORM_HSCROLL
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_SPIN
+SID_INSERT_FORM_SPIN
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 2f7ccfb..a4fbd19 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -402,13 +402,13 @@ void DialogWindow::GetState( SfxItemSet rSet )
 rSet.DisableItem( nWh );
 }
 break;
-case SID_INSERT_RADIO:
-case SID_INSERT_CHECK:
-case SID_INSERT_LIST:
-case SID_INSERT_COMBO:
-case SID_INSERT_VSCROLL:
-case SID_INSERT_HSCROLL:
-case SID_INSERT_SPIN:
+case SID_INSERT_FORM_RADIO:
+case SID_INSERT_FORM_CHECK:
+case SID_INSERT_FORM_LIST:
+case SID_INSERT_FORM_COMBO:
+case SID_INSERT_FORM_VSCROLL:
+case SID_INSERT_FORM_HSCROLL:
+case SID_INSERT_FORM_SPIN:
 {
 if ( !bIsCalc || IsReadOnly() )
 rSet.DisableItem( nWh );
@@ -454,31 +454,31 @@ void DialogWindow::ExecuteCommand( SfxRequest rReq )
 pBindings-Invalidate( SID_DOC_MODIFIED );
 }
 break;
-case SID_INSERT_RADIO:
+case SID_INSERT_FORM_RADIO:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMRADIO );
 break;
-case SID_INSERT_CHECK:
+case SID_INSERT_FORM_CHECK:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMCHECK );
 break;
-case SID_INSERT_LIST:
+case SID_INSERT_FORM_LIST:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMLIST );
 break;
-case SID_INSERT_COMBO:
+case SID_INSERT_FORM_COMBO:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMCOMBO );
 break;
-case SID_INSERT_SPIN:
+case SID_INSERT_FORM_SPIN:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMSPIN );
 break;
-case SID_INSERT_VSCROLL:
+case SID_INSERT_FORM_VSCROLL:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMVSCROLL );
 break;
-case SID_INSERT_HSCROLL:
+case SID_INSERT_FORM_HSCROLL:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMHSCROLL );
 break;
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index ab9fd01..9846e6c 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -917,13 +917,13 @@ void

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - basctl/sdi basctl/source basctl/uiconfig default_images/cmd officecfg/registry ooo_custom_images/hicontrast ooo_custom_images/human ooo_custom_image

2011-12-06 Thread Noel Power
 basctl/sdi/baside.sdi |   14 
++---
 basctl/source/basicide/baside3.cxx|   28 
+-
 basctl/source/basicide/basides1.cxx   |   14 
++---
 basctl/uiconfig/basicide/toolbar/formcontrolsbar.xml  |   14 
++---
 dev/null  |binary
 officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu |   28 
+-
 svx/inc/svx/svxids.hrc|   16 
++---
 svx/sdi/svx.sdi   |   14 
++---
 8 files changed, 64 insertions(+), 64 deletions(-)

New commits:
commit b08e273015d72251b68bca86535cf5919dd9e40e
Author: Noel Power noel.po...@novell.com
Date:   Tue Dec 6 14:52:51 2011 +

remove duplicated images for basic dialog form controls (  misc tidyup )

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index de61601..2f03dde 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -471,43 +471,43 @@ shell BasicIDEShell
 StateMethod = GetState;
 ]
 
-SID_INSERT_RADIO
+SID_INSERT_FORM_RADIO
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_CHECK
+SID_INSERT_FORM_CHECK
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_LIST
+SID_INSERT_FORM_LIST
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_COMBO
+SID_INSERT_FORM_COMBO
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_VSCROLL
+SID_INSERT_FORM_VSCROLL
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_HSCROLL
+SID_INSERT_FORM_HSCROLL
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
 
-SID_INSERT_SPIN
+SID_INSERT_FORM_SPIN
 [
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 2f7ccfb..a4fbd19 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -402,13 +402,13 @@ void DialogWindow::GetState( SfxItemSet rSet )
 rSet.DisableItem( nWh );
 }
 break;
-case SID_INSERT_RADIO:
-case SID_INSERT_CHECK:
-case SID_INSERT_LIST:
-case SID_INSERT_COMBO:
-case SID_INSERT_VSCROLL:
-case SID_INSERT_HSCROLL:
-case SID_INSERT_SPIN:
+case SID_INSERT_FORM_RADIO:
+case SID_INSERT_FORM_CHECK:
+case SID_INSERT_FORM_LIST:
+case SID_INSERT_FORM_COMBO:
+case SID_INSERT_FORM_VSCROLL:
+case SID_INSERT_FORM_HSCROLL:
+case SID_INSERT_FORM_SPIN:
 {
 if ( !bIsCalc || IsReadOnly() )
 rSet.DisableItem( nWh );
@@ -454,31 +454,31 @@ void DialogWindow::ExecuteCommand( SfxRequest rReq )
 pBindings-Invalidate( SID_DOC_MODIFIED );
 }
 break;
-case SID_INSERT_RADIO:
+case SID_INSERT_FORM_RADIO:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMRADIO );
 break;
-case SID_INSERT_CHECK:
+case SID_INSERT_FORM_CHECK:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMCHECK );
 break;
-case SID_INSERT_LIST:
+case SID_INSERT_FORM_LIST:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMLIST );
 break;
-case SID_INSERT_COMBO:
+case SID_INSERT_FORM_COMBO:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMCOMBO );
 break;
-case SID_INSERT_SPIN:
+case SID_INSERT_FORM_SPIN:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMSPIN );
 break;
-case SID_INSERT_VSCROLL:
+case SID_INSERT_FORM_VSCROLL:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMVSCROLL );
 break;
-case SID_INSERT_HSCROLL:
+case SID_INSERT_FORM_HSCROLL:
 GetEditor()-SetMode( DLGED_INSERT );
 GetEditor()-SetInsertObj( OBJ_DLG_FORMHSCROLL );
 break;
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index ab9fd01..9846e6c 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -917,13 +917,13 @@ void

[Libreoffice-commits] .: sc/source

2011-11-29 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 71e77655660fa719ca0e91c7daa94e045e3006a3
Author: Noel Power noel.po...@novell.com
Date:   Tue Nov 29 15:58:48 2011 +

detect TEXTMODIFIED event from EditEngine ( and add missing StopEditEngine )

not sure if the StopEditEngine method ever gets called but we should have 
it tunnel to the base class just in case.

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 63265f9..650293a 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1180,7 +1180,10 @@ IMPL_LINK(ScMultiTextWnd, ModifyHdl, EENotify*, pNotify)
 IMPL_LINK(ScMultiTextWnd, NotifyHdl, EENotify*, pNotify)
 {
 // need to process EE_NOTIFY_TEXTVIEWSCROLLED here
-if ( pNotify  pNotify-eNotificationType == EE_NOTIFY_TEXTVIEWSCROLLED )
+// sometimes when pasting we don't seem to get EE_NOTIFY_TEXTVIEWSCROLLED
+// but we always seem to get EE_NOTIFY_TEXTMODIFIED
+if ( pNotify  ( pNotify-eNotificationType == EE_NOTIFY_TEXTVIEWSCROLLED
+ ||   pNotify-eNotificationType == EE_NOTIFY_TEXTMODIFIED ) )
 SetScrollBarRange();
 return 0;
 }
@@ -1362,8 +1365,9 @@ void ScMultiTextWnd::InitEditEngine(SfxObjectShell* 
pObjSh)
 }
 }
 
-void ScMultiTextWnd::StopEditEngine( sal_Bool /*bAll*/ )
+void ScMultiTextWnd::StopEditEngine( sal_Bool bAll )
 {
+ScTextWnd::StopEditEngine( bAll );
 }
 
 void ScMultiTextWnd::SetTextString( const String rNewString )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-11-28 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit e46454b676bedc5585456cc37c63c9e4ff7deaad
Author: Noel Power noel.po...@novell.com
Date:   Mon Nov 28 10:58:31 2011 +

reorganise some resize logic

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 5c94f0b..63265f9 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -520,9 +520,9 @@ void ScInputWindow::Resize()
 ToolBox::Resize();
 if ( lcl_isExperimentalMode() )
 {
-Size aSize = GetSizePixel();
 aTextWindow.Resize();
-aSize.Height() = aTextWindow.GetSizePixel().Height() + 11;
+Size aSize = GetSizePixel();
+aSize.Height() = CalcWindowSizePixel().Height();
 SetSizePixel(aSize);
 Invalidate();
 }
@@ -1027,7 +1027,6 @@ IMPL_LINK( ScInputBarGroup, ClickHdl, PushButton*, 
EMPTYARG )
 OSL_FAIL(The parent window pointer pParent is null);
 return 1;
 }
-
 if( aMultiTextWnd.GetNumLines()  1 )
 {
 aMultiTextWnd.SetNumLines( 1 );
@@ -1064,7 +1063,6 @@ void ScInputBarGroup::TriggerToolboxLayout()
 else
 pParent-SetToolbarLayoutMode( TBX_LAYOUT_NORMAL );
 xLayoutManager-lock();
-pParent-Resize();
 DataChangedEvent aFakeUpdate( DATACHANGED_SETTINGS, NULL,  
SETTINGS_STYLE );
 // this basically will trigger the reposititioning of the
 // items in the toolbar from ImplFormat ( which is controlled by
@@ -1073,6 +1071,10 @@ void ScInputBarGroup::TriggerToolboxLayout()
 // controlled via mbFormat. It seems the easiest way to get these
 // booleans set is to send in the fake event below.
 pParent-DataChanged( aFakeUpdate);
+// highest item in toolbar will have been calculated via the
+// event above. Call resize on InputBar to pick up the height
+// change
+pParent-Resize();
 // unlock relayouts the toolbars in the 4 quadrants
 xLayoutManager-unlock();
 }
@@ -1137,7 +1139,10 @@ void ScMultiTextWnd::SetNumLines( long nLines )
 {
 mnLines = nLines;
 if ( nLines  1 )
+{
 mnLastExpandedLines = nLines;
+Resize();
+}
 }
 
 void ScMultiTextWnd::Resize()
@@ -1161,6 +1166,7 @@ void ScMultiTextWnd::Resize()
 
 pEditEngine-SetPaperSize( PixelToLogic(Size((aOutputSize.Width()-= 2 
* nTextStartPos - 1), 1 ) ));
 }
+
 SetScrollBarRange();
 SetSizePixel(aTextBoxSize);
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/source

2011-11-25 Thread Noel Power
 vcl/source/window/toolbox.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 93a5933060f61a5fb585148e4125a8ab22305259
Author: Noel Power noel.po...@novell.com
Date:   Fri Nov 25 14:25:46 2011 +

really limit special layout to single line non-floating toolbars

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 1016301..3531ea1 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2721,7 +2721,7 @@ void ToolBox::ImplFormat( sal_Bool bResize )
 if ( mbHorz )
 {
 it-maCalcRect.Left() = nX;
-if ( meLayoutMode == TBX_LAYOUT_TOP  mnLines )
+if ( meLayoutMode == TBX_LAYOUT_TOP  mnLines == 1 )
 it-maCalcRect.Top()  = nY/2;
 else
 it-maCalcRect.Top()  = 
nY+(nLineSize-aCurrentItemSize.Height())/2;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-11-24 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |  110 ++
 sc/source/ui/inc/inputwin.hxx |5 +
 vcl/inc/vcl/toolbox.hxx   |9 +++
 vcl/source/window/toolbox.cxx |   17 ++
 4 files changed, 99 insertions(+), 42 deletions(-)

New commits:
commit 50171e51373800bfe598e461d551f873aff87f09
Author: Noel Power noel.po...@novell.com
Date:   Thu Nov 24 19:45:09 2011 +

tweak toolbar layout for gsoc formula/input bar  other misc changes

summary:
* tweak toolbar layout to layout the toolbar items aligned to top of highest
item
* make Capture/ReleaseMouse logic much simpler
* make resize detection simpler
* control toolbar height ( e.g. don't let visible grid area be overrun by
toolbar )

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 427c2d9..685dc4f 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -179,6 +179,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* 
pBind ) :
 aTextCancel ( ScResId( SCSTR_QHELP_BTNCANCEL ) ),
 aTextSum( ScResId( SCSTR_QHELP_BTNSUM ) ),
 aTextEqual  ( ScResId( SCSTR_QHELP_BTNEQUAL ) ),
+mnMaxY  (0),
 bIsOkCancelMode ( false ),
 bIsMultiLine( false ),
 bInResize   ( false )
@@ -750,6 +751,14 @@ void ScInputWindow::DataChanged( const DataChangedEvent 
rDCEvt )
 ToolBox::DataChanged( rDCEvt );
 }
 
+bool ScInputWindow::IsPointerAtResizePos()
+{
+if ( GetOutputSizePixel().Height() - GetPointerPosPixel().Y() = 4  )
+return true;
+else
+return false;
+}
+
 void ScInputWindow::MouseMove( const MouseEvent rMEvt )
 {
 if ( lcl_isExperimentalMode() )
@@ -757,62 +766,79 @@ void ScInputWindow::MouseMove( const MouseEvent rMEvt )
 Point aPosPixel = GetPointerPosPixel();
 
 ScInputBarGroup* pGroupBar = dynamic_cast ScInputBarGroup*  ( 
pRuntimeWindow.get() );
-if ( bInResize || ( GetOutputSizePixel().Height() - aPosPixel.Y() = 4 
 ) )
-{
+
+if ( bInResize || IsPointerAtResizePos() )
 SetPointer( Pointer( POINTER_WINDOW_SSIZE ) );
+else
+SetPointer( Pointer( POINTER_ARROW ) );
 
-if ( rMEvt.IsLeft() )
+if ( bInResize )
+{
+// detect direction
+long nResizeThreshold = ( (long)TBX_WINDOW_HEIGHT * 0.7 );
+bool bResetPointerPos = false;
+
+// Detect attempt to expand toolbar too much
+if ( aPosPixel.Y() = mnMaxY )
 {
-// Don't leave the mouse pointer leave *this* window
-CaptureMouse();
-bInResize = true;
-}
-else
+bResetPointerPos = true;
+aPosPixel.Y() = mnMaxY;
+} // or expanding down
+else if ( GetOutputSizePixel().Height() - aPosPixel.Y()  
-nResizeThreshold  )
+{
+pGroupBar-IncrementVerticalSize();
+bResetPointerPos = true;
+} // or shrinking up
+else if ( ( GetOutputSizePixel().Height() - aPosPixel.Y()  )  
nResizeThreshold )
 {
-ReleaseMouse();
-bInResize = false;
+bResetPointerPos = true;
+pGroupBar-DecrementVerticalSize();
 }
 
-if ( bInResize )
+if ( bResetPointerPos )
 {
-// Trigger resize
-long nResizeThreshold = ( (long)TBX_WINDOW_HEIGHT * 0.7 );
-bool bResetPointerPos = false;
-if ( GetOutputSizePixel().Height() - aPosPixel.Y()  
-nResizeThreshold  )
-{
-pGroupBar-IncrementVerticalSize();
-bResetPointerPos = true;
-}
-else if ( ( GetOutputSizePixel().Height() - aPosPixel.Y()  )  
nResizeThreshold )
-{
-bResetPointerPos = true;
-pGroupBar-DecrementVerticalSize();
-}
-
-if ( bResetPointerPos )
-{
-aPosPixel.Y() =  GetOutputSizePixel().Height();
-SetPointerPosPixel( aPosPixel );
-}
-
+aPosPixel.Y() =  GetOutputSizePixel().Height();
+SetPointerPosPixel( aPosPixel );
 }
 }
-else
-{
-ReleaseMouse();
-SetPointer( Pointer( POINTER_ARROW ) );
-}
 }
 ToolBox::MouseMove( rMEvt );
 }
 
+void ScInputWindow::MouseButtonDown( const MouseEvent rMEvt )
+{
+if ( lcl_isExperimentalMode() )
+{
+if ( rMEvt.IsLeft() )
+{
+if ( IsPointerAtResizePos() )
+{
+// Don't leave the mouse pointer leave *this* window
+CaptureMouse();
+bInResize = true

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

2011-11-23 Thread Noel Power
 sc/inc/sc.hrc |4 -
 sc/source/ui/app/inputwin.cxx |  146 --
 sc/source/ui/inc/inputwin.hxx |   19 +++--
 sc/source/ui/src/toolbox.src  |   11 +++
 4 files changed, 140 insertions(+), 40 deletions(-)

New commits:
commit 6151ec073e86be2fccffd5bf46d31a8261a232d3
Author: Noel Power noel.po...@novell.com
Date:   Wed Nov 23 16:27:17 2011 +

add mouse resize (and other bits ) to gsoc formulabar

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 2edba1e..6ca8544 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1006,7 +1006,9 @@
 #define SCSTR_SET_TAB_BG_COLOR  (STR_START + 403)
 #define SCSTR_NO_TAB_BG_COLOR   (STR_START + 404)
 #define SCSTR_DDEDOC_NOT_LOADED (STR_START + 405)
-#define SCSTR_EXTDOC_NOT_LOADED (STR_START + 406)
+#define SCSTR_QHELP_EXPAND_FORMULA   (STR_START + 406)
+#define SCSTR_QHELP_COLLAPSE_FORMULA (STR_START + 407)
+#define SCSTR_EXTDOC_NOT_LOADED (STR_START + 408)
 
 
 #define STR_END (SCSTR_EXTDOC_NOT_LOADED)
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 82d9253..da067b8 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -88,7 +88,7 @@
 #define THESIZE 100 //!!! langt... :-)
 #define TBX_WINDOW_HEIGHT   22 // in Pixeln - fuer alle Systeme gleich?
 #define LEFT_OFFSET 5
-#define INPUTWIN_MULTILINES 10
+#define INPUTWIN_MULTILINES 6
 
 using com::sun::star::uno::Reference;
 using com::sun::star::uno::UNO_QUERY;
@@ -179,7 +179,8 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* 
pBind ) :
 aTextSum( ScResId( SCSTR_QHELP_BTNSUM ) ),
 aTextEqual  ( ScResId( SCSTR_QHELP_BTNEQUAL ) ),
 bIsOkCancelMode ( false ),
-bIsMultiLine( false )
+bIsMultiLine( false ),
+bInResize   ( false )
 {
 ScModule*pScMod  = SC_MOD();
 SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod );
@@ -516,7 +517,7 @@ void ScInputWindow::Select()
 
 void ScInputWindow::Resize()
 {
-
+ToolBox::Resize();
 if ( lcl_isExperimentalMode() )
 {
 Size aSize = GetSizePixel();
@@ -536,7 +537,6 @@ void ScInputWindow::Resize()
 aTextWindow.SetSizePixel( aSize );
 aTextWindow.Invalidate();
 }
-ToolBox::Resize();
 }
 
 void ScInputWindow::SetFuncString( const String rString, sal_Bool bDoEdit )
@@ -749,14 +749,72 @@ void ScInputWindow::DataChanged( const DataChangedEvent 
rDCEvt )
 ToolBox::DataChanged( rDCEvt );
 }
 
-bool ScInputWindow::GetMultiLineStatus()
+void ScInputWindow::MouseMove( const MouseEvent rMEvt )
 {
-return bIsMultiLine;
+if ( lcl_isExperimentalMode() )
+{
+Point aPosPixel = GetPointerPosPixel();
+Point aPnt = PixelToLogic( aPosPixel );
+
+ScInputBarGroup* pGroupBar = dynamic_cast ScInputBarGroup*  ( 
pRuntimeWindow.get() );
+if ( bInResize || ( GetOutputSizePixel().Height() - aPosPixel.Y() = 4 
 ) )
+{
+SetPointer( Pointer( POINTER_WINDOW_SSIZE ) );
+
+if ( rMEvt.IsLeft() )
+{
+// Don't leave the mouse pointer leave *this* window
+CaptureMouse();
+bInResize = true;
+}
+else
+{
+ReleaseMouse();
+bInResize = false;
+}
+
+if ( bInResize )
+{
+// Trigger resize
+long nResizeThreshold = ( (long)TBX_WINDOW_HEIGHT * 0.7 );
+bool bResetPointerPos = false;
+if ( GetOutputSizePixel().Height() - aPosPixel.Y()  
-nResizeThreshold  )
+{
+pGroupBar-IncrementVerticalSize();
+bResetPointerPos = true;
+}
+else if ( ( GetOutputSizePixel().Height() - aPosPixel.Y()  )  
nResizeThreshold )
+{
+bResetPointerPos = true;
+pGroupBar-DecrementVerticalSize();
+}
+
+if ( bResetPointerPos )
+{
+aPosPixel.Y() =  GetOutputSizePixel().Height();
+SetPointerPosPixel( aPosPixel );
+}
+
+}
+}
+else
+{
+ReleaseMouse();
+SetPointer( Pointer( POINTER_ARROW ) );
+}
+}
+ToolBox::MouseMove( rMEvt );
 }
 
-void ScInputWindow::SetMultiLineStatus(bool bMode)
+void ScInputWindow::MouseButtonUp( const MouseEvent rMEvt )
 {
-bIsMultiLine=bMode;
+if ( lcl_isExperimentalMode() )
+{
+ReleaseMouse();
+if ( rMEvt.IsLeft() )
+bInResize = false;
+}
+ToolBox::MouseButtonUp( rMEvt );
 }
 
 
@@ -783,9 +841,9 @@ ScInputBarGroup::ScInputBarGroup(Window* pParent)
   
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
TBX_WINDOW_HEIGHT

[Libreoffice-commits] .: sc/source

2011-11-22 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |  241 --
 sc/source/ui/inc/inputwin.hxx |   14 +-
 2 files changed, 177 insertions(+), 78 deletions(-)

New commits:
commit 319d8be9dad248a3ced5ac311e0b20ec3ed4cef7
Author: Noel Power noel.po...@novell.com
Date:   Tue Nov 22 16:21:20 2011 +

tweak experimental gsoc multiline input bar, better resizing, enable scroll

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 128e3a6..5782611 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -88,6 +88,7 @@
 #define THESIZE 100 //!!! langt... :-)
 #define TBX_WINDOW_HEIGHT   22 // in Pixeln - fuer alle Systeme gleich?
 #define LEFT_OFFSET 5
+#define INPUTWIN_MULTILINES 10
 
 using com::sun::star::uno::Reference;
 using com::sun::star::uno::UNO_QUERY;
@@ -515,23 +516,14 @@ void ScInputWindow::Select()
 
 void ScInputWindow::Resize()
 {
-ToolBox::Resize();
 
 if ( lcl_isExperimentalMode() )
 {
 Size aSize = GetSizePixel();
-//aTextWindow.SetSizePixel( aSize );
-if( bIsMultiLine )
-{
-aSize.Height()=77;
-}
-else
-{
-aSize.Height()=38;
-}
+aTextWindow.Resize();
+aSize.Height() = aTextWindow.GetSizePixel().Height() + 11;
 SetSizePixel(aSize);
 Invalidate();
-aTextWindow.Resize();
 }
 else
 {
@@ -544,6 +536,7 @@ void ScInputWindow::Resize()
 aTextWindow.SetSizePixel( aSize );
 aTextWindow.Invalidate();
 }
+ToolBox::Resize();
 }
 
 void ScInputWindow::SetFuncString( const String rString, sal_Bool bDoEdit )
@@ -774,24 +767,26 @@ void ScInputWindow::SetMultiLineStatus(bool bMode)
 ScInputBarGroup::ScInputBarGroup(Window* pParent)
 :   ScTextWndBase( pParent, WinBits(WB_HIDE) ),
 aMultiTextWnd( this ),
-aButton  ( this ),
-aScrollBar   ( this, WB_VERT )
+aButton  ( this, WB_RECTSTYLE ),
+aScrollBar   ( this, WB_VERT | WB_DRAG )
 {
   aMultiTextWnd.Show();
   aMultiTextWnd.SetQuickHelpText( ScResId( SCSTR_QHELP_INPUTWND ) );
   aMultiTextWnd.SetHelpId  ( HID_INSWIN_INPUT );
 
+  // Hmm we can't seem to increase the width of the scrollbar :-/
+  // seems locked to GetSettings().GetStyleSettings().GetScrollBarSize()
+  // But... I guess if needs be we can get around this somehow, doesn't 
look
+  // too bad at the size from 'Settings' for me
+  // set button width to scrollbar width then for the moment
   aButton.SetClickHdl  ( LINK( this, ScInputBarGroup, ClickHdl ) );
-  aButton.SetSizePixel(Size(0.5*TBX_WINDOW_HEIGHT,TBX_WINDOW_HEIGHT));
+  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
TBX_WINDOW_HEIGHT) );
   aButton.Enable();
+  aButton.SetSymbol( SYMBOL_SPIN_DOWN  );
   aButton.Show();
+  aScrollBar.SetSizePixel( aButton.GetSizePixel() );
 
-  aScrollBar.SetSizePixel( Size(0.5*TBX_WINDOW_HEIGHT,TBX_WINDOW_HEIGHT) );
-
-  aScrollBar.SetPageSize( 1 );
-  aScrollBar.SetVisibleSize( 1 );
-  aScrollBar.SetLineSize( 1 );
-  aScrollBar.Show();
+  aScrollBar.SetScrollHdl( LINK( this, ScInputBarGroup, Impl_ScrollHdl ) );
 }
 
 ScInputBarGroup::~ScInputBarGroup()
@@ -840,21 +835,47 @@ void ScInputBarGroup::Resize()
 Size aSize  = GetSizePixel();
 aSize.Width() = Max( ((long)(nWidth - nLeft - LEFT_OFFSET)), (long)0 );
 
+aScrollBar.SetPosPixel(Point(aSize.Width()- ( 
aButton.GetSizePixel().Width() ) + 1, aButton.GetSizePixel().Height() - 1 ));
+
+Size aTmpSize( aSize );
+aTmpSize.Width() = aTmpSize.Width() - aButton.GetSizePixel().Width();
+aMultiTextWnd.SetSizePixel(aTmpSize);
+
+aMultiTextWnd.Resize();
+
+aSize.Height() = aMultiTextWnd.GetSizePixel().Height();
+
+SetSizePixel(aSize);
+
 if(pParent-GetMultiLineStatus())
 {
-aSize.Height()=3*TBX_WINDOW_HEIGHT;
+aButton.SetSymbol( SYMBOL_SPIN_UP  );
+Size scrollSize = aButton.GetSizePixel();
+scrollSize.Height() = aMultiTextWnd.GetSizePixel().Height() - 
aButton.GetSizePixel().Height();
+aScrollBar.SetSizePixel( scrollSize );
+
+Size aOutSz = aMultiTextWnd.GetOutputSize();
+
+aScrollBar.SetVisibleSize( aOutSz.Height() );
+aScrollBar.SetPageSize( aOutSz.Height() );
+aScrollBar.SetLineSize( aMultiTextWnd.GetTextHeight() );
+aScrollBar.SetRange( Range( 0, aMultiTextWnd.GetEditEngTxtHeight() ) );
+
+if ( aMultiTextWnd.GetEditView() )
+aScrollBar.SetThumbPos( 0 );
+
+aScrollBar.Resize();
+aScrollBar.Show();
 }
 else
 {
-aSize.Height()=TBX_WINDOW_HEIGHT;
+aButton.SetSymbol( SYMBOL_SPIN_DOWN  );
+aScrollBar.Hide();
 }
-SetSizePixel(aSize);
 
-aScrollBar.SetPosPixel(Point(aSize.Width

[Libreoffice-commits] .: cui/source

2011-11-18 Thread Noel Power
 cui/source/dialogs/hyphen.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c69c088a117857521efc619bb53baee087ca
Author: Niklas Johansson niklas@niklas-VirtualBox.(none)
Date:   Mon Nov 7 16:51:27 2011 +0100

Fixed for bug 40505 UI: HYPHENATION Right/Left arrow key reversed (keyboard)

SvxHyphenWordDialog::SelLeft() and SvxHyphenWordDialog::SelRight() was
reversed witch caused the arrowkeys to be reversed in the hyphenation
dialog.

diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index 1b9b63b..da10e83 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -640,13 +640,13 @@ void SvxHyphenWordDialog::SetWindowTitle( LanguageType 
nLang )
 
 void SvxHyphenWordDialog::SelLeft()
 {
-m_pImpl-SelRight_Impl();
+m_pImpl-SelLeft_Impl();
 }
 
 
 void SvxHyphenWordDialog::SelRight()
 {
-m_pImpl-SelLeft_Impl();
+m_pImpl-SelRight_Impl();
 }
 
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basctl/source officecfg/registry

2011-11-18 Thread Noel Power
 basctl/source/basicide/linenumberwindow.cxx   |   29 
+
 basctl/source/basicide/linenumberwindow.hxx   |   30 
+-
 officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu |2 
 3 files changed, 57 insertions(+), 4 deletions(-)

New commits:
commit fd48c0eead825326ce1ee31d043185a79e7fa87f
Author: Noel Power noel.po...@novell.com
Date:   Fri Nov 18 16:41:11 2011 +

add license info to linenumberwindow.[ch]xx, fix menu label

diff --git a/basctl/source/basicide/linenumberwindow.cxx 
b/basctl/source/basicide/linenumberwindow.cxx
index 2f593e9..837e477 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -1,4 +1,30 @@
-/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the License); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2011 August Sodora aug...@gmail.com (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the GPLv3+), or
+ * the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 
 #include baside2.hxx
 #include linenumberwindow.hxx
@@ -106,3 +132,4 @@ int LineNumberWindow::GetWidth()
 {
 return m_nWidth;
 }
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/linenumberwindow.hxx 
b/basctl/source/basicide/linenumberwindow.hxx
index 74b44be..39041b9 100644
--- a/basctl/source/basicide/linenumberwindow.hxx
+++ b/basctl/source/basicide/linenumberwindow.hxx
@@ -1,5 +1,30 @@
-/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
-
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the License); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2011 August Sodora aug...@gmail.com (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the GPLv3+), or
+ * the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 #ifndef BASICIDE_LINENUMBERWINDOW_HXX
 #define BASICIDE_LINENUMBERWINDOW_HXX
 
@@ -33,3 +58,4 @@ public:
 };
 
 #endif // BASICIDE_LINENUMBERWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu
index c711808..84e5c41 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu
@@ -10,7 +10,7 @@
 /node
 node oor:name=.uno:ShowLines oor:op=replace
  prop oor:name=Label oor:type=xs:string
- value xml:lang=en-USDisplay Source Line 
Number.../value
+ value xml:lang=en-USDisplay Source Line Number/value
  /prop
 /node
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-11-17 Thread Noel Power
 sc/source/ui/view/cellsh.cxx  |   84 +++
 sc/source/ui/view/cellsh1.cxx |   90 --
 sc/source/ui/view/cellsh2.cxx |   43 ++--
 sc/source/ui/view/cellsh4.cxx |   16 +++
 4 files changed, 116 insertions(+), 117 deletions(-)

New commits:
commit fefa76cf3f9e60fb5e2607f37f42c4dc9f0858ae
Author: Winfried Donkers o...@dci-electronics.nl
Date:   Thu Nov 17 07:27:37 2011 +0100

german comments translated to english On branch master Changes to be 
committed: modified: sc/source/ui/view/cellsh.cxx modified: 
sc/source/ui/view/cellsh1.cxx modified: sc/source/ui/view/cellsh2.cxx modified: 
sc/source/ui/view/cellsh4.cxx

diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 531ac70..ac2bdcc 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -137,59 +137,59 @@ void ScCellShell::GetBlockState( SfxItemSet rSet )
 while ( nWhich )
 {
 sal_Bool bDisable = false;
-sal_Bool bNeedEdit = sal_True;  // muss Selektion editierbar sein?
+sal_Bool bNeedEdit = sal_True;  // need selection be editable?
 switch ( nWhich )
 {
-case FID_FILL_TO_BOTTOM:// Fuellen oben/unten
-case FID_FILL_TO_TOP:   // mind. 2 Zeilen markiert?
+case FID_FILL_TO_BOTTOM:// fill to top / bottom
+case FID_FILL_TO_TOP:   // are at least 2 rows marked?
 bDisable = (!bSimpleArea) || (nRow1 == nRow2);
 if ( !bDisable  bEditable )
-{   // Matrix nicht zerreissen
+{   // do not damage matrix
 if ( nWhich == FID_FILL_TO_BOTTOM )
 bDisable = pDoc-HasSelectedBlockMatrixFragment(
-nCol1, nRow1, nCol2, nRow1, rMark );// erste 
Zeile
+nCol1, nRow1, nCol2, nRow1, rMark );// first 
row
 else
 bDisable = pDoc-HasSelectedBlockMatrixFragment(
-nCol1, nRow2, nCol2, nRow2, rMark );// letzte 
Zeile
+nCol1, nRow2, nCol2, nRow2, rMark );// last row
 }
 break;
 
-case FID_FILL_TO_RIGHT: // Fuellen links/rechts
-case FID_FILL_TO_LEFT:  // mind. 2 Spalten markiert?
+case FID_FILL_TO_RIGHT: // fill to left / right
+case FID_FILL_TO_LEFT:  // are at least 2 columns marked?
 bDisable = (!bSimpleArea) || (nCol1 == nCol2);
 if ( !bDisable  bEditable )
 {   // Matrix nicht zerreissen
 if ( nWhich == FID_FILL_TO_RIGHT )
 bDisable = pDoc-HasSelectedBlockMatrixFragment(
-nCol1, nRow1, nCol1, nRow2, rMark );// erste 
Spalte
+nCol1, nRow1, nCol1, nRow2, rMark );// first 
column
 else
 bDisable = pDoc-HasSelectedBlockMatrixFragment(
-nCol2, nRow1, nCol2, nRow2, rMark );// letzte 
Spalte
+nCol2, nRow1, nCol2, nRow2, rMark );// last 
column
 }
 break;
 
-case FID_FILL_SERIES:   // Block fuellen
-case SID_OPENDLG_TABOP: // Mehrfachoperationen, mind. 2 Zellen 
markiert?
+case FID_FILL_SERIES:   // fill block
+case SID_OPENDLG_TABOP: // multiple-cell operations, are at 
least 2 cells marked?
 if (pDoc-GetChangeTrack()!=NULL nWhich ==SID_OPENDLG_TABOP)
 bDisable = sal_True;
 else
 bDisable = (!bSimpleArea) || (nCol1 == nCol2  nRow1 == 
nRow2);
 
 if ( !bDisable  bEditable  nWhich == FID_FILL_SERIES )
-{   // Matrix nicht zerreissen
+{   // do not damage matrix
 bDisable = pDoc-HasSelectedBlockMatrixFragment(
-nCol1, nRow1, nCol2, nRow1, rMark ) // erste Zeile
+nCol1, nRow1, nCol2, nRow1, rMark ) // first 
row
 ||  pDoc-HasSelectedBlockMatrixFragment(
-nCol1, nRow2, nCol2, nRow2, rMark ) // letzte Zeile
+nCol1, nRow2, nCol2, nRow2, rMark ) // last row
 ||  pDoc-HasSelectedBlockMatrixFragment(
-nCol1, nRow1, nCol1, nRow2, rMark ) // erste Spalte
+nCol1, nRow1, nCol1, nRow2, rMark ) // first 
column
 ||  pDoc-HasSelectedBlockMatrixFragment(
-nCol2, nRow1, nCol2, nRow2, rMark );// letzte 
Spalte
+nCol2, nRow1, nCol2, nRow2, rMark );// last 
column
 }
  

[Libreoffice-commits] .: officecfg/registry sw/source

2011-11-16 Thread Noel Power
 officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu | 
   4 -
 officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu   | 
   4 -
 sw/source/ui/wrtsh/navmgr.cxx| 
  29 ++
 3 files changed, 33 insertions(+), 4 deletions(-)

New commits:
commit c269a684f12c331a5d90a36e50a6275b072886f8
Author: Tim Hardeck thard...@suse.com
Date:   Tue Nov 15 20:42:00 2011 +0100

Hide Navigation toolbar until needed

Hide Navigation toolbar until there is something to navigate.

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu
index e0a1085..465244a 100644
--- 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu
+++ 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu
@@ -660,7 +660,7 @@
 valuetrue/value
 /prop
 prop oor:name=Visible oor:type=xs:boolean
-valuetrue/value
+valuefalse/value
 /prop
 prop oor:name=UIName oor:type=xs:string
 value xml:lang=en-USNavigation/value
@@ -669,7 +669,7 @@
 valuefalse/value
 /prop
 prop oor:name=ContextSensitive oor:type=xs:boolean
-valuefalse/value
+valuetrue/value
 /prop
 /node
 /node
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
index 455b97e..3bf5e2f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
@@ -666,7 +666,7 @@
 valuetrue/value
 /prop
 prop oor:name=Visible oor:type=xs:boolean
-valuetrue/value
+valuefalse/value
 /prop
 prop oor:name=UIName oor:type=xs:string
 value xml:lang=en-USNavigation/value
@@ -675,7 +675,7 @@
 valuefalse/value
 /prop
 prop oor:name=ContextSensitive oor:type=xs:boolean
-valuefalse/value
+valuetrue/value
 /prop
 /node
 /node
diff --git a/sw/source/ui/wrtsh/navmgr.cxx b/sw/source/ui/wrtsh/navmgr.cxx
index 2ef5b17..f465463 100644
--- a/sw/source/ui/wrtsh/navmgr.cxx
+++ b/sw/source/ui/wrtsh/navmgr.cxx
@@ -35,6 +35,10 @@
 #include cmdid.h
 #include view.hxx
 
+#include com/sun/star/frame/XLayoutManager.hpp
+
+namespace css = ::com::sun::star;
+
 /**
  * If SMART is defined, the navigation history has recency with temporal 
ordering enhancement,
  * as described on http://zing.ncsl.nist.gov/hfweb/proceedings/greenberg/
@@ -219,6 +223,31 @@ bool SwNavigationMgr::addEntry(const SwPosition rPos) {
 
_pMyShell-GetView().GetViewFrame()-GetBindings().Invalidate(FN_NAVIGATION_BACK);
 if (bForwardWasEnabled)
 
_pMyShell-GetView().GetViewFrame()-GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
+
+/* show the Navigation toolbar */
+css::uno::Reference css::frame::XFrame  xFrame = 
_pMyShell-GetView().GetViewFrame()-GetFrame().GetFrameInterface();
+if (xFrame.is())
+{
+css::uno::Reference css::beans::XPropertySet  xPropSet(xFrame, 
css::uno::UNO_QUERY);
+if (xPropSet.is())
+{
+css::uno::Reference css::frame::XLayoutManager  xLayoutManager;
+css::uno::Any aValue = xPropSet-getPropertyValue( 
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( LayoutManager ) ) );
+
+aValue = xLayoutManager;
+if (xLayoutManager.is())
+{
+const ::rtl::OUString sResourceURL( 
RTL_CONSTASCII_USTRINGPARAM( private:resource/toolbar/navigationobjectbar ) );
+css::uno::Reference css::ui::XUIElement  xUIElement = 
xLayoutManager-getElement(sResourceURL);
+if (!xUIElement.is())
+{
+xLayoutManager-createElement( sResourceURL );
+xLayoutManager-showElement( sResourceURL );
+}
+}
+}
+}
+
 return bRet;
 }
 /* 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] .: 2 commits - basctl/inc basctl/sdi basctl/source basctl/uiconfig officecfg/registry sfx2/inc sfx2/sdi starmath/inc starmath/source

2011-11-16 Thread Noel Power
 basctl/inc/basidesh.hrc   |6 
 basctl/sdi/baside.sdi |6 
 basctl/source/basicide/basides1.cxx   |   30 
+++
 basctl/source/basicide/basidesh.src   |4 
 basctl/source/basicide/moduldl2.cxx   |   35 
+++
 basctl/source/basicide/moduldlg.hxx   |   12 +
 basctl/source/basicide/moduldlg.src   |   38 

 basctl/uiconfig/basicide/menubar/menubar.xml  |1 
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu|5 
 officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu |5 
 sfx2/inc/sfx2/sfxsids.hrc |3 
 sfx2/sdi/sfx.sdi  |   24 ++
 starmath/inc/caret.hxx|2 
 starmath/inc/cursor.hxx   |5 
 starmath/inc/node.hxx |7 
 starmath/source/cursor.cxx|   89 
++
 starmath/source/node.cxx  |   15 +
 starmath/source/view.cxx  |8 
 18 files changed, 290 insertions(+), 5 deletions(-)

New commits:
commit 73d3c9504a479e62126d1e7a1766173370603aa1
Author: Noel Power noel.po...@novell.com
Date:   Wed Nov 16 14:53:38 2011 +

add new 'Goto Line' menu item to Basic IDE

diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index f3a1e64..9e5ccb2 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -169,6 +169,12 @@
 #define RID_STR_NORMAL_MODULES  ( RID_BASICIDE_START + 120 )
 #define RID_STR_CLASS_MODULES   ( RID_BASICIDE_START + 121 )
 
+
+#define RID_DLG_GOTOLINE( RID_BASICIDE_START + 122 )
+#define RID_FT_LINE ( RID_BASICIDE_START + 123 )
+#define RID_ED_LINE ( RID_BASICIDE_START + 124 )
+#define RID_STR_GETLINE ( RID_BASICIDE_START + 125 )
+
 #endif  // _SVX_NOIDERESIDS
 
 #endif  // _BASIDESH_HRC
diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index f40e239..37b2f08 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -116,6 +116,12 @@ shell BasicIDEShell
 StateMethod = GetState;
 ]
 
+SID_GOTOLINE
+[
+ExecMethod  = ExecuteCurrent;
+StateMethod = GetState;
+]
+
 FID_SEARCH_NOW
 [
 ExecMethod  = ExecuteCurrent;
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 6a5cd13..234fad7 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -34,6 +34,7 @@
 #include basic/sbx.hxx
 #define _SVSTDARR_STRINGS
 #include svl/svstdarr.hxx
+#include svl/visitem.hxx
 #include ide_pch.hxx
 
 #define _SOLAR__PRIVATE 1
@@ -57,6 +58,7 @@
 #include managelang.hxx
 #include localizationmgr.hxx
 #include helpid.hrc
+#include moduldlg.hxx
 
 #include svtools/texteng.hxx
 #include svtools/textview.hxx
@@ -251,6 +253,22 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest rReq )
 }
 }
 break;
+case SID_GOTOLINE:
+{
+if ( pCurWin  pCurWin-IsA( TYPE( ModulWindow ) ) )
+{
+std::auto_ptr GotoLineDialog  xGotoDlg( new GotoLineDialog( 
pCurWin ) );
+if ( xGotoDlg-Execute() )
+{
+rtl::OUString sText =  xGotoDlg-GetText();
+
+sal_Int32 nLine = xGotoDlg-GetLineNumber();
+
+if ( nLine )
+((ModulWindow*)pCurWin)-GetEditView()-SetSelection( 
TextSelection( TextPaM( nLine - 1 , 0 ), TextPaM( nLine - 1, 0 ) ) );
+}
+}
+}
 default:
 {
 pCurWin-ExecuteCommand( rReq );
@@ -1017,6 +1035,18 @@ void BasicIDEShell::GetState(SfxItemSet rSet)
 rSet.DisableItem( nWh );
 }
 break;
+case SID_GOTOLINE:
+{
+// if this is not a module window hide the
+// setting, doesn't make sense for example if the
+// dialog editor is open
+if( pCurWin  !pCurWin-IsA( TYPE( ModulWindow ) ) )
+{
+rSet.DisableItem( nWh );
+rSet.Put(SfxVisibilityItem(nWh, sal_False));
+}
+break;
+}
 }
 }
 if ( pCurWin )
diff --git a/basctl/source/basicide/basidesh.src 
b/basctl/source/basicide/basidesh.src
index 368bad4..c0ca7b4 100644
--- a/basctl/source/basicide/basidesh.src
+++ b/basctl/source/basicide/basidesh.src

[Libreoffice-commits] .: 2 commits - default_images/res ooo_custom_images/crystal ooo_custom_images/hicontrast ooo_custom_images/human ooo_custom_images/industrial ooo_custom_images/oxygen ooo_custom_

2011-11-15 Thread Noel Power
 default_images/res/lx03128.png   |binary
 default_images/res/lx03252.png   |binary
 default_images/res/otg_16_8.png  |binary
 default_images/res/otg_32_8.png  |binary
 default_images/res/otg_48_8.png  |binary
 default_images/res/sx03128.png   |binary
 default_images/res/sx03252.png   |binary
 ooo_custom_images/crystal/res/lx03139.png|binary
 ooo_custom_images/crystal/res/sx03139.png|binary
 ooo_custom_images/hicontrast/res/lx03128.png |binary
 ooo_custom_images/hicontrast/res/lx03139.png |binary
 ooo_custom_images/hicontrast/res/lx03252.png |binary
 ooo_custom_images/hicontrast/res/sx03128.png |binary
 ooo_custom_images/hicontrast/res/sx03139.png |binary
 ooo_custom_images/hicontrast/res/sx03252.png |binary
 ooo_custom_images/human/res/lx03128.png  |binary
 ooo_custom_images/human/res/lx03139.png  |binary
 ooo_custom_images/human/res/lx03252.png  |binary
 ooo_custom_images/human/res/sx03128.png  |binary
 ooo_custom_images/human/res/sx03139.png  |binary
 ooo_custom_images/human/res/sx03252.png  |binary
 ooo_custom_images/industrial/res/lx03128.png |binary
 ooo_custom_images/industrial/res/lx03139.png |binary
 ooo_custom_images/industrial/res/lx03252.png |binary
 ooo_custom_images/industrial/res/sx03128.png |binary
 ooo_custom_images/industrial/res/sx03139.png |binary
 ooo_custom_images/industrial/res/sx03252.png |binary
 ooo_custom_images/oxygen/res/lx03128.png |binary
 ooo_custom_images/oxygen/res/lx03139.png |binary
 ooo_custom_images/oxygen/res/lx03252.png |binary
 ooo_custom_images/oxygen/res/otg_16_8.png|binary
 ooo_custom_images/oxygen/res/otg_32_8.png|binary
 ooo_custom_images/oxygen/res/otg_48_8.png|binary
 ooo_custom_images/oxygen/res/oth_16_8.png|binary
 ooo_custom_images/oxygen/res/oth_32_8.png|binary
 ooo_custom_images/oxygen/res/oth_48_8.png|binary
 ooo_custom_images/oxygen/res/sx03128.png |binary
 ooo_custom_images/oxygen/res/sx03139.png |binary
 ooo_custom_images/oxygen/res/sx03252.png |binary
 ooo_custom_images/tango/res/lx03128.png  |binary
 ooo_custom_images/tango/res/lx03139.png  |binary
 ooo_custom_images/tango/res/lx03252.png  |binary
 ooo_custom_images/tango/res/sx03128.png  |binary
 ooo_custom_images/tango/res/sx03139.png  |binary
 ooo_custom_images/tango/res/sx03252.png  |binary
 vcl/inc/svids.hrc|3 +
 vcl/source/src/images.src|   75 +++
 47 files changed, 78 insertions(+)

New commits:
commit a1cc4e507cb6547d7715be09bff29366424c09fe
Author: Noel Power noel.po...@novell.com
Date:   Tue Nov 15 12:41:57 2011 +

Revert FDO#42454 - EasyHack: remove code associated with unused icons

This reverts commit 3e26dfcc2d347f4e0914449ca8104c8969fc6281.

diff --git a/default_images/res/lx03128.png b/default_images/res/lx03128.png
new file mode 100644
index 000..309e882
Binary files /dev/null and b/default_images/res/lx03128.png differ
diff --git a/default_images/res/lx03252.png b/default_images/res/lx03252.png
new file mode 100644
index 000..3bd7387
Binary files /dev/null and b/default_images/res/lx03252.png differ
diff --git a/default_images/res/otg_16_8.png b/default_images/res/otg_16_8.png
new file mode 100644
index 000..4bb2bfe
Binary files /dev/null and b/default_images/res/otg_16_8.png differ
diff --git a/default_images/res/otg_32_8.png b/default_images/res/otg_32_8.png
new file mode 100644
index 000..b3c0823
Binary files /dev/null and b/default_images/res/otg_32_8.png differ
diff --git a/default_images/res/otg_48_8.png b/default_images/res/otg_48_8.png
new file mode 100644
index 000..7544b6f
Binary files /dev/null and b/default_images/res/otg_48_8.png differ
diff --git a/default_images/res/sx03128.png b/default_images/res/sx03128.png
new file mode 100644
index 000..a24df73
Binary files /dev/null and b/default_images/res/sx03128.png differ
diff --git a/default_images/res/sx03252.png b/default_images/res/sx03252.png
new file mode 100644
index 000..456b810
Binary files /dev/null and b/default_images/res/sx03252.png differ
diff --git a/ooo_custom_images/crystal/res/lx03139.png 
b/ooo_custom_images/crystal/res/lx03139.png
new file mode 100644
index 000..4113176
Binary files /dev/null and b/ooo_custom_images/crystal/res/lx03139.png differ
diff --git a/ooo_custom_images/crystal/res/sx03139.png 
b/ooo_custom_images/crystal/res/sx03139.png
new file mode 100644
index 000..e746e6b
Binary files /dev/null and b/ooo_custom_images/crystal/res/sx03139.png differ
diff --git a/ooo_custom_images/hicontrast/res/lx03128.png 
b/ooo_custom_images/hicontrast/res/lx03128.png
new file mode 100644
index 000..d03948b
Binary files /dev/null and b/ooo_custom_images/hicontrast/res/lx03128.png differ
diff --git a/ooo_custom_images/hicontrast/res/lx03139.png 
b/ooo_custom_images/hicontrast/res/lx03139.png

[Libreoffice-commits] .: 3 commits - default_images/res ooo_custom_images/crystal ooo_custom_images/hicontrast ooo_custom_images/human ooo_custom_images/industrial ooo_custom_images/oxygen ooo_custom_

2011-11-15 Thread Noel Power
 dev/null |binary
 svtools/source/misc/imagemgr.src |3 -
 vcl/inc/svids.hrc|3 -
 vcl/source/src/images.src|   75 ---
 4 files changed, 81 deletions(-)

New commits:
commit 240dc332ad59fc2c45eccb4b2f4923fde09a784b
Author: Noel Power noel.po...@novell.com
Date:   Tue Nov 15 17:13:38 2011 +

fix build error, remove still referenced (indirectly ) images

diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src
index 62104ea..d1d25c8 100644
--- a/svtools/source/misc/imagemgr.src
+++ b/svtools/source/misc/imagemgr.src
@@ -35,7 +35,6 @@
 IMG_IMPRESS ;   \
 IMG_CALC ;  \
 IMG_CALCTEMPLATE ;  \
-IMG_CHART ; \
 IMG_IMPRESSTEMPLATE ;   \
 IMG_HTML ;  \
 IMG_MATH ;  \
@@ -51,7 +50,6 @@
 IMG_CALC ; \
 IMG_CALCTEMPLATE ; \
 IMG_CDROMDEV ; \
-IMG_CHART ; \
 IMG_DATABASE ; \
 IMG_DRAW ; \
 IMG_DRAWTEMPLATE ; \
@@ -74,7 +72,6 @@
 IMG_OO_CALC_TEMPLATE ; \
 IMG_OO_DATABASE_DOC ; \
 IMG_OO_DRAW_DOC ; \
-IMG_OO_DRAW_TEMPLATE ; \
 IMG_OO_GLOBAL_DOC ; \
 IMG_OO_IMPRESS_DOC ; \
 IMG_OO_IMPRESS_TEMPLATE ; \
commit 0d56c77726be9d9c23a87ae214d989a7bf2e2ddf
Author: Noel Power noel.po...@novell.com
Date:   Tue Nov 15 11:24:04 2011 +

remove unused SV_ICON_ID_HTML_DOCUMENT entries

diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc
index 51a0791..f0dce63 100644
--- a/vcl/inc/svids.hrc
+++ b/vcl/inc/svids.hrc
@@ -259,7 +259,6 @@
 #define SV_ICON_ID_PRESENTATION_TEMPLATE9
 #define SV_ICON_ID_PRESENTATION_COMPRESSED 10
 #define SV_ICON_ID_MASTER_DOCUMENT 11
-#define SV_ICON_ID_HTML_DOCUMENT   12
 #define SV_ICON_ID_DATABASE14
 #define SV_ICON_ID_FORMULA 15
 #define SV_ICON_ID_TEMPLATE16
diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src
index d99f9f9..5f6dace 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -264,21 +264,6 @@ Bitmap (SV_ICON_SIZE16_START + SV_ICON_ID_MASTER_DOCUMENT)
 File = odm_16_8.png ;
 };
 
-Bitmap (SV_ICON_SIZE48_START + SV_ICON_ID_HTML_DOCUMENT)
-{
-File = oth_48_8.png ;
-};
-
-Bitmap (SV_ICON_SIZE32_START + SV_ICON_ID_HTML_DOCUMENT)
-{
-File = oth_32_8.png ;
-};
-
-Bitmap (SV_ICON_SIZE16_START + SV_ICON_ID_HTML_DOCUMENT)
-{
-File = oth_16_8.png ;
-};
-
 Bitmap (SV_ICON_SIZE48_START + SV_ICON_ID_DATABASE)
 {
 File = odb_48_8.png ;
@@ -467,16 +452,6 @@ Bitmap (SV_ICON_SMALL_START + SV_ICON_ID_MASTER_DOCUMENT)
 File = sx03248.png ;
 };
 
-Bitmap (SV_ICON_LARGE_START + SV_ICON_ID_HTML_DOCUMENT)
-{
-File = lx03139.png ;
-};
-
-Bitmap (SV_ICON_SMALL_START + SV_ICON_ID_HTML_DOCUMENT)
-{
-File = sx03139.png ;
-};
-
 Bitmap (SV_ICON_LARGE_START + SV_ICON_ID_DATABASE)
 {
 File = lx03245.png ;
commit e0e7c5dc46ac8fd0c7f6fdc0ceb62d15cafd3754
Author: Julien Chaffraix julien.chaffr...@gmail.com
Date:   Mon Nov 14 07:23:08 2011 -0800

FDO#42454 - EasyHack: remove code associated with unused icons

Removed the icons and code associated with:
SV_ICON_ID_CHART
SV_ICON_ID_DRAWING_TEMPLATE

diff --git a/default_images/res/lx03128.png b/default_images/res/lx03128.png
deleted file mode 100644
index 309e882..000
Binary files a/default_images/res/lx03128.png and /dev/null differ
diff --git a/default_images/res/lx03252.png b/default_images/res/lx03252.png
deleted file mode 100644
index 3bd7387..000
Binary files a/default_images/res/lx03252.png and /dev/null differ
diff --git a/default_images/res/otg_16_8.png b/default_images/res/otg_16_8.png
deleted file mode 100644
index 4bb2bfe..000
Binary files a/default_images/res/otg_16_8.png and /dev/null differ
diff --git a/default_images/res/otg_32_8.png b/default_images/res/otg_32_8.png
deleted file mode 100644
index b3c0823..000
Binary files a/default_images/res/otg_32_8.png and /dev/null differ
diff --git a/default_images/res/otg_48_8.png b/default_images/res/otg_48_8.png
deleted file mode 100644
index 7544b6f..000
Binary files a/default_images/res/otg_48_8.png and /dev/null differ
diff --git a/default_images/res/sx03128.png b/default_images/res/sx03128.png
deleted file mode 100644
index a24df73..000
Binary files a/default_images/res/sx03128.png and /dev/null differ
diff --git a/default_images/res/sx03252.png b/default_images/res/sx03252.png
deleted file mode 100644
index 456b810..000
Binary files a/default_images/res/sx03252.png and /dev/null differ
diff --git a/ooo_custom_images/crystal/res/lx03139.png 
b/ooo_custom_images/crystal/res/lx03139.png
deleted file mode 100644
index 4113176..000
Binary files a/ooo_custom_images/crystal/res/lx03139.png and /dev/null differ
diff --git a/ooo_custom_images/crystal/res/sx03139.png 
b/ooo_custom_images/crystal/res/sx03139.png
deleted file mode 100644
index

[Libreoffice-commits] .: sc/source

2011-11-14 Thread Noel Power
 sc/source/ui/docshell/docsh.cxx |   41 +++-
 1 file changed, 24 insertions(+), 17 deletions(-)

New commits:
commit fff1cec87f3c81904dad98b7a2ccd50138264791
Author: Christina Rossmanith chrrossman...@web.de
Date:   Fri Nov 11 23:09:26 2011 +0100

Remove String::Fill() usage

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 93bb4bc..4a0981d 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -134,6 +134,7 @@
 #include rtl/logfile.hxx
 
 #include comphelper/processfactory.hxx
+#include comphelper/string.hxx
 #include uiitems.hxx
 #include cellsuno.hxx
 #include dpobject.hxx
@@ -1593,7 +1594,7 @@ sal_Bool ScDocShell::IsInformationLost()
 
 
 // Xcl-like column width measured in characters of standard font.
-xub_StrLen lcl_ScDocShell_GetColWidthInChars( sal_uInt16 nWidth )
+sal_Int32 lcl_ScDocShell_GetColWidthInChars( sal_uInt16 nWidth )
 {
 double f = nWidth;
 f *= 1328.0 / 25.0;
@@ -1601,46 +1602,52 @@ xub_StrLen lcl_ScDocShell_GetColWidthInChars( 
sal_uInt16 nWidth )
 f *= 1.0 / 23.0;
 f /= 256.0;
 
-return xub_StrLen( f );
+return sal_Int32( f );
 }
 
 
 void lcl_ScDocShell_GetFixedWidthString( rtl::OUString rStr, const 
ScDocument rDoc,
 SCTAB nTab, SCCOL nCol, sal_Bool bValue, SvxCellHorJustify eHorJust )
 {
-String aString = rStr;
-xub_StrLen nLen = lcl_ScDocShell_GetColWidthInChars(
+rtl::OUString aString = rStr;
+sal_Int32 nLen = lcl_ScDocShell_GetColWidthInChars(
 rDoc.GetColWidth( nCol, nTab ) );
-if ( nLen  aString.Len() )
+if ( nLen  aString.getLength() )
 {
 if ( bValue )
-aString.AssignAscii( ### );
-aString.Erase( nLen );
+aString = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ### ));
 }
-if ( nLen  aString.Len() )
+if ( nLen  aString.getLength() )
 {
 if ( bValue  eHorJust == SVX_HOR_JUSTIFY_STANDARD )
 eHorJust = SVX_HOR_JUSTIFY_RIGHT;
+sal_Int32  nBlanks = nLen - aString.getLength();
 switch ( eHorJust )
 {
 case SVX_HOR_JUSTIFY_RIGHT:
 {
-String aTmp;
-aTmp.Fill( nLen - aString.Len() );
-aString.Insert( aTmp, 0 );
+rtl::OUStringBuffer aTmp;
+aTmp = comphelper::string::padToLength( aTmp, nBlanks, ' ' );
+aString = aTmp.append(aString).makeStringAndClear();
 }
 break;
 case SVX_HOR_JUSTIFY_CENTER:
 {
-xub_StrLen nLen2 = (nLen - aString.Len()) / 2;
-String aTmp;
-aTmp.Fill( nLen2 );
-aString.Insert( aTmp, 0 );
-aString.Expand( nLen );
+sal_Int32 nLen2 = nBlanks / 2;
+rtl::OUStringBuffer aLeft;
+rtl::OUStringBuffer aRight;
+aLeft = comphelper::string::padToLength( aLeft, nLen2, ' ' );
+aRight = comphelper::string::padToLength( aRight, nBlanks - 
nLen2, ' ' );
+aString = aLeft.append(aString).makeStringAndClear();
+aString += aRight.makeStringAndClear();
 }
 break;
 default:
-aString.Expand( nLen );
+{
+rtl::OUStringBuffer aTmp;
+comphelper::string::padToLength( aTmp, nBlanks, ' ' );
+aString += aTmp.makeStringAndClear();
+}
 }
 }
 rStr = aString;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerfilter/source

2011-11-09 Thread Noel Power
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 02c6f5c74b346f1e3a095d99a36ece6b603bc26b
Author: Noel Power noel.po...@novell.com
Date:   Wed Nov 9 14:36:28 2011 +

fix rtf image import ( causing wrong image sometimes displayed ) fdo#42640

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 50664df..96c0add 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -44,6 +44,8 @@
 #include svl/lngmisc.hxx
 #include unotools/ucbstreamhelper.hxx
 #include unotools/streamwrap.hxx
+#include com/sun/star/drawing/XDrawPageSupplier.hpp
+#include com/sun/star/drawing/XDrawPage.hpp
 
 #include doctok/sprmids.hxx // NS_sprm namespace
 #include doctok/resourceids.hxx // NS_rtf namespace
@@ -590,6 +592,13 @@ int RTFDocumentImpl::resolvePict(bool bInline)
 if (m_xModelFactory.is())
 xShape.set(m_xModelFactory-createInstance(aService), uno::UNO_QUERY);
 uno::Referencebeans::XPropertySet xPropertySet(xShape, uno::UNO_QUERY);
+uno::Referencedrawing::XDrawPageSupplier xDrawSupplier( m_xDstDoc, 
uno::UNO_QUERY);
+if ( xDrawSupplier.is() )
+{
+uno::Reference drawing::XShapes  xShapes( 
xDrawSupplier-getDrawPage(), uno::UNO_QUERY );
+if ( xShapes.is() )
+xShapes-add( xShape );
+}
 if (m_bObject)
 {
 // Set bitmap
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-10-28 Thread Noel Power
 cui/source/tabpages/backgrnd.cxx  |2 --
 cui/source/tabpages/chardlg.cxx   |3 +--
 sfx2/inc/sfx2/htmlmode.hxx|3 ---
 sw/source/filter/html/css1atr.cxx |2 +-
 sw/source/filter/html/htmlatr.cxx |7 +++
 sw/source/ui/config/viewopt.cxx   |   10 --
 6 files changed, 9 insertions(+), 18 deletions(-)

New commits:
commit 89b3820c7b8c97480b556b3553cd78aaa12d07d8
Author: Harri Pitkänen hatap...@iki.fi
Date:   Wed Oct 26 21:48:17 2011 +0300

Export blinking text attribute to HTML in all HTML export modes

Previously blinking was not exported in IE mode. IE still does not
support blinking (neither does Chrome or Safari) but the extra tag
does not make things any worse and allows importing the HTML back
to LibreOffice without loss of formatting.

Code is also simplified by removing conditionals for options that
no longer need to be disabled.

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 8d27b17..b466ea8 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1086,8 +1086,6 @@ void SvxBackgroundTabPage::ShowSelector()
 
 if(nHtmlMode  HTMLMODE_ON)
 {
-if(!(nHtmlMode  HTMLMODE_GRAPH_POS))
-aBtnPosition.Enable(sal_False);
 aBtnArea.Enable(sal_False);
 }
 }
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index a92019e..9d320b4 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2686,8 +2686,7 @@ void SvxCharEffectsPage::DisableControls( sal_uInt16 
nDisable )
 
 void SvxCharEffectsPage::EnableFlash()
 {
-if ( !( ( m_nHtmlMode  HTMLMODE_ON )  !( m_nHtmlMode  HTMLMODE_BLINK ) 
) )
-m_aBlinkingBtn.Show();
+m_aBlinkingBtn.Show();
 }
 
 // ---
diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx
index f4db27a..ce1af6f 100644
--- a/sfx2/inc/sfx2/htmlmode.hxx
+++ b/sfx2/inc/sfx2/htmlmode.hxx
@@ -31,15 +31,12 @@
 
 #define HTMLMODE_ON 0x0001
 #define HTMLMODE_PARA_DISTANCE  0x0004
-#define HTMLMODE_SMALL_CAPS 0x0008
 #define HTMLMODE_FRM_COLUMNS0x0010
 #define HTMLMODE_SOME_STYLES0x0020 /* mind. MS IE */
 #define HTMLMODE_FULL_STYLES0x0040 /* == SW */
-#define HTMLMODE_BLINK  0x0080
 #define HTMLMODE_PARA_BLOCK 0x0100
 #define HTMLMODE_DROPCAPS   0x0200
 #define HTMLMODE_FIRSTLINE  0x0400 /* First-line intent with Spacer == 
NS 3.0 */
-#define HTMLMODE_GRAPH_POS  0x0800
 #define HTMLMODE_FULL_ABS_POS   0x1000
 #define HTMLMODE_SOME_ABS_POS   0x2000
 #define HTMLMODE_RESERVED1  0x4000
diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index 5905b72..33bd07a 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -2510,7 +2510,7 @@ static Writer OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( 
Writer rWrt,
 }
 
 const sal_Char *pBStr = 0;
-if( pBItem  rHTMLWrt.IsHTMLMode(HTMLMODE_BLINK) )
+if( pBItem )
 {
 if( !pBItem-GetValue() )
 {
diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index 2d56070..7354b6c 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1475,9 +1475,8 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const 
SfxPoolItem rItem )
 break;
 
 case RES_CHRATR_BLINK:
-if( IsHTMLMode(HTMLMODE_BLINK) )
-eState = ((const SvxBlinkItem)rItem).GetValue() ? HTML_ON_VALUE
- : HTML_OFF_VALUE;
+eState = ((const SvxBlinkItem)rItem).GetValue() ? HTML_ON_VALUE
+ : HTML_OFF_VALUE;
 break;
 
 case RES_CHRATR_COLOR:
@@ -3030,7 +3029,7 @@ static Writer OutHTML_SwFlyCnt( Writer rWrt, const 
SfxPoolItem rHt )
 static Writer OutHTML_SwBlink( Writer rWrt, const SfxPoolItem rHt )
 {
 SwHTMLWriter rHTMLWrt = (SwHTMLWriter)rWrt;
-if( rHTMLWrt.bOutOpts || !rHTMLWrt.IsHTMLMode(HTMLMODE_BLINK) )
+if( rHTMLWrt.bOutOpts )
 return rWrt;
 
 if( ((const SvxBlinkItem)rHt).GetValue() )
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 4d50236..a34679c 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -339,18 +339,16 @@ sal_uInt16  GetHtmlMode(const SwDocShell* pShell)
 switch ( rHtmlOpt.GetExportMode() )
 {
 case HTML_CFG_MSIE:
-nRet |= HTMLMODE_SMALL_CAPS|
-HTMLMODE_FULL_STYLES|HTMLMODE_GRAPH_POS|
+nRet |= HTMLMODE_FULL_STYLES|
 HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS;
 break;
 case HTML_CFG_NS40:
-  

[Libreoffice-commits] .: connectivity/source

2011-10-28 Thread Noel Power
 connectivity/source/drivers/odbcbase/OConnection.cxx |   20 +--
 1 file changed, 18 insertions(+), 2 deletions(-)

New commits:
commit 9b58d9353073c6535da0529cd9a48e435f043fa8
Author: Terrence Enger ten...@iseries-guru.com
Date:   Thu Oct 27 16:37:50 2011 -0400

leaking connection handle

call SQLDisconnect;
check returns from SQLDisconnect and SQLFreeHandle

diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx 
b/connectivity/source/drivers/odbcbase/OConnection.cxx
index 891eabc..03bc39b 100644
--- a/connectivity/source/drivers/odbcbase/OConnection.cxx
+++ b/connectivity/source/drivers/odbcbase/OConnection.cxx
@@ -78,8 +78,24 @@ OConnection::~OConnection()
 close();
 
 if ( SQL_NULL_HANDLE != m_aConnectionHandle )
-N3SQLFreeHandle( SQL_HANDLE_DBC, m_aConnectionHandle );
-m_aConnectionHandle = SQL_NULL_HANDLE;
+{
+SQLRETURN rc;
+
+rc = N3SQLDisconnect( m_aConnectionHandle );
+if ( SQL_SUCCESS   != rc 
+ SQL_SUCCESS_WITH_INFO != rc )
+OSL_TRACE( Failure from SQLDisconnect, %s:%i
+ , __FILE__, __LINE__
+ );
+
+rc = N3SQLFreeHandle( SQL_HANDLE_DBC, m_aConnectionHandle );
+if ( SQL_SUCCESS != rc )
+OSL_TRACE( Failure from SQLFreeHandle for connection, %s:%i
+ , __FILE__, __LINE__
+ );
+
+m_aConnectionHandle = SQL_NULL_HANDLE;
+}
 
 m_pDriver-release();
 m_pDriver = NULL;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - oovbaapi/ooo sc/qa sc/source

2011-10-28 Thread Noel Power
 oovbaapi/ooo/vba/excel/XRange.idl   |2 +-
 sc/qa/unit/data/xls/TestAddress.xls |binary
 sc/qa/unit/macros-test.cxx  |5 +
 sc/source/ui/vba/vbarange.cxx   |   23 +++
 sc/source/ui/vba/vbarange.hxx   |1 +
 5 files changed, 26 insertions(+), 5 deletions(-)

New commits:
commit 2a91e5bf2bce5ec932ac712e77e18b3efe2509a8
Author: Noel Power noel.po...@novell.com
Date:   Fri Oct 28 13:00:46 2011 +0100

re-enable vba.xls, tweak TestAddress.xls (move tests back to normal module)

diff --git a/sc/qa/unit/data/xls/TestAddress.xls 
b/sc/qa/unit/data/xls/TestAddress.xls
index 7d2ca6e..629645c 100644
Binary files a/sc/qa/unit/data/xls/TestAddress.xls and 
b/sc/qa/unit/data/xls/TestAddress.xls differ
diff --git a/sc/qa/unit/macros-test.cxx b/sc/qa/unit/macros-test.cxx
index a58c92d..22faa26 100644
--- a/sc/qa/unit/macros-test.cxx
+++ b/sc/qa/unit/macros-test.cxx
@@ -254,15 +254,12 @@ void ScMacrosTest::testVba()
 TestMacroInfo testInfo[] = {
 {
 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TestAddress.)),
-
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(vnd.sun.Star.script:VBAProject.Sheet1.test?language=Basiclocation=document))
+
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(vnd.sun.Star.script:VBAProject.testMacros.test?language=Basiclocation=document))
 },
-/*
-vba.xls is still throwing up a basic error :-/
 {
 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(vba.)),
 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(vnd.sun.Star.script:VBAProject.Modul1.Modul1?language=Basiclocation=document)),
 }
-*/
 };
 
 rtl::OUString aFileExtension(aFileFormats[1].pName, 
strlen(aFileFormats[1].pName), RTL_TEXTENCODING_UTF8 );
commit f323d36f29107ac7487fe748b1daf639d0d1e9b0
Author: August Sodora aug...@gmail.com
Date:   Wed Oct 26 15:32:55 2011 -0400

Add vba support for assigning names to cell ranges

diff --git a/oovbaapi/ooo/vba/excel/XRange.idl 
b/oovbaapi/ooo/vba/excel/XRange.idl
index 62a0994..015c68c 100644
--- a/oovbaapi/ooo/vba/excel/XRange.idl
+++ b/oovbaapi/ooo/vba/excel/XRange.idl
@@ -64,7 +64,7 @@ interface XRange
 interface ::ooo::vba::excel::XFormat;
 //interface ::ooo::vba::XHelperInterface;
 
-[attribute, readonly] any Name;
+[attribute] any Name;
 [attribute] any Value;
 [attribute] any Formula;
 [attribute] any FormulaArray;
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index fe8c9df..659bff8 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1569,6 +1569,29 @@ uno::Any SAL_CALL ScVbaRange::getName() throw 
(uno::RuntimeException)
 return uno::makeAny( xName );
 }
 
+void
+ScVbaRange::setName( const uno::Any aName ) throw (uno::RuntimeException)
+{
+uno::Reference excel::XName  xName;
+
+ScDocShell* pDocShell = getScDocShell();
+uno::Reference frame::XModel  xModel = pDocShell ? pDocShell-GetModel() 
: NULL;
+if ( !xModel.is() )
+{
+throw uno::RuntimeException( 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( Invalid document )), 
uno::Reference uno::XInterface () );
+}
+uno::Reference beans::XPropertySet  xPropertySet( xModel, 
uno::UNO_QUERY_THROW );
+uno::Reference sheet::XNamedRanges  xNamedRanges( 
xPropertySet-getPropertyValue( 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NamedRanges))) , 
uno::UNO_QUERY_THROW );
+
+uno::Reference excel::XNames  xNames( new ScVbaNames( uno::Reference 
XHelperInterface (), mxContext , xNamedRanges , xModel ) );
+
+uno::Any aDummy;
+//uno::Any aRefersTo;
+//aRefersTo = uno::Reference excel::XRange (this, uno::UNO_QUERY);
+xNames-Add(aName, getCellRange(), aDummy, aDummy, aDummy, aDummy,
+aDummy, aDummy, aDummy, aDummy, aDummy);
+}
+
 uno::Any
 ScVbaRange::getValue( ValueGetter valueGetter) throw (uno::RuntimeException)
 {
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index db4e49d..26f639f 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -167,6 +167,7 @@ public:
 
 // Attributes
 virtual css::uno::Any SAL_CALL getName() throw 
(css::uno::RuntimeException);
+virtual void   SAL_CALL setName( const css::uno::Any aName ) throw 
(css::uno::RuntimeException);
 virtual css::uno::Any SAL_CALL getValue() throw 
(css::uno::RuntimeException);
 virtual void   SAL_CALL setValue( const css::uno::Any aValue ) throw ( 
css::uno::RuntimeException);
 virtual css::uno::Any SAL_CALL getFormula() throw 
(css::uno::RuntimeException);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/qa

2011-10-27 Thread Noel Power
 sc/qa/unit/macros-test.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d3c18a6436e5e27f9d229a3b80a25d61d599461f
Author: Noel Power noel.po...@novell.com
Date:   Thu Oct 27 16:46:45 2011 +0100

attempt to disable macro_test tests for macosx

diff --git a/sc/qa/unit/macros-test.cxx b/sc/qa/unit/macros-test.cxx
index a971d20..a58c92d 100644
--- a/sc/qa/unit/macros-test.cxx
+++ b/sc/qa/unit/macros-test.cxx
@@ -125,15 +125,15 @@ public:
 
 void testStarBasic();
 void testVba();
-
 CPPUNIT_TEST_SUITE(ScMacrosTest);
+#ifndef MACOSX
 //enable this test if you want to play with star basic macros in unit tests
 //works but does nothing useful yet
 CPPUNIT_TEST(testStarBasic);
 //enable if you want to hack vba support for unit tests
 //does not work, still problems during loading
 CPPUNIT_TEST(testVba);
-
+#endif
 
 CPPUNIT_TEST_SUITE_END();
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configmgr/source sc/CppunitTest_sc_macros_test.mk sc/qa test/prj test/user-template

2011-10-26 Thread Noel Power
 configmgr/source/components.cxx|   12 +
 sc/CppunitTest_sc_macros_test.mk   |1 
 sc/qa/unit/macros-test.cxx |4 -
 test/prj/d.lst |5 ++
 test/user-template/user/data/registrymodifications.xcu |   37 +
 test/user-template/user/registrymodifications.xcu  |   37 -
 6 files changed, 56 insertions(+), 40 deletions(-)

New commits:
commit 8e68391fc99b34702d76526e6b3ab4720ac017e4
Author: Noel Power noel.po...@novell.com
Date:   Wed Oct 26 19:05:50 2011 +0100

more tweaks to unittests, also move registrymodifications.xcu

registrymodifications.xcu has been moved to the solver ( unittest/user/data 
)
new OOO_CONFIG_REGISTRY_EXTRA_DIR env var will be used to specify the 
directory 'data' will be contained in so we can override various config items.

diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index f6257b6..0549f8a 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -520,7 +520,17 @@ Components::Components(
 parseXcsXcuLayer( 0, aUnitTestDir );
 // next is required for the (somewhat strange) filter configuration
 parseModuleLayer( 1, aUnitTestDir + 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(/spool)));
-parseModificationLayer();
+// allow a directory to be specified to allow extra configuration to 
be stored
+// for example to place a registrymodifications.xcu to override some 
configuration
+rtl::OUString extra;
+if (rtl::Bootstrap::get(
+rtl::OUString(
+RTL_CONSTASCII_USTRINGPARAM(
+OOO_CONFIG_REGISTRY_EXTRA_DIR)),
+extra))
+{
+parseXcsXcuLayer(3, extra);
+}
 return;
 }
 
diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk
index 8a9bd3d..0da6348 100644
--- a/sc/CppunitTest_sc_macros_test.mk
+++ b/sc/CppunitTest_sc_macros_test.mk
@@ -100,6 +100,7 @@ $(eval $(call gb_CppunitTest_set_args,sc_macros_test,\
 --headless \
 --protector unoexceptionprotector$(gb_Library_DLLEXT) 
unoexceptionprotector \
 -env:OOO_CONFIG_REGISTRY_DIR=$(call 
gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) \
+-env:OOO_CONFIG_REGISTRY_EXTRA_DIR=$(call 
gb_CppunitTarget__make_url,$(OUTDIR)/unittest/user) \
 ))
 
 # we need to
diff --git a/sc/qa/unit/macros-test.cxx b/sc/qa/unit/macros-test.cxx
index 067a255..a971d20 100644
--- a/sc/qa/unit/macros-test.cxx
+++ b/sc/qa/unit/macros-test.cxx
@@ -129,10 +129,10 @@ public:
 CPPUNIT_TEST_SUITE(ScMacrosTest);
 //enable this test if you want to play with star basic macros in unit tests
 //works but does nothing useful yet
-//CPPUNIT_TEST(testStarBasic);
+CPPUNIT_TEST(testStarBasic);
 //enable if you want to hack vba support for unit tests
 //does not work, still problems during loading
-//CPPUNIT_TEST(testVba);
+CPPUNIT_TEST(testVba);
 
 
 CPPUNIT_TEST_SUITE_END();
diff --git a/test/prj/d.lst b/test/prj/d.lst
index 9211e33..9ec65ba 100644
--- a/test/prj/d.lst
+++ b/test/prj/d.lst
@@ -6,3 +6,8 @@ mkdir: %_DEST%\inc\test
 ..\%__SRC%\lib\libtest.dll.a %_DEST%\lib\libtest.dll.a
 ..\inc\test\testdllapi.hxx %_DEST%\inc\test\testdllapi.hxx
 ..\inc\test\bootstrapfixture.hxx %_DEST%\inc\test\bootstrapfixture.hxx
+mkdir: %_DEST%\unittest
+mkdir: %_DEST%\unittest\user
+mkdir: %_DEST%\unittest\user\data
+..\user-template\user\data\registrymodifications.xcu 
%_DEST%\unittest\user\data\registrymodifications.xcu
+
diff --git a/test/user-template/user/data/registrymodifications.xcu 
b/test/user-template/user/data/registrymodifications.xcu
new file mode 100644
index 000..cdfda4a
--- /dev/null
+++ b/test/user-template/user/data/registrymodifications.xcu
@@ -0,0 +1,37 @@
+?xml version=1.0 encoding=UTF-8?
+!--
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the License); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2011 Stephan Bergmann sberg...@redhat.com (initial
+ *   developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the GPLv3+), or
+ * the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+ * in which

[Libreoffice-commits] .: 3 commits - sc/qa toolkit/source

2011-10-24 Thread Noel Power
 sc/qa/unit/data/xls/TestAddress.xls   |binary
 sc/qa/unit/data/xls/vba.xls   |binary
 sc/qa/unit/macros-test.cxx|   73 +++---
 toolkit/source/controls/dialogcontrol.cxx |3 -
 4 files changed, 49 insertions(+), 27 deletions(-)

New commits:
commit 1b2b2283000850dedb00659ce49a0c5eee4aeebb
Author: Noel Power noel.po...@novell.com
Date:   Mon Oct 24 15:05:39 2011 +0100

fix wae aRect uninitialized when used within its own initialization

diff --git a/toolkit/source/controls/dialogcontrol.cxx 
b/toolkit/source/controls/dialogcontrol.cxx
index f463bfa..35eff0e 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -1033,7 +1033,8 @@ void UnoFrameControl::ImplSetPosSize( Reference XControl 
 rxCtrl )
 if ( !bOwnCtrl  sTitle.getLength() )
 {
 // Adjust Y based on height of Title
-::Rectangle aRect = pOutDev-GetTextRect( aRect, sTitle );
+::Rectangle aRect;
+aRect = pOutDev-GetTextRect( aRect, sTitle );
 nY = nY + ( aRect.GetHeight() / 2 );
 }
 }
commit 82fb60bc563b444679617396cb4d22a740427e6d
Author: Noel Power noel.po...@novell.com
Date:   Mon Oct 24 14:26:33 2011 +0100

make vba.xls return 'OK' on success, adjust macros-test.cxx to test for 'OK'

diff --git a/sc/qa/unit/data/xls/vba.xls b/sc/qa/unit/data/xls/vba.xls
index 2ee53a5..399b1ec 100644
Binary files a/sc/qa/unit/data/xls/vba.xls and b/sc/qa/unit/data/xls/vba.xls 
differ
diff --git a/sc/qa/unit/macros-test.cxx b/sc/qa/unit/macros-test.cxx
index e3c9974..3737869 100644
--- a/sc/qa/unit/macros-test.cxx
+++ b/sc/qa/unit/macros-test.cxx
@@ -165,7 +165,7 @@ public:
 CPPUNIT_TEST(testStarBasic);
 //enable if you want to hack vba support for unit tests
 //does not work, still problems during loading
-//CPPUNIT_TEST(testVba);
+CPPUNIT_TEST(testVba);
 
 
 CPPUNIT_TEST_SUITE_END();
@@ -262,37 +262,58 @@ void ScMacrosTest::testStarBasic()
 xDocSh-DoClose();
 }
 
+struct TestMacroInfo
+{
+rtl::OUString sFileBaseName;
+rtl::OUString sMacroUrl;
+};
 void ScMacrosTest::testVba()
 {
-const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM(vba.));
+TestMacroInfo testInfo[] { 
+{ 
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TestAddress.)),
+
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(vnd.sun.Star.script:VBAProject.Sheet1.test?language=Basiclocation=document))
+},
+/*
+vba.xls is still throwing up a basic error :-/
+{
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(vba.)),
+
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(vnd.sun.Star.script:VBAProject.Modul1.Modul1?language=Basiclocation=document)),
+}
+*/
+};
+   
 rtl::OUString aFileExtension(aFileFormats[1].pName, 
strlen(aFileFormats[1].pName), RTL_TEXTENCODING_UTF8 );
 rtl::OUString aFilterName(aFileFormats[1].pFilterName, 
strlen(aFileFormats[1].pFilterName), RTL_TEXTENCODING_UTF8) ;
-rtl::OUString aFileName;
-createFileURL(aFileNameBase, aFileExtension, aFileName);
 rtl::OUString aFilterType(aFileFormats[1].pTypeName, 
strlen(aFileFormats[1].pTypeName), RTL_TEXTENCODING_UTF8);
 std::cout  aFileFormats[1].pName   Test  std::endl;
-ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), 
aFilterType, aFileFormats[1].nFormatType);
-
-CPPUNIT_ASSERT_MESSAGE(Failed to load vba.xls, xDocSh.Is());
-
-//is it really the right way to call a vba macro through CallXScript?
-//it seems that the basic ide does it differently, but then we would need 
to init all parts ourself
-//the problem is that CallXScript inits the basic part
-BasicIDE::RunMethod takes an SbMethod as parametre
-rtl::OUString 
aURL(RTL_CONSTASCII_USTRINGPARAM(vnd.sun.Star.script:VBAProject.Modul1.Modul1?language=Basiclocation=document));
-String sUrl = aURL;
-Any aRet;
-Sequence sal_Int16  aOutParamIndex;
-Sequence Any  aOutParam;
-Sequence uno::Any  aParams;
-ScDocument* pDoc = xDocSh-GetDocument();
-
-xDocSh-CallXScript(sUrl, aParams, aRet, aOutParamIndex,aOutParam);
-double aValue;
-pDoc-GetValue(0,0,0,aValue);
-std::cout  aValue  std::endl;
-CPPUNIT_ASSERT_MESSAGE(script did not change the value of 
Sheet1.A1,aValue==2);
-xDocSh-DoClose();
+for ( sal_uInt32  i=0; iSAL_N_ELEMENTS( testInfo ); ++i )
+{
+rtl::OUString aFileName;
+createFileURL(testInfo[i].sFileBaseName, aFileExtension, aFileName);
+ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), 
aFilterType, aFileFormats[1].nFormatType);
+rtl::OUString sMsg( RTL_CONSTASCII_USTRINGPARAM(Failed to load ) );
+sMsg.concat( aFileName );
+CPPUNIT_ASSERT_MESSAGE( rtl::OUStringToOString( sMsg, 
RTL_TEXTENCODING_UTF8 ).getStr(), xDocSh.Is

[Libreoffice-commits] .: oox/source

2011-10-21 Thread Noel Power
 oox/source/ole/vbainputstream.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e3ef9bebf69479ead10a10a9a25d866321970edb
Author: Noel Power noel.po...@novell.com
Date:   Fri Oct 21 10:51:10 2011 +0100

tweak compressession hack to fix vba module import

it seems that the heuristic to trigger the inflate hack from frob is both 
wrong in the code ( my fault ) and additionally doesn't always hold true ( 
found a document where the heuristic is triggered falsely ) So. removing that 
heuristic entirely for now

diff --git a/oox/source/ole/vbainputstream.cxx 
b/oox/source/ole/vbainputstream.cxx
index 8b054ea..5299b7e 100644
--- a/oox/source/ole/vbainputstream.cxx
+++ b/oox/source/ole/vbainputstream.cxx
@@ -147,7 +147,7 @@ bool VbaInputStream::updateChunk()
 // start of the next chunk we can read those strange broken
 // ( I guess from a MSO bug ) commpessed streams  4k
 
-if ( bIgnoreBrokenSig || ( ! ( mpInStrm-getRemaining()  4096 ) ) )
+if ( bIgnoreBrokenSig )
 {
 bCompressed = true;
 nChunkLen = 4094;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/writeable-oletool' - src/ole.py src/oletool.py

2011-10-06 Thread Noel Power
 src/ole.py |   30 --
 src/oletool.py |   29 -
 2 files changed, 40 insertions(+), 19 deletions(-)

New commits:
commit 77e73a40bbaf5273ba775e70026c4494bdfbe30f
Author: Noel Power noel.po...@novell.com
Date:   Thu Oct 6 21:58:13 2011 +0100

fixed lots of brainfarts and added lots of debug

diff --git a/src/ole.py b/src/ole.py
index c67df09..ae22314 100644
--- a/src/ole.py
+++ b/src/ole.py
@@ -92,6 +92,7 @@ class Header(object):
 self.secSizeShort = 64
 
 self.params = params
+self.__SSAT = None
 
 def getSectorSize (self):
 return 2**self.secSize
@@ -277,8 +278,11 @@ class Header(object):
 self.bytes[68:72] = struct.pack( 'l', self.secIDFirstMSAT )
 self.bytes[72:76] = struct.pack( 'l', self.numSecMSAT )
 # write the MSAT, SAT  SSAT
+print *** writing MSAT
 self.writeMSAT()
+print *** writing SAT
 self.getSAT().write()
+print *** writing SSAT
 self.getSSAT().write()

 def writeMSAT (self): 
@@ -319,17 +323,19 @@ class Header(object):
 
 
 def getSSAT (self):
+if self.__SSAT != None:
+return self.__SSAT
 ssatID = self.getFirstSectorID(BlockType.SSAT)
 if ssatID  0:
 return None
 chain = self.getSAT().getSectorIDChain(ssatID)
 if len(chain) == 0:
 return None
-obj = SSAT(2**self.secSize, self.bytes, self.params)
+self.__SSAT = SSAT(2**self.secSize, self.bytes, self.params)
 for secID in chain:
-obj.addSector(secID)
-obj.buildArray()
-return obj
+self.__SSAT.addSector(secID)
+self.__SSAT.buildArray()
+return self.__SSAT
 
 def expandSSAT( self, numExtraEntriesNeeded ):
 # create enough sectors to increase SAT table to accomadate new entries
@@ -344,6 +350,8 @@ class Header(object):
 # add the sectors into the SSAT
 for sectorID in newSATSectors:
 self.getSSAT().sectorIDs.append( sectorID )
+#mark the sectors as used by the SAT table
+self.getSAT().array[ sectorID ] = -2
 # expand SSAT array with the contens of the new SATSectors
 self.getSSAT().appendArray( newSATSectors )
 # need to update the SectorIDChain for the SSAT
@@ -372,14 +380,17 @@ class Header(object):
 print Error: haven't implemented expanding the SAT to allow 
more sectors to be allocated for the MSAT
 return chain
 self.createSATSectors( MSATSectors )
-
+self.getSAT().appendArray( MSATSectors )
 #is there room in the MSAT table header part
 if len( self.getMSAT().secIDs ) + len( MSATSectors )  109:
 for sector in MSATSectors:
 self.getMSAT().appendSectorID( sector )
-self.getSAT().appendArray( MSATSectors )
+self.getSAT().addSector( sector )
+#mark MSAT sectors in SAT array as in use by MSAT
+self.getSAT().array[ sector ] = -4
 else:
 print *** extending the MSAT not supported yes
+
 #try again
 chain = self.getSAT().getFreeChainEntries( numNeeded, 0 )
  
@@ -524,16 +535,20 @@ class SAT(object):
 self.appendArray( self.sectorIDs )
 
 def appendArray( self, sectorIDs ):
+print reading sectors, sectorIDs
 numItems = self.sectorSize / 4
 for secID in sectorIDs:
 pos = 512 + secID*self.sectorSize
 for i in xrange(0, numItems):
 beginPos = pos + i*4
 id = getSignedInt(self.bytes[beginPos:beginPos+4])
+print index %d,  len(self.sectorIDs) %d sectorID %d pos %d 
value %d%(len(self.array) , len(self.sectorIDs),secID, beginPos, id )
 self.array.append(id)
+
 
 def write (self):
 #writes the contents of the SAT array to memory sectors
+print sectors making up the SAT or SAT are ,self.sectorIDs
 for index in xrange(0, len( self.array )):
 entryPos = 4 * index
 #calculate the offset into a sector
@@ -716,6 +731,8 @@ entire file stream.
 elif entry.StreamLocation == StreamLocation.SSAT:
 chain = 
self.header.getSSAT().getSectorIDChain(entry.StreamSectorID)
 
+print __getRawStream extracting from chain , chain
+
 if entry.StreamLocation == StreamLocation.SSAT:
 # Get the root storage stream.
 if self.RootStorage == None:
@@ -743,6 +760,7 @@ entire file stream.
 secSize = self.header.getSectorSize()
 numSectors = len(targetChain)
 print writing out %d sectors%(numSectors)
+print chain is , targetChain
 for i in xrange(0, numSectors ):
 srcPos = ( i * secSize

[Libreoffice-commits] .: oox/source

2011-10-05 Thread Noel Power
 oox/source/ole/olehelper.cxx |   28 ++--
 1 file changed, 26 insertions(+), 2 deletions(-)

New commits:
commit 04688482241aa28b40f3ba911a4c9acab87b5d56
Author: Noel Power noel.po...@novell.com
Date:   Wed Oct 5 17:52:32 2011 +0100

add hackery re. EditControls, FormattedField  ImageControls from msocximex

diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index fd4672a..3943e65 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -138,6 +138,7 @@ struct IdCntrlData
 };
 
 const sal_Int16 TOGGLEBUTTON = -1;
+const sal_Int16 FIELDCONTROL = -2;
 
 typedef std::map sal_Int16, GUIDCNamePair  GUIDCNamePairMap;
 class classIdToGUIDCNamePairMap
@@ -196,6 +197,9 @@ classIdToGUIDCNamePairMap::classIdToGUIDCNamePairMap()
 {  FormComponentType::PATTERNFIELD,
  { AX_GUID_TEXTBOX, TextBox},
 },
+{  FormComponentType::FORMULAFIELD,
+ { AX_GUID_TEXTBOX, TextBox},
+},
 {  FormComponentType::IMAGEBUTTON,
  { AX_GUID_COMMANDBUTTON, CommandButton},
 },
@@ -501,14 +505,34 @@ OleFormCtrlExportHelper::OleFormCtrlExportHelper(  const 
Reference XComponentCo
 PropertySet aPropSet( mxControlModel );
 if ( aPropSet.getProperty( nClassId, PROP_ClassId ) )
 {
-// psuedo ripped from legacy msocximex
-if ( nClassId == FormComponentType::COMMANDBUTTON )
+/* psuedo ripped from legacy msocximex:
+  There is a truly horrible thing with EditControls and 
FormattedField
+  Controls, they both pretend to have an EDITBOX ClassId for 
compability
+  reasons, at some stage in the future hopefully there will be a 
proper
+  FormulaField ClassId rather than this piggybacking two controls 
onto the
+  same ClassId, cmc.
+*/
+if ( nClassId == FormComponentType::TEXTFIELD)
+{
+if (xInfo-
+supportsService( CREATE_OUSTRING( 
com.sun.star.form.component.FormattedField ) ) )
+nClassId = FormComponentType::FORMULAFIELD;
+}
+else if ( nClassId == FormComponentType::COMMANDBUTTON )
 {
 bool bToggle = false;
 aPropSet.getProperty( bToggle, PROP_Toggle );
 if ( bToggle )
 nClassId = TOGGLEBUTTON;
 }
+else if ( nClassId == FormComponentType::CONTROL )
+{
+Reference XServiceInfo  xInfo( xCntrlModel,
+UNO_QUERY);
+if (xInfo-
+supportsService(OUString( CREATE_OUSTRING( 
com.sun.star.form.component.ImageControl ) ) ) )
+nClassId = FormComponentType::IMAGECONTROL;
+}
 
 GUIDCNamePairMap cntrlMap = classIdToGUIDCNamePairMap::get();
 GUIDCNamePairMap::iterator it = cntrlMap.find( nClassId );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] Changes to 'feature/writeable-oletool'

2011-10-03 Thread Noel Power
New branch 'feature/writeable-oletool' available with the following commits:
commit b4933e6563fdbdf11612258ad84feeb6806fa7e3
Author: Noel Power noel.po...@novell.com
Date:   Mon Oct 3 10:41:46 2011 +0100

fix some syntax errors when adding a short stream,

Note: adding a short stream seems to be broken now :-(
oletool.py has  a line like below
self.header.getSSAT().array[ lastIndex ] = -2

which doesn't appear to update the array :-/ no time to look further at the 
moment

commit f0136a1760318b033c1825951dc3b0c47e301732
Author: Noel Power noel.po...@novell.com
Date:   Sun Oct 2 22:48:14 2011 +0100

add working (mostly) now ..

commit 1d485a5406a3c3d7edc0807a0938c3a2f40c9b49
Author: Noel Power noel.po...@novell.com
Date:   Sun Oct 2 17:45:10 2011 +0100

nearly working

commit 5de2a1db297a1d13366b9e0f76e09b1075bf7f49
Author: Noel Power noel.po...@novell.com
Date:   Fri Sep 30 21:27:00 2011 +0100

more fixups, debug etc.

commit a6dda147cfeb7c5a68173e21e4de5f064c18e685
Author: Noel Power noel.po...@novell.com
Date:   Fri Sep 30 18:33:09 2011 +0100

more changes, getting to write more and more

commit 47bdf0b48e93c8b56d5035e987537255ca7c1922
Author: Noel Power noel.po...@novell.com
Date:   Fri Sep 30 14:38:30 2011 +0100

partial support for write methods in ole.py ( and associated changes in
oletool.py

commit e183e0a73cff80a85d600ed58305f46e8607876b
Author: Noel Power noel.po...@novell.com
Date:   Fri Sep 30 13:54:17 2011 +0100

fix missed hierarchical name, make delete use new ole.py write methods

commit 4051ccd730e43a409f7e1ac3f0d76f5c20904f32
Author: Noel Power noel.po...@novell.com
Date:   Fri Sep 30 09:25:55 2011 +0100

make oletool use bytarray exclusively too

commit 8293b43fa678749de016909d550ac70969b25cfe
Author: Noel Power noel.po...@novell.com
Date:   Thu Sep 29 21:35:57 2011 +0100

convert to use bytearray

commit bfb69adc89b5bc2aa7070cc42f49274ef9136bd4
Author: Noel Power noel.po...@novell.com
Date:   Thu Sep 29 20:21:24 2011 +0100

more partial amendments to add, wrong approach

commit 0dfc46b994810513301a70525881c485a063a036
Author: Noel Power noel.po...@novell.com
Date:   Thu Sep 29 12:32:19 2011 +0100

non functioning 'add' support

commit 03dbfb0ef194e4e4b90c051f0d0b9eecdb2c1ad8
Author: Noel Power noel.po...@novell.com
Date:   Thu Sep 29 10:44:21 2011 +0100

tweak main and getDirectory usage

commit b8e0455742dc13bf4394caba1264c69c8af1d654
Author: Noel Power noel.po...@novell.com
Date:   Thu Sep 29 10:32:05 2011 +0100

add dir/stream flag to output, correct trailing '/' name logic

commit 21f630cab0d7f380b4585ec4f436dcc1b0353bef
Author: Noel Power noel.po...@novell.com
Date:   Thu Sep 29 10:02:02 2011 +0100

small cleanup of deleteEntry

commit 770f14a15a4b04a27e08c86afbc967c2500f4be2
Author: Noel Power noel.po...@novell.com
Date:   Thu Sep 29 09:20:27 2011 +0100

make some private variables public

commit e1975790ab2d21f471e00e5adede121d8ed10188
Author: Noel Power noel.po...@novell.com
Date:   Wed Sep 28 19:13:59 2011 +0100

support clearing the SSAT entries in the chain

commit 26b1daf52d4b5226865c9858a0e8b3182ba22956
Author: Noel Power noel.po...@novell.com
Date:   Wed Sep 28 17:02:38 2011 +0100

simple detele

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