diff options
Diffstat (limited to 'basctl/source')
27 files changed, 287 insertions, 703 deletions
diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index b2b20e105b4e..416762f04b61 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -329,7 +329,7 @@ void AccessibleDialogControlShape::propertyChange( const beans::PropertyChangeEv ::rtl::OUString AccessibleDialogControlShape::getImplementationName() throw (RuntimeException) { - return ::rtl::OUString::createFromAscii( "com.sun.star.comp.basctl.AccessibleShape" ); + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.basctl.AccessibleShape" )); } // ----------------------------------------------------------------------------- @@ -350,7 +350,7 @@ sal_Bool AccessibleDialogControlShape::supportsService( const ::rtl::OUString& r Sequence< ::rtl::OUString > AccessibleDialogControlShape::getSupportedServiceNames() throw (RuntimeException) { Sequence< ::rtl::OUString > aNames(1); - aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.drawing.AccessibleShape" ); + aNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AccessibleShape" )); return aNames; } @@ -444,7 +444,7 @@ sal_Int16 AccessibleDialogControlShape::getAccessibleRole( ) throw (RuntimeExce // ----------------------------------------------------------------------------- -::rtl::OUString AccessibleDialogControlShape::getAccessibleDescription( ) throw (RuntimeException) +::rtl::OUString AccessibleDialogControlShape::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index b8c43e4daa37..ce914b2cb520 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -60,7 +60,7 @@ DBG_NAME( AccessibleDialogWindow ) // ----------------------------------------------------------------------------- -// class ChildDescriptor +// class ChildDescriptor // ----------------------------------------------------------------------------- AccessibleDialogWindow::ChildDescriptor::ChildDescriptor( DlgEdObj* _pDlgEdObj ) @@ -116,7 +116,7 @@ bool AccessibleDialogWindow::ChildDescriptor::operator<( const ChildDescriptor& } // ----------------------------------------------------------------------------- -// class AccessibleDialogWindow +// class AccessibleDialogWindow // ----------------------------------------------------------------------------- AccessibleDialogWindow::AccessibleDialogWindow( DialogWindow* pDialogWindow ) @@ -648,7 +648,7 @@ void AccessibleDialogWindow::disposing() ::rtl::OUString AccessibleDialogWindow::getImplementationName() throw (RuntimeException) { - return ::rtl::OUString::createFromAscii( "com.sun.star.comp.basctl.AccessibleWindow" ); + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.basctl.AccessibleWindow" )); } // ----------------------------------------------------------------------------- @@ -669,7 +669,7 @@ sal_Bool AccessibleDialogWindow::supportsService( const ::rtl::OUString& rServic Sequence< ::rtl::OUString > AccessibleDialogWindow::getSupportedServiceNames() throw (RuntimeException) { Sequence< ::rtl::OUString > aNames(1); - aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessibleWindow" ); + aNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.AccessibleWindow" )); return aNames; } @@ -778,7 +778,7 @@ sal_Int16 AccessibleDialogWindow::getAccessibleRole( ) throw (RuntimeException) // ----------------------------------------------------------------------------- -::rtl::OUString AccessibleDialogWindow::getAccessibleDescription( ) throw (RuntimeException) +::rtl::OUString AccessibleDialogWindow::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index ef1289736106..d2688fb696ba 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1461,8 +1461,7 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) : bVSplitted(FALSE), bHSplitted(FALSE), m_pModulWindow(0), - m_aImagesNormal(IDEResId(RID_IMGLST_LAYOUT)), - m_aImagesHighContrast(IDEResId(RID_IMGLST_LAYOUT_HC)) + m_aImagesNormal(IDEResId(RID_IMGLST_LAYOUT)) { SetBackground(GetSettings().GetStyleSettings().GetWindowColor()); @@ -1750,10 +1749,9 @@ void ModulWindowLayout::updateSyntaxHighlighting() } } -Image ModulWindowLayout::getImage(USHORT nId, bool bHighContrastMode) const +Image ModulWindowLayout::getImage(USHORT nId) const { - return (bHighContrastMode ? m_aImagesHighContrast : m_aImagesNormal). - GetImage(nId); + return m_aImagesNormal.GetImage(nId); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 12ae6a23fb6f..9d22f36a47f0 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -192,7 +192,6 @@ private: BreakPointList aBreakPointList; ModulWindow* pModulWindow; BOOL bErrorMarker; - bool m_bHighContrastMode; virtual void DataChanged(DataChangedEvent const & rDCEvt); @@ -467,7 +466,6 @@ private: svtools::ColorConfig m_aColorConfig; ImageList m_aImagesNormal; - ImageList m_aImagesHighContrast; virtual void DataChanged(DataChangedEvent const & rDCEvt); @@ -496,7 +494,7 @@ public: WatchWindow& GetWatchWindow() { return aWatchWindow; } StackWindow& GetStackWindow() { return aStackWindow; } - Image getImage(USHORT nId, bool bHighContrastMode) const; + Image getImage(USHORT nId) const; inline Color const & getSyntaxColor(TokenTypes eType) const { return m_aSyntaxColors[eType]; } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 2fa67b22fb48..63fcf84d6290 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -67,12 +67,11 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -long nVirtToolBoxHeight; // wird im WatchWindow init., im Stackwindow verw. +long nVirtToolBoxHeight; // inited in WatchWindow, used in Stackwindow long nHeaderBarHeight; #define SCROLL_LINE 12 #define SCROLL_PAGE 60 - #define DWBORDER 3 static const char cSuffixes[] = "%&!#@$"; @@ -80,9 +79,12 @@ static const char cSuffixes[] = "%&!#@$"; MapUnit eEditMapUnit = MAP_100TH_MM; -// #108672 Helper functions to get/set text in TextEngine -// using the stream interface (get/setText() only supports -// tools Strings limited to 64K). +/** + * Helper functions to get/set text in TextEngine using + * the stream interface. + * + * get/setText() only supports tools Strings limited to 64K). + */ ::rtl::OUString getTextEngineText( ExtTextEngine* pEngine ) { SvMemoryStream aMemStream; @@ -108,20 +110,19 @@ void setTextEngineText( ExtTextEngine* pEngine, const ::rtl::OUString aStr ) void lcl_DrawIDEWindowFrame( DockingWindow* pWin ) { - // The result of using explicit colors here appears to be harmless when - // switching to high contrast mode: - if ( !pWin->IsFloatingMode() ) - { - Size aSz = pWin->GetOutputSizePixel(); - const Color aOldLineColor( pWin->GetLineColor() ); - pWin->SetLineColor( Color( COL_WHITE ) ); - // oben eine weisse.. - pWin->DrawLine( Point( 0, 0 ), Point( aSz.Width(), 0 ) ); - // unten eine schwarze... - pWin->SetLineColor( Color( COL_BLACK ) ); - pWin->DrawLine( Point( 0, aSz.Height() - 1 ), Point( aSz.Width(), aSz.Height() - 1 ) ); - pWin->SetLineColor( aOldLineColor ); - } + if ( pWin->IsFloatingMode() ) + return; + + Size aSz = pWin->GetOutputSizePixel(); + const Color aOldLineColor( pWin->GetLineColor() ); + pWin->SetLineColor( Color( COL_WHITE ) ); + // White line on top + pWin->DrawLine( Point( 0, 0 ), Point( aSz.Width(), 0 ) ); + // Black line at bottom + pWin->SetLineColor( Color( COL_BLACK ) ); + pWin->DrawLine( Point( 0, aSz.Height() - 1 ), + Point( aSz.Width(), aSz.Height() - 1 ) ); + pWin->SetLineColor( aOldLineColor ); } void lcl_SeparateNameAndIndex( const String& rVName, String& rVar, String& rIndex ) @@ -190,7 +191,6 @@ __EXPORT EditorWindow::~EditorWindow() { EndListening( *pEditEngine ); pEditEngine->RemoveView( pEditView ); -// pEditEngine->SetViewWin( 0 ); delete pEditView; delete pEditEngine; } @@ -230,12 +230,12 @@ String EditorWindow::GetWordAtCursor() nEnd = nLength; } - // Nicht den Selektierten Bereich, sondern an der CursorPosition, - // falls Teil eines Worts markiert. + // Not the selected range, but at the CursorPosition, + // if a word is partially selected. if ( !aWord.Len() ) aWord = pTextEngine->GetWord( rSelEnd ); - // Kann leer sein, wenn komplettes Word markiert, da Cursor dahinter. + // Can be empty when full word selected, as Cursor behing it if ( !aWord.Len() && pEditView->HasSelection() ) aWord = pTextEngine->GetWord( rSelStart ); } @@ -248,7 +248,7 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt ) { BOOL bDone = FALSE; - // Sollte eigentlich mal aktiviert werden... + // Should have been activated at some point if ( pEditEngine ) { if ( rHEvt.GetMode() & HELPMODE_CONTEXT ) @@ -316,11 +316,11 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt ) void __EXPORT EditorWindow::Resize() { - // ScrollBars, etc. passiert in Adjust... + // ScrollBars, etc. happens in Adjust... if ( pEditView ) { long nVisY = pEditView->GetStartDocPos().Y(); -// pEditView->SetOutputArea( Rectangle( Point( 0, 0 ), GetOutputSize() ) ); + pEditView->ShowCursor(); Size aOutSz( GetOutputSizePixel() ); long nMaxVisAreaStart = pEditView->GetTextEngine()->GetTextHeight() - aOutSz.Height(); @@ -341,7 +341,6 @@ void __EXPORT EditorWindow::Resize() } - void __EXPORT EditorWindow::MouseMove( const MouseEvent &rEvt ) { if ( pEditView ) @@ -349,7 +348,6 @@ void __EXPORT EditorWindow::MouseMove( const MouseEvent &rEvt ) } - void __EXPORT EditorWindow::MouseButtonUp( const MouseEvent &rEvt ) { if ( pEditView ) @@ -389,10 +387,8 @@ BOOL EditorWindow::ImpCanModify() BOOL bCanModify = TRUE; if ( StarBASIC::IsRunning() ) { - // Wenn im Trace-Mode, entweder Trace abbrechen oder - // Eingabe verweigern - // Im Notify bei Basic::Stoped die Markierungen in den Modulen - // entfernen! + // If in Trace-mode, abort the trace or refuse input + // Remove markers in the modules in Notify at Basic::Stoped if ( QueryBox( 0, WB_OK_CANCEL, String( IDEResId( RID_STR_WILLSTOPPRG ) ) ).Execute() == RET_OK ) { pModulWindow->GetBasicStatus().bIsRunning = FALSE; @@ -406,7 +402,7 @@ BOOL EditorWindow::ImpCanModify() void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt ) { - if ( !pEditView ) // Passiert unter W95 bei letzte Version, Ctrl-Tab + if ( !pEditView ) // Happens in Win95 return; #if OSL_DEBUG_LEVEL > 1 @@ -471,7 +467,7 @@ void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt ) void __EXPORT EditorWindow::Paint( const Rectangle& rRect ) { - if ( !pEditEngine ) // spaetestens jetzt brauche ich sie... + if ( !pEditEngine ) // We need it now at latest CreateEditEngine(); pEditView->Paint( rRect ); @@ -489,10 +485,10 @@ BOOL EditorWindow::SetSourceInBasic( BOOL bQuiet ) BOOL bChanged = FALSE; if ( pEditEngine && pEditEngine->IsModified() - && !GetEditView()->IsReadOnly() ) // Added because of #i60626, otherwise + && !GetEditView()->IsReadOnly() ) // Added for #i60626, otherwise // any read only bug in the text engine could lead to a crash later { - if ( !StarBASIC::IsRunning() ) // Nicht zur Laufzeit! + if ( !StarBASIC::IsRunning() ) // Not at runtime! { ::rtl::OUString aModule = getTextEngineText( pEditEngine ); @@ -937,7 +933,6 @@ BreakPointWindow::BreakPointWindow( Window* pParent ) : pModulWindow = 0; nCurYOffset = 0; setBackgroundColor(GetSettings().GetStyleSettings().GetFieldColor()); - m_bHighContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode(); nMarkerPos = MARKER_NOMARKER; // nCurYOffset merken und nicht von EditEngine holen. @@ -971,9 +966,9 @@ void __EXPORT BreakPointWindow::Paint( const Rectangle& ) long nLineHeight = GetTextHeight(); Image aBrk1(((ModulWindowLayout *) pModulWindow->GetLayoutWindow())-> - getImage(IMGID_BRKENABLED, m_bHighContrastMode)); + getImage(IMGID_BRKENABLED)); Image aBrk0(((ModulWindowLayout *) pModulWindow->GetLayoutWindow())-> - getImage(IMGID_BRKDISABLED, m_bHighContrastMode)); + getImage(IMGID_BRKDISABLED)); Size aBmpSz( aBrk1.GetSizePixel() ); aBmpSz = PixelToLogic( aBmpSz ); Point aBmpOff( 0, 0 ); @@ -1022,8 +1017,7 @@ void BreakPointWindow::ShowMarker( BOOL bShow ) Image aMarker(((ModulWindowLayout*)pModulWindow->GetLayoutWindow())-> getImage(bErrorMarker - ? IMGID_ERRORMARKER : IMGID_STEPMARKER, - m_bHighContrastMode)); + ? IMGID_ERRORMARKER : IMGID_STEPMARKER)); Size aMarkerSz( aMarker.GetSizePixel() ); aMarkerSz = PixelToLogic( aMarkerSz ); @@ -1155,7 +1149,6 @@ void BreakPointWindow::DataChanged(DataChangedEvent const & rDCEvt) != rDCEvt.GetOldSettings()->GetStyleSettings().GetFieldColor()) { setBackgroundColor(aColor); - m_bHighContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode(); Invalidate(); } } @@ -1223,8 +1216,6 @@ WatchWindow::WatchWindow( Window* pParent ) : aXEdit.GetAccelerator().InsertItem( 2, KeyCode( KEY_ESCAPE ) ); aXEdit.Show(); - aRemoveWatchButton.SetModeImage(Image(IDEResId(RID_IMG_REMOVEWATCH_HC)), - BMP_COLOR_HIGHCONTRAST); aRemoveWatchButton.SetClickHdl( LINK( this, WatchWindow, ButtonHdl ) ); aRemoveWatchButton.SetPosPixel( Point( nTextLen + aXEdit.GetSizePixel().Width() + 4, 2 ) ); Size aSz( aRemoveWatchButton.GetModeImage().GetSizePixel() ); @@ -1535,7 +1526,6 @@ StackWindow::StackWindow( Window* pParent ) : aSz.Width() += 6; aSz.Height() += 6; aGotoCallButton.SetSizePixel( aSz ); -// aGotoCallButton.Show(); // wird vom Basic noch nicht unterstuetzt! aGotoCallButton.Hide(); // make stack window keyboard accessible @@ -1697,11 +1687,6 @@ void __EXPORT ComplexEditorWindow::Resize() aEdtWindow.SetPosSizePixel( Point( DWBORDER+aBrkSz.Width()-1, DWBORDER ), aEWSz ); aEWVScrollBar.SetPosSizePixel( Point( aOutSz.Width()-DWBORDER-nSBWidth, DWBORDER ), Size( nSBWidth, aSz.Height() ) ); - - // Macht das EditorWindow, ausserdem hier falsch, da Pixel -// aEWVScrollBar.SetPageSize( aEWSz.Height() * 8 / 10 ); -// aEWVScrollBar.SetVisibleSize( aSz.Height() ); -// Invalidate(); } IMPL_LINK( ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar ) @@ -1719,7 +1704,6 @@ IMPL_LINK( ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar ) return 0; } -// virtual void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt) { Window::DataChanged(rDCEvt); @@ -1736,7 +1720,6 @@ void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt) } } -// virtual uno::Reference< awt::XWindowPeer > EditorWindow::GetComponentInterface(BOOL bCreate) { @@ -1760,7 +1743,7 @@ WatchTreeListBox::WatchTreeListBox( Window* pParent, WinBits nWinBits ) WatchTreeListBox::~WatchTreeListBox() { - // User-Daten zerstoeren... + // Destroy user data SvLBoxEntry* pEntry = First(); while ( pEntry ) { @@ -1845,7 +1828,6 @@ void WatchTreeListBox::RequestingChilds( SvLBoxEntry * pParent ) pChildItem->maName = aBaseName; String aIndexStr = String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ); - // pChildItem->mpArray = pItem->mpArray; pChildItem->mpArrayParentItem = pItem; pChildItem->nDimLevel = nThisLevel; pChildItem->nDimCount = pItem->nDimCount; @@ -1911,14 +1893,10 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArra } // Array? else if( (pArray = pItem->GetRootArray()) != NULL ) - // else if( (pArray = pItem->mpArray) != NULL ) { rbArrayElement = true; if( pParentItem->nDimLevel + 1 == pParentItem->nDimCount ) - // if( pItem->nDimLevel == pItem->nDimCount ) pSBX = pArray->Get( pItem->pIndices ); - // else - // pSBX = pArray; } } else @@ -2042,8 +2020,8 @@ BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& UpdateWatches(); - // Der Text soll niemals 1-zu-1 uebernommen werden, weil dann das - // UpdateWatches verlorengeht. + // The text should never be taken/copied 1:1, + // as the UpdateWatches will be lost return FALSE; } @@ -2096,7 +2074,6 @@ static String implCreateTypeStringForDimArray( WatchItem* pItem, SbxDataType eTy void implEnableChildren( SvLBoxEntry* pEntry, bool bEnable ) -// inline void implEnableChildren( SvLBoxEntry* pEntry, bool bEnable ) { if( bEnable ) { @@ -2124,7 +2101,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) { WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); String aVName( pItem->maName ); - DBG_ASSERT( aVName.Len(), "Var? - Darf nicht leer sein!" ); + DBG_ASSERT( aVName.Len(), "Var? - Must not be empty!" ); String aWatchStr; String aTypeStr; if ( pCurMethod ) @@ -2137,7 +2114,6 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) { SbxDimArray* pRootArray = pItem->GetRootArray(); SbxDataType eType = pRootArray->GetType(); - // SbxDataType eType = pItem->mpArray->GetType(); aTypeStr = implCreateTypeStringForDimArray( pItem, eType ); implEnableChildren( pEntry, true ); } @@ -2146,7 +2122,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) if ( pSBX && pSBX->ISA( SbxVariable ) && !pSBX->ISA( SbxMethod ) ) { SbxVariable* pVar = (SbxVariable*)pSBX; - // Sonderbehandlung fuer Arrays: + // extra treatment of arrays SbxDataType eType = pVar->GetType(); if ( eType & SbxARRAY ) { diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 244440823169..6b1ec9cfea16 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -234,9 +234,9 @@ void DialogWindow::KeyInput( const KeyEvent& rKEvt ) void DialogWindow::Command( const CommandEvent& rCEvt ) { - if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) || - ( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) || - ( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) ) + if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) || + ( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) || + ( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) ) { HandleScrollCommand( rCEvt, GetHScrollBar(), GetVScrollBar() ); } @@ -273,17 +273,6 @@ IMPL_LINK( DialogWindow, NotifyUndoActionHdl, SfxUndoAction *, pUndoAction ) { (void)pUndoAction; - // not working yet for unocontrols - /* - if (pUndoAction) - { - pUndoMgr->AddUndoAction( pUndoAction ); - SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); - if ( pBindings ) - pBindings->Invalidate( SID_UNDO ); - } - */ - return 0; } @@ -682,8 +671,7 @@ void DialogWindow::UpdateBrowser() ((PropBrw*)(pChildWin->GetWindow()))->Update( pIDEShell ); } -static ::rtl::OUString aResourceResolverPropName = - ::rtl::OUString::createFromAscii( "ResourceResolver" ); +static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" )); BOOL DialogWindow::SaveDialog() { @@ -732,7 +720,7 @@ BOOL DialogWindow::SaveDialog() Reference< XInputStream > xInput( xISP->createInputStream() ); Reference< XSimpleFileAccess > xSFI( xMSF->createInstance - ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY ); + ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), UNO_QUERY ); Reference< XOutputStream > xOutput; try @@ -790,9 +778,9 @@ BOOL DialogWindow::SaveDialog() aURLObj.removeSegment(); ::rtl::OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); sal_Bool bReadOnly = sal_False; - ::rtl::OUString aComment( ::rtl::OUString::createFromAscii( "# " ) ); + ::rtl::OUString aComment( RTL_CONSTASCII_USTRINGPARAM( "# " )); aComment += aDialogName; - aComment += ::rtl::OUString::createFromAscii( " strings" ); + aComment += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " strings" )); Reference< task::XInteractionHandler > xDummyHandler; // Remove old properties files in case of overwriting Dialog files @@ -801,7 +789,7 @@ BOOL DialogWindow::SaveDialog() Sequence< ::rtl::OUString > aContentSeq = xSFI->getFolderContents( aURL, false ); ::rtl::OUString aDialogName_( aDialogName ); - aDialogName_ += ::rtl::OUString::createFromAscii( "_" ); + aDialogName_ += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_" )); sal_Int32 nCount = aContentSeq.getLength(); const ::rtl::OUString* pFiles = aContentSeq.getConstArray(); for( int i = 0 ; i < nCount ; i++ ) @@ -922,8 +910,7 @@ NameClashQueryBox::NameClashQueryBox( Window* pParent, AddButton( String( IDEResId( RID_STR_DLGIMP_CLASH_REPLACE ) ), RET_NO, 0 ); AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); - SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? - QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() ); + SetImage( QueryBox::GetStandardImage() ); } @@ -948,8 +935,7 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent, AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); AddButton( BUTTON_HELP, BUTTONID_HELP, BUTTONDIALOG_HELPBUTTON, 4 ); - SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? - QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() ); + SetImage( QueryBox::GetStandardImage() ); } BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ) @@ -1000,7 +986,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY_THROW ); Reference< XSimpleFileAccess > xSFI( xMSF->createInstance - ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY_THROW ); + ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), UNO_QUERY_THROW ); Reference< XInputStream > xInput; if( xSFI->exists( aCurPath ) ) @@ -1044,7 +1030,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen if( bDialogAlreadyExists ) { String aQueryBoxTitle( IDEResId( RID_STR_DLGIMP_CLASH_TITLE ) ); - String aQueryBoxText( IDEResId( RID_STR_DLGIMP_CLASH_TEXT ) ); + String aQueryBoxText( IDEResId( RID_STR_DLGIMP_CLASH_TEXT ) ); aQueryBoxText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "$(ARG1)" ) ), aXmlDlgName ); NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 80928ca87ec5..0ad75f2fd725 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1160,13 +1160,10 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO void BasicIDEShell::ManageToolbars() { - static ::rtl::OUString aLayoutManagerName = ::rtl::OUString::createFromAscii( "LayoutManager" ); - static ::rtl::OUString aMacroBarResName = - ::rtl::OUString::createFromAscii( "private:resource/toolbar/macrobar" ); - static ::rtl::OUString aDialogBarResName = - ::rtl::OUString::createFromAscii( "private:resource/toolbar/dialogbar" ); - static ::rtl::OUString aInsertControlsBarResName = - ::rtl::OUString::createFromAscii( "private:resource/toolbar/insertcontrolsbar" ); + static ::rtl::OUString aLayoutManagerName( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )); + static ::rtl::OUString aMacroBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/macrobar" )); + static ::rtl::OUString aDialogBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/dialogbar" )); + static ::rtl::OUString aInsertControlsBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertcontrolsbar" )); (void)aInsertControlsBarResName; if( !pCurWin ) @@ -1257,10 +1254,7 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic ) { if ( bAppWindowDisabled ) Application::GetDefDialogParent()->Enable( FALSE ); - /* - if ( bDispatcherLocked ) - SFX_APP()->LockDispatcher( TRUE ); - */ + if ( nWaitCount ) { BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); @@ -1316,7 +1310,6 @@ void __EXPORT BasicIDEShell::AdjustPosSizePixel( const Point &rPos, const Size & return; Size aSz( rSize ); -// long nScrollbarWidthPixel = aVScrollBar.GetSizePixel().Width(); Size aScrollBarBoxSz( aScrollBarBox.GetSizePixel() ); aSz.Height() -= aScrollBarBoxSz.Height(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 9b5d01636047..5300784fa9aa 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -88,7 +88,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star; using ::rtl::OUString; -static const rtl::OUString sStandardLibName( rtl::OUString::createFromAscii("Standard") ); +static const rtl::OUString sStandardLibName( RTL_CONSTASCII_USTRINGPARAM("Standard")); typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerBASE; @@ -162,8 +162,6 @@ SFX_IMPL_NAMED_VIEWFACTORY( BasicIDEShell, "Default" ) } -// MI: Prinzipiel IDL, aber ich lieber doch nicht? -// SFX_IMPL_ /*IDL_*/ INTERFACE( BasicIDEShell, SfxViewShell, IDEResId( RID_STR_IDENAME ) ) SFX_IMPL_INTERFACE( BasicIDEShell, SfxViewShell, IDEResId( RID_STR_IDENAME ) ) { SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG ); @@ -176,7 +174,6 @@ SFX_IMPL_INTERFACE( BasicIDEShell, SfxViewShell, IDEResId( RID_STR_IDENAME ) ) #define IDE_VIEWSHELL_FLAGS SFX_VIEW_CAN_PRINT|SFX_VIEW_NO_NEWWINDOW -// Hack for #101048 static sal_Int32 GnBasicIDEShellCount; sal_Int32 getBasicIDEShellCount( void ) { return GnBasicIDEShellCount; } @@ -288,10 +285,6 @@ __EXPORT BasicIDEShell::~BasicIDEShell() if ( pListener ) pListener->removeContainerListener( m_aCurDocument, m_aCurLibName ); - // MI: Das gab einen GPF im SDT beim Schliessen da dann der ViewFrame die - // ObjSh loslaesst. Es wusste auch keiner mehr wozu das gut war. - // GetViewFrame()->GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_DYING ) ); - SFX_APP()->LeaveBasicCall(); IDE_DLL()->GetExtraData()->ShellInCriticalSection() = FALSE; @@ -433,14 +426,11 @@ USHORT __EXPORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) } else { - // Hier unguenstig, wird zweimal gerufen... -// StoreAllWindowData(); - BOOL bCanClose = TRUE; for ( ULONG nWin = 0; bCanClose && ( nWin < aIDEWindowTable.Count() ); nWin++ ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin ); - if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() ) + if ( !pWin->CanClose() ) { if ( m_aCurLibName.Len() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) ) SetCurLib( ScriptDocument::getApplicationScriptDocument(), String(), false ); @@ -1061,5 +1051,4 @@ void BasicIDEShell::ImplStartListening( StarBASIC* pBasic ) StartListening( pBasic->GetBroadcaster(), TRUE /* Nur einmal anmelden */ ); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src index 556211f690af..30d0b9b8fff8 100644 --- a/basctl/source/basicide/basidesh.src +++ b/basctl/source/basicide/basidesh.src @@ -343,49 +343,53 @@ ImageButton RID_IMGBTN_REMOVEWATCH }; QuickHelpText [ en-US ] = "Remove Watch" ; }; -Image RID_IMG_REMOVEWATCH_HC -{ - ImageBitmap = Bitmap { File = "baswatr_h.bmp" ; }; - MASKCOLOR -}; ImageButton RID_IMGBTN_GOTOCALL { HelpId = HID_BASICIDE_GOTOALL ; SmallStyle = TRUE ; ButtonImage = Image { ImageBitmap = Bitmap { File = "basgocl.bmp" ; }; } ; }; + String RID_STR_REMOVEWATCH { Text [ en-US ] = "Watch:" ; }; + String RID_STR_STACK { Text [ en-US ] = "Calls: " ; }; + String RID_STR_USERMACROS { Text [ en-US ] = "My Macros" ; }; + String RID_STR_USERDIALOGS { Text [ en-US ] = "My Dialogs" ; }; + String RID_STR_USERMACROSDIALOGS { Text [ en-US ] = "My Macros & Dialogs" ; }; + String RID_STR_SHAREMACROS { Text [ en-US ] = "%PRODUCTNAME Macros" ; }; + String RID_STR_SHAREDIALOGS { Text [ en-US ] = "%PRODUCTNAME Dialogs" ; }; + String RID_STR_SHAREMACROSDIALOGS { Text [ en-US ] = "%PRODUCTNAME Macros & Dialogs" ; }; + Menu RID_POPUP_BRKPROPS { Text [ en-US ] = "Properties" ; @@ -411,6 +415,7 @@ Menu RID_POPUP_BRKPROPS }; }; }; + Menu RID_POPUP_BRKDLG { Text [ en-US ] = "Manage Breakpoints" ; @@ -425,6 +430,7 @@ Menu RID_POPUP_BRKDLG }; }; }; + Menu RID_POPUP_TABBAR { DefaultItemId = SID_BASICIDE_HIDECURPAGE ; @@ -487,6 +493,7 @@ Menu RID_POPUP_TABBAR }; }; }; + Menu RID_POPUP_DLGED { DefaultItemId = SID_SHOW_PROPERTYBROWSER ; @@ -500,6 +507,7 @@ Menu RID_POPUP_DLGED }; }; }; + ImageList RID_IMGLST_LAYOUT { Prefix = "im"; @@ -512,148 +520,92 @@ ImageList RID_IMGLST_LAYOUT IMGID_ERRORMARKER ; }; }; -ImageList RID_IMGLST_LAYOUT_HC -{ - Prefix = "imh"; - MASKCOLOR - IdList = - { - IMGID_BRKENABLED ; - IMGID_BRKDISABLED ; - IMGID_STEPMARKER ; - IMGID_ERRORMARKER ; - }; -}; Image RID_IMG_LOCKED { ImageBitmap = Bitmap { File = "locked.bmp" ; }; MASKCOLOR }; -Image RID_IMG_LOCKED_HC -{ - ImageBitmap = Bitmap { File = "locked_h.bmp" ; }; - MASKCOLOR -}; + Image RID_IMG_INSTALLATION { ImageBitmap = Bitmap { File = "harddisk_16.png"; }; MASKCOLOR }; -Image RID_IMG_INSTALLATION_HC -{ - ImageBitmap = Bitmap { File = "harddisk_16_h.png"; }; - MASKCOLOR -}; Image RID_IMG_DOCUMENT { ImageBitmap = Bitmap { File = "im30826.png"; }; MASKCOLOR }; -Image RID_IMG_DOCUMENT_HC -{ - ImageBitmap = Bitmap { File = "imh30826.png"; }; - MASKCOLOR -}; Image RID_IMG_MODLIB { ImageBitmap = Bitmap { File = "im30820.png"; }; MASKCOLOR }; -Image RID_IMG_MODLIB_HC -{ - ImageBitmap = Bitmap { File = "imh30820.png"; }; - MASKCOLOR -}; Image RID_IMG_MODLIBNOTLOADED { ImageBitmap = Bitmap { File = "im30827.png"; }; MASKCOLOR }; -Image RID_IMG_MODLIBNOTLOADED_HC -{ - ImageBitmap = Bitmap { File = "imh30827.png"; }; - MASKCOLOR -}; Image RID_IMG_MODULE { ImageBitmap = Bitmap { File = "im30821.png"; }; MASKCOLOR }; -Image RID_IMG_MODULE_HC -{ - ImageBitmap = Bitmap { File = "imh30821.png"; }; - MASKCOLOR -}; Image RID_IMG_MACRO { ImageBitmap = Bitmap { File = "im30822.png"; }; MASKCOLOR }; -Image RID_IMG_MACRO_HC -{ - ImageBitmap = Bitmap { File = "imh30822.png"; }; - MASKCOLOR -}; Image RID_IMG_DLGLIB { ImageBitmap = Bitmap { File = "dialogfolder_16.png"; }; MASKCOLOR }; -Image RID_IMG_DLGLIB_HC -{ - ImageBitmap = Bitmap { File = "dialogfolder_16_h.png"; }; - MASKCOLOR -}; Image RID_IMG_DLGLIBNOTLOADED { ImageBitmap = Bitmap { File = "dialogfoldernot_16.png"; }; MASKCOLOR }; -Image RID_IMG_DLGLIBNOTLOADED_HC -{ - ImageBitmap = Bitmap { File = "dialogfoldernot_16_h.png"; }; - MASKCOLOR -}; Image RID_IMG_DIALOG { ImageBitmap = Bitmap { File = "im30823.png"; }; MASKCOLOR }; -Image RID_IMG_DIALOG_HC -{ - ImageBitmap = Bitmap { File = "imh30823.png"; }; - MASKCOLOR -}; String RID_STR_QUERYREPLACEMACRO { Text [ en-US ] = "Do you want to overwrite the XX macro?" ; }; + String RID_STR_TRANSLATION_NOTLOCALIZED { Text [ en-US ] = "<Not localized>" ; }; + String RID_STR_TRANSLATION_DEFAULT { Text [ en-US ] = "[Default Language]" ; }; + String RID_STR_DOCUMENT_OBJECTS { Text [ en-US ] = "Document Objects" ; }; + String RID_STR_USERFORMS { Text [ en-US ] = "Forms" ; }; + String RID_STR_NORMAL_MODULES { Text [ en-US ] = "Modules" ; }; + String RID_STR_CLASS_MODULES { Text [ en-US ] = "Class Modules" ; }; - String RID_STR_DLGIMP_CLASH_RENAME { Text [ en-US ] = "Rename" ; @@ -709,39 +661,9 @@ String RID_STR_DLGIMP_MISMATCH_TEXT #define MN_PLHELP 31 #define MN_PLTEMPLATES 11 - /* The application menu bar resource has become obsolete. You can now find the menu bar definition at: <project>/basicide/menubar/menubar.xml. */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 4fb2679cbc9f..d8224f586aa3 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -71,7 +71,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName ); uno::Any aObject( aModuleInfo.ModuleObject ); uno::Reference< lang::XServiceInfo > xServiceInfo( aObject, uno::UNO_QUERY ); - if( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Worksheet" ) ) ) + if( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Worksheet" )) ) ) { uno::Reference< container::XNamed > xNamed( aObject, uno::UNO_QUERY ); if( xNamed.is() ) @@ -234,12 +234,10 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati { String aRootName( GetRootEntryName( rDocument, eLocation ) ); Image aImage; - Image aImageHC; - GetRootEntryBitmaps( rDocument, aImage, aImageHC ); + GetRootEntryBitmaps( rDocument, aImage ); pDocumentRootEntry = AddEntry( aRootName, aImage, - aImageHC, 0, true, std::auto_ptr< BasicEntry >( new BasicDocumentEntry( rDocument, eLocation ) ) ); } @@ -286,21 +284,15 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con } // create tree list box entry - USHORT nId, nIdHC; + USHORT nId; if ( ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ) ) - { nId = bLoaded ? RID_IMG_DLGLIB : RID_IMG_DLGLIBNOTLOADED; - nIdHC = bLoaded ? RID_IMG_DLGLIB_HC : RID_IMG_DLGLIBNOTLOADED_HC; - } else - { nId = bLoaded ? RID_IMG_MODLIB : RID_IMG_MODLIBNOTLOADED; - nIdHC = bLoaded ? RID_IMG_MODLIB_HC : RID_IMG_MODLIBNOTLOADED_HC; - } SvLBoxEntry* pLibRootEntry = FindEntry( pDocumentRootEntry, aLibName, OBJ_TYPE_LIBRARY ); if ( pLibRootEntry ) { - SetEntryBitmaps( pLibRootEntry, Image( IDEResId( nId ) ), Image( IDEResId( nIdHC ) ) ); + SetEntryBitmaps( pLibRootEntry, Image( IDEResId( nId ) ) ); if ( IsExpanded( pLibRootEntry ) ) ImpCreateLibSubEntries( pLibRootEntry, rDocument, aLibName ); } @@ -309,7 +301,6 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con pLibRootEntry = AddEntry( aLibName, Image( IDEResId( nId ) ), - Image( IDEResId( nIdHC ) ), pDocumentRootEntry, true, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_LIBRARY ) ) ); } @@ -347,7 +338,6 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const pModuleEntry = AddEntry( aModName, Image( IDEResId( RID_IMG_MODULE ) ), - Image( IDEResId( RID_IMG_MODULE_HC ) ), pLibRootEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_MODULE ) ) ); @@ -366,7 +356,6 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const pEntry = AddEntry( aName, Image( IDEResId( RID_IMG_MACRO ) ), - Image( IDEResId( RID_IMG_MACRO_HC ) ), pModuleEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_METHOD ) ) ); } @@ -403,7 +392,6 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const pDialogEntry = AddEntry( aDlgName, Image( IDEResId( RID_IMG_DIALOG ) ), - Image( IDEResId( RID_IMG_DIALOG_HC ) ), pLibRootEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_DIALOG ) ) ); } @@ -433,7 +421,7 @@ void BasicTreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEnt SvLBoxEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType ); if( pLibSubRootEntry ) { - SetEntryBitmaps( pLibSubRootEntry, Image( IDEResId( RID_IMG_MODLIB ) ), Image( IDEResId( RID_IMG_MODLIB_HC ) ) ); + SetEntryBitmaps( pLibSubRootEntry, Image( IDEResId( RID_IMG_MODLIB ) ) ); if ( IsExpanded( pLibSubRootEntry ) ) ImpCreateLibSubSubEntriesInVBAMode( pLibSubRootEntry, rDocument, rLibName ); } @@ -442,7 +430,6 @@ void BasicTreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEnt pLibSubRootEntry = AddEntry( aEntryName, Image( IDEResId( RID_IMG_MODLIB ) ), - Image( IDEResId( RID_IMG_MODLIB_HC ) ), pLibRootEntry, true, std::auto_ptr< BasicEntry >( new BasicEntry( eType ) ) ); } @@ -504,7 +491,6 @@ void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubR pModuleEntry = AddEntry( aEntryName, Image( IDEResId( RID_IMG_MODULE ) ), - Image( IDEResId( RID_IMG_MODULE_HC ) ), pLibSubRootEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_MODULE ) ) ); @@ -523,7 +509,6 @@ void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubR pEntry = AddEntry( aName, Image( IDEResId( RID_IMG_MACRO ) ), - Image( IDEResId( RID_IMG_MACRO_HC ) ), pModuleEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_METHOD ) ) ); } @@ -712,23 +697,23 @@ BOOL BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry ) } SvLBoxEntry* BasicTreeListBox::AddEntry( - const String& rText, const Image& rImage, const Image& rImageHC, - SvLBoxEntry* pParent, bool bChildrenOnDemand, std::auto_ptr< BasicEntry > aUserData ) + const String& rText, + const Image& rImage, + SvLBoxEntry* pParent, + bool bChildrenOnDemand, + std::auto_ptr< BasicEntry > aUserData +) { SvLBoxEntry* p = InsertEntry( rText, rImage, rImage, pParent, bChildrenOnDemand, LIST_APPEND, aUserData.release() ); // XXX possible leak - SetExpandedEntryBmp( p, rImageHC, BMP_COLOR_HIGHCONTRAST ); - SetCollapsedEntryBmp( p, rImageHC, BMP_COLOR_HIGHCONTRAST ); return p; } -void BasicTreeListBox::SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage, const Image& rImageHC ) +void BasicTreeListBox::SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage ) { - SetExpandedEntryBmp( pEntry, rImage, BMP_COLOR_NORMAL ); - SetCollapsedEntryBmp( pEntry, rImage, BMP_COLOR_NORMAL ); - SetExpandedEntryBmp( pEntry, rImageHC, BMP_COLOR_HIGHCONTRAST ); - SetCollapsedEntryBmp( pEntry, rImageHC, BMP_COLOR_HIGHCONTRAST ); + SetExpandedEntryBmp( pEntry, rImage ); + SetCollapsedEntryBmp( pEntry, rImage ); } LibraryType BasicTreeListBox::GetLibraryType() const @@ -746,7 +731,7 @@ String BasicTreeListBox::GetRootEntryName( const ScriptDocument& rDocument, Libr return rDocument.getTitle( eLocation, GetLibraryType() ); } -void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage, Image& rImageHC ) +void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage ) { OSL_ENSURE( rDocument.isValid(), "BasicTreeListBox::GetRootEntryBitmaps: illegal document!" ); if ( !rDocument.isValid() ) @@ -788,25 +773,17 @@ void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Ima if ( sFactoryURL.getLength() ) { - rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), - FALSE /* small */, - FALSE /* normal */ ); - - rImageHC = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), - FALSE /* small */, - TRUE /* high contrast */ ); + rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), FALSE ); } else { // default icon rImage = Image( IDEResId( RID_IMG_DOCUMENT ) ); - rImageHC = Image( IDEResId( RID_IMG_DOCUMENT_HC ) ); } } else { rImage = Image( IDEResId( RID_IMG_INSTALLATION ) ); - rImageHC = Image( IDEResId( RID_IMG_INSTALLATION_HC ) ); } } diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index 08fb03d1c689..492e48da27bd 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -156,7 +156,7 @@ private: USHORT nMode; ::basctl::DocumentEventNotifier m_aNotifier; - void SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage, const Image& rImageHC ); + void SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage ); protected: virtual void RequestingChilds( SvLBoxEntry* pParent ); @@ -204,12 +204,12 @@ public: USHORT ConvertType( BasicEntryType eType ); bool IsValidEntry( SvLBoxEntry* pEntry ); - SvLBoxEntry* AddEntry( const String& rText, const Image& rImage, const Image& rImageHC, + SvLBoxEntry* AddEntry( const String& rText, const Image& rImage, SvLBoxEntry* pParent, bool bChildrenOnDemand, std::auto_ptr< BasicEntry > aUserData ); String GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const; - void GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage, Image& rImageHC ); + void GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage ); void SetCurrentEntry( BasicEntryDescriptor& rDesc ); diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 3f114b190587..9b1a18614f1e 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -123,8 +123,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry ) // exchange image bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ); Image aImage( IDEResId( bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB ) ); - Image aImageHC( IDEResId( bDlgMode ? RID_IMG_DLGLIB_HC : RID_IMG_MODLIB_HC ) ); - SetEntryBitmaps( pEntry, aImage, aImageHC ); + SetEntryBitmaps( pEntry, aImage ); } else { diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index bd0259fe0637..4ff1d6406b32 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -45,9 +45,9 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::resource; -static ::rtl::OUString aDot = ::rtl::OUString::createFromAscii( "." ); -static ::rtl::OUString aEsc = ::rtl::OUString::createFromAscii( "&" ); -static ::rtl::OUString aSemi = ::rtl::OUString::createFromAscii( ";" ); +static ::rtl::OUString aDot( RTL_CONSTASCII_USTRINGPARAM( "." )); +static ::rtl::OUString aEsc( RTL_CONSTASCII_USTRINGPARAM( "&" )); +static ::rtl::OUString aSemi( RTL_CONSTASCII_USTRINGPARAM( ";" )); LocalizationMgr::LocalizationMgr( BasicIDEShell* pIDEShell, @@ -73,9 +73,8 @@ bool LocalizationMgr::isLibraryLocalized( void ) void LocalizationMgr::handleTranslationbar( void ) { - static ::rtl::OUString aLayoutManagerName = ::rtl::OUString::createFromAscii( "LayoutManager" ); - static ::rtl::OUString aToolBarResName = - ::rtl::OUString::createFromAscii( "private:resource/toolbar/translationbar" ); + static ::rtl::OUString aLayoutManagerName( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )); + static ::rtl::OUString aToolBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/translationbar" )); Reference< beans::XPropertySet > xFrameProps ( m_pIDEShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY ); @@ -100,7 +99,6 @@ void LocalizationMgr::handleTranslationbar( void ) } -//============================================ // TODO: -> export from toolkit struct LanguageDependentProp @@ -136,7 +134,7 @@ bool isLanguageDependentProperty( ::rtl::OUString aName ) } return bRet; } -//============================================ + void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResourceMode eMode ) { @@ -266,7 +264,6 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties ::rtl::OUString aPropIdStr = aEsc; aPropIdStr += aPureIdStr; // TODO?: Change here and in toolkit - //aPropIdStr += aSemi; (void)aSemi; aPropAny <<= aPropIdStr; xPropertySet->setPropertyValue( aPropName, aPropAny ); @@ -339,7 +336,6 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties ::rtl::OUString aPropIdStr = aEsc; aPropIdStr += aPureIdStr; // TODO?: Change here and in toolkit - //aPropIdStr += aSemi; (void)aSemi; aPropAny <<= aPropIdStr; xPropertySet->setPropertyValue( aPropName, aPropAny ); @@ -377,7 +373,6 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties ::rtl::OUString aPropIdStr = aEsc; aPropIdStr += aPureIdStr; // TODO?: Change here and in toolkit - //aPropIdStr += aSemi; (void)aSemi; aPropAny <<= aPropIdStr; xPropertySet->setPropertyValue( aPropName, aPropAny ); @@ -661,50 +656,6 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties return nChangedCount; } -/* -void TEST_simulateDialogAddRemoveLocale( bool bAdd ) -{ - Sequence< Locale > aLocaleSeq( 1 ); - Locale* pLocales = aLocaleSeq.getArray(); - - ::com::sun::star::lang::Locale aLocale_en; - aLocale_en.Language = ::rtl::OUString::createFromAscii( "en" ); - aLocale_en.Country = ::rtl::OUString::createFromAscii( "US" ); - - ::com::sun::star::lang::Locale aLocale_de; - aLocale_de.Language = ::rtl::OUString::createFromAscii( "de" ); - aLocale_de.Country = ::rtl::OUString::createFromAscii( "DE" ); - - ::com::sun::star::lang::Locale aLocale_fr; - aLocale_fr.Language = ::rtl::OUString::createFromAscii( "fr" ); - aLocale_fr.Country = ::rtl::OUString::createFromAscii( "FR" ); - - int n = 0; - if( n == 0 ) - pLocales[0] = aLocale_en; - else if( n == 1 ) - pLocales[0] = aLocale_de; - else if( n == 2 ) - pLocales[0] = aLocale_fr; - - BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); - LocalizationMgr* pMgr = pIDEShell->GetCurLocalizationMgr(); - if( bAdd ) - pMgr->handleAddLocales( aLocaleSeq ); - else - pMgr->handleRemoveLocales( aLocaleSeq ); -} - -void TEST_simulateDialogAddLocale( void ) -{ - TEST_simulateDialogAddRemoveLocale( true ); -} - -void TEST_simulateDialogRemoveLocale( void ) -{ - TEST_simulateDialogAddRemoveLocale( false ); -} -*/ void LocalizationMgr::handleAddLocales( Sequence< Locale > aLocaleSeq ) { @@ -979,7 +930,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor* void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const String& aLibName, const String& aDlgName, Reference< container::XNameContainer > xDialogModel ) { - static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" ); + static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" )); // Get library Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) ); diff --git a/basctl/source/basicide/makefile.mk b/basctl/source/basicide/makefile.mk index b225b987b24b..8d929adb74ad 100644 --- a/basctl/source/basicide/makefile.mk +++ b/basctl/source/basicide/makefile.mk @@ -47,38 +47,39 @@ CDEFS+=-DBASICDEBUG # --- Allgemein ---------------------------------------------------------- -EXCEPTIONSFILES=$(SLO)$/basicrenderable.obj \ - $(SLO)$/scriptdocument.obj \ - $(SLO)$/basicbox.obj \ - $(SLO)$/basidesh.obj \ - $(SLO)$/basides1.obj \ - $(SLO)$/basides2.obj \ - $(SLO)$/basides3.obj \ +EXCEPTIONSFILES= \ + $(SLO)$/basdoc.obj \ + $(SLO)$/basicbox.obj \ + $(SLO)$/basicrenderable.obj \ $(SLO)$/baside2.obj \ + $(SLO)$/baside2b.obj \ $(SLO)$/baside3.obj \ + $(SLO)$/basidectrlr.obj \ + $(SLO)$/basides1.obj \ + $(SLO)$/basides2.obj \ + $(SLO)$/basides3.obj \ + $(SLO)$/basidesh.obj \ $(SLO)$/basobj2.obj \ $(SLO)$/basobj3.obj \ - $(SLO)$/bastypes.obj \ - $(SLO)$/bastype2.obj \ - $(SLO)$/bastype3.obj \ + $(SLO)$/bastype2.obj \ + $(SLO)$/bastype3.obj \ + $(SLO)$/bastypes.obj \ + $(SLO)$/brkdlg.obj \ + $(SLO)$/doceventnotifier.obj \ + $(SLO)$/docsignature.obj \ + $(SLO)$/documentenumeration.obj \ $(SLO)$/iderdll.obj \ - $(SLO)$/macrodlg.obj \ - $(SLO)$/moduldlg.obj \ - $(SLO)$/moduldl2.obj \ - $(SLO)$/unomodel.obj \ - $(SLO)$/register.obj \ - $(SLO)$/basdoc.obj \ + $(SLO)$/localizationmgr.obj \ + $(SLO)$/macrodlg.obj \ + $(SLO)$/moduldl2.obj \ + $(SLO)$/moduldlg.obj \ + $(SLO)$/objdlg.obj \ + $(SLO)$/register.obj \ + $(SLO)$/scriptdocument.obj \ $(SLO)$/tbxctl.obj \ - $(SLO)$/basidectrlr.obj \ - $(SLO)$/localizationmgr.obj \ - $(SLO)$/doceventnotifier.obj \ - $(SLO)$/docsignature.obj \ - $(SLO)$/documentenumeration.obj - -SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/baside2b.obj \ - $(SLO)$/brkdlg.obj \ - $(SLO)$/objdlg.obj \ + $(SLO)$/unomodel.obj + +SLOFILES = $(EXCEPTIONSFILES) SRS1NAME=$(TARGET) SRC1FILES= basidesh.src macrodlg.src moptions.src moduldlg.src objdlg.src brkdlg.src tbxctl.src basicprint.src diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index b66d6b3510d9..908aca7e0abd 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1582,13 +1582,8 @@ SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, ULONG nPos ) if (bProtected) { Image aImage(IDEResId(RID_IMG_LOCKED)); - aLibBox.SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); - aLibBox.SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); - aImage = Image(IDEResId(RID_IMG_LOCKED_HC)); - aLibBox.SetExpandedEntryBmp(pNewEntry, aImage, - BMP_COLOR_HIGHCONTRAST); - aLibBox.SetCollapsedEntryBmp(pNewEntry, aImage, - BMP_COLOR_HIGHCONTRAST); + aLibBox.SetExpandedEntryBmp(pNewEntry, aImage); + aLibBox.SetCollapsedEntryBmp(pNewEntry, aImage); } // check, if library is link @@ -1692,11 +1687,9 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument, USHORT nMode = pBasicBox->GetMode(); bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ); USHORT nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB; - USHORT nIdHC = bDlgMode ? RID_IMG_DLGLIB_HC : RID_IMG_MODLIB_HC; SvLBoxEntry* pNewLibEntry = pBasicBox->AddEntry( aLibName, Image( IDEResId( nId ) ), - Image( IDEResId( nIdHC ) ), pRootEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_LIBRARY ) ) ); DBG_ASSERT( pNewLibEntry, "InsertEntry fehlgeschlagen!" ); @@ -1706,7 +1699,6 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument, SvLBoxEntry* pEntry_ = pBasicBox->AddEntry( aModName, Image( IDEResId( RID_IMG_MODULE ) ), - Image( IDEResId( RID_IMG_MODULE_HC ) ), pNewLibEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_MODULE ) ) ); DBG_ASSERT( pEntry_, "InsertEntry fehlgeschlagen!" ); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index fcc2858670d1..0b5df85985e6 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -865,7 +865,6 @@ void ObjectPage::NewDialog() pEntry = aBasicBox.AddEntry( aDlgName, Image( IDEResId( RID_IMG_DIALOG ) ), - Image( IDEResId( RID_IMG_DIALOG_HC ) ), pLibEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_DIALOG ) ) ); DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" ); @@ -1039,7 +1038,6 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, pEntry = rBasicBox.AddEntry( aModName, Image( IDEResId( RID_IMG_MODULE ) ), - Image( IDEResId( RID_IMG_MODULE_HC ) ), pSubRootEntry, false, std::auto_ptr< BasicEntry >( new BasicEntry( OBJ_TYPE_MODULE ) ) ); DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" ); diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx index f3998287a2b8..7b4169dcb138 100644 --- a/basctl/source/basicide/objdlg.cxx +++ b/basctl/source/basicide/objdlg.cxx @@ -88,7 +88,7 @@ void ObjectTreeListBox::MouseButtonDown( const MouseEvent& rMEvt ) ObjectCatalog::ObjectCatalog( Window * pParent ) :FloatingWindow( pParent, IDEResId( RID_BASICIDE_OBJCAT ) ) ,aMacroTreeList( this, IDEResId( RID_TLB_MACROS ) ) - ,aToolBox(this, IDEResId(RID_TB_TOOLBOX), IDEResId(RID_IMGLST_TB_HC)) + ,aToolBox(this, IDEResId(RID_TB_TOOLBOX)) ,aMacroDescr( this, IDEResId( RID_FT_MACRODESCR ) ) { FreeResource(); @@ -270,12 +270,9 @@ void ObjectCatalog::SetCurrentEntry( BasicEntryDescriptor& rDesc ) } ObjectCatalogToolBox_Impl::ObjectCatalogToolBox_Impl( - Window * pParent, ResId const & rResId, - ResId const & rImagesHighContrastId): - ToolBox(pParent, rResId), - m_aImagesNormal(GetImageList()), - m_aImagesHighContrast(rImagesHighContrastId), - m_bHighContrast(false) + Window * pParent, ResId const & rResId) + : ToolBox(pParent, rResId) + , m_aImagesNormal(GetImageList()) { setImages(); } @@ -292,12 +289,7 @@ void ObjectCatalogToolBox_Impl::DataChanged(DataChangedEvent const & rDCEvt) void ObjectCatalogToolBox_Impl::setImages() { - bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); - if (bHC != m_bHighContrast) - { - SetImageList(bHC ? m_aImagesHighContrast : m_aImagesNormal); - m_bHighContrast = bHC; - } + SetImageList(m_aImagesNormal); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/objdlg.hrc b/basctl/source/basicide/objdlg.hrc index 930ab31a4ae8..0a3d59ae7176 100644 --- a/basctl/source/basicide/objdlg.hrc +++ b/basctl/source/basicide/objdlg.hrc @@ -31,7 +31,6 @@ #define RID_BASICIDE_OBJCAT ( RID_BASICIDE_START + 70 ) #define RID_FT_MACRODESCR 8 -#define RID_IMGLST_TB_HC 9 #define RID_TLB_MACROS 10 #define RID_TB_TOOLBOX 11 diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx index cd48a135a882..e6e5c20e77da 100644 --- a/basctl/source/basicide/objdlg.hxx +++ b/basctl/source/basicide/objdlg.hxx @@ -54,8 +54,7 @@ public: class ObjectCatalogToolBox_Impl: public ToolBox { public: - ObjectCatalogToolBox_Impl(Window * pParent, ResId const & rResId, - ResId const & rImagesHighContrastId); + ObjectCatalogToolBox_Impl(Window * pParent, ResId const & rResId); private: virtual void DataChanged(DataChangedEvent const & rDCEvt); @@ -63,8 +62,6 @@ private: void setImages(); ImageList m_aImagesNormal; - ImageList m_aImagesHighContrast; - bool m_bHighContrast; }; class ObjectCatalog : public FloatingWindow diff --git a/basctl/source/basicide/objdlg.src b/basctl/source/basicide/objdlg.src index c8de023dec53..8d07733b9319 100644 --- a/basctl/source/basicide/objdlg.src +++ b/basctl/source/basicide/objdlg.src @@ -75,15 +75,6 @@ FloatingWindow RID_BASICIDE_OBJCAT }; }; }; - ImageList RID_IMGLST_TB_HC - { - Prefix = "imh"; - MASKCOLOR - IdList = - { - TBITEM_SHOW ; - }; - }; FixedText RID_FT_MACRODESCR { WordBreak = TRUE ; diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index bc21f4b3f556..069fb87d9b82 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -95,12 +95,9 @@ #include <functional> #include <set> -//........................................................................ + namespace basctl { -//........................................................................ - - /** === begin UNO using === **/ using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; using ::com::sun::star::frame::XModel; @@ -154,13 +151,11 @@ namespace basctl //==================================================================== namespace { - //................................................................ static bool StringCompareLessThan( const String& lhs, const String& rhs ) { return ( lhs.CompareIgnoreCaseToAscii( rhs ) == COMPARE_LESS ); } - //................................................................ class FilterDocuments : public docs::IDocumentDescriptorFilter { public: @@ -175,7 +170,6 @@ namespace basctl bool m_bFilterInvisible; }; - //................................................................ bool FilterDocuments::impl_isDocumentVisible_nothrow( const docs::DocumentDescriptor& _rDocument ) const { try @@ -198,7 +192,6 @@ namespace basctl return false; } - //................................................................ bool FilterDocuments::includeDocument( const docs::DocumentDescriptor& _rDocument ) const { Reference< XEmbeddedScripts > xScripts( _rDocument.xModel, UNO_QUERY ); @@ -209,7 +202,6 @@ namespace basctl return false; } - //................................................................ void lcl_getAllModels_throw( docs::Documents& _out_rModels, bool _bVisibleOnly ) { _out_rModels.clear(); @@ -222,9 +214,6 @@ namespace basctl } } - //==================================================================== - //= ScriptDocument_Impl - declaration - //==================================================================== class ScriptDocument_Impl : public DocumentEventListener { private: @@ -331,7 +320,6 @@ namespace basctl //==================================================================== //= ScriptDocument_Impl - implementation //==================================================================== - //-------------------------------------------------------------------- ScriptDocument_Impl::ScriptDocument_Impl() :m_bIsApplication( true ) ,m_bValid( true ) @@ -339,7 +327,6 @@ namespace basctl { } - //-------------------------------------------------------------------- ScriptDocument_Impl::ScriptDocument_Impl( const Reference< XModel >& _rxDocument ) :m_bIsApplication( false ) ,m_bValid( false ) @@ -353,13 +340,11 @@ namespace basctl } } - //-------------------------------------------------------------------- ScriptDocument_Impl::~ScriptDocument_Impl() { invalidate(); } - //-------------------------------------------------------------------- void ScriptDocument_Impl::invalidate() { m_bIsApplication = false; @@ -374,7 +359,6 @@ namespace basctl m_pDocListener->dispose(); } - //-------------------------------------------------------------------- bool ScriptDocument_Impl::impl_initDocument_nothrow( const Reference< XModel >& _rxModel ) { try @@ -401,7 +385,7 @@ namespace basctl return m_bValid; } - //-------------------------------------------------------------------- + Reference< XLibraryContainer > ScriptDocument_Impl::getLibraryContainer( LibraryContainerType _eType ) const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::getLibraryContainer: invalid!" ); @@ -428,7 +412,6 @@ namespace basctl return xContainer; } - //-------------------------------------------------------------------- bool ScriptDocument_Impl::isReadOnly() const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::isReadOnly: invalid state!" ); @@ -463,7 +446,7 @@ namespace basctl return bResult; } - //-------------------------------------------------------------------- + BasicManager* ScriptDocument_Impl::getBasicManager() const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::getBasicManager: invalid state!" ); @@ -476,7 +459,7 @@ namespace basctl return ::basic::BasicManagerRepository::getDocumentBasicManager( m_xDocument ); } - //-------------------------------------------------------------------- + Reference< XModel > ScriptDocument_Impl::getDocument() const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::getDocument: invalid state!" ); @@ -487,7 +470,7 @@ namespace basctl return m_xDocument; } - //-------------------------------------------------------------------- + Reference< XNameContainer > ScriptDocument_Impl::getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const SAL_THROW((NoSuchElementException)) { @@ -522,7 +505,7 @@ namespace basctl return xContainer; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { bool bHas = false; @@ -538,7 +521,7 @@ namespace basctl return bHas; } - //-------------------------------------------------------------------- + Reference< XNameContainer > ScriptDocument_Impl::getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { Reference< XNameContainer > xLibrary; @@ -560,7 +543,7 @@ namespace basctl return xLibrary; } - //-------------------------------------------------------------------- + void ScriptDocument_Impl::loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary ) { try @@ -575,7 +558,7 @@ namespace basctl } } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::removeModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) { OSL_ENSURE( isValid(), "ScriptDocument_Impl::removeModuleOrDialog: invalid!" ); @@ -598,7 +581,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::hasModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::hasModuleOrDialog: invalid!" ); @@ -618,7 +601,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::getModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, Any& _out_rModuleOrDialog ) { OSL_ENSURE( isValid(), "ScriptDocument_Impl::getModuleOrDialog: invalid!" ); @@ -642,7 +625,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::renameModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel ) { @@ -710,7 +693,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const { _out_rNewModuleCode = ::rtl::OUString(); @@ -737,7 +720,7 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::insertModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, const Any& _rElement ) const { try @@ -756,7 +739,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const { try @@ -774,7 +757,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const { try @@ -810,7 +793,7 @@ namespace basctl return _out_rDialogProvider.is(); } - //-------------------------------------------------------------------- + void ScriptDocument_Impl::setDocumentModified() const { OSL_ENSURE( isValid() && isDocument(), "ScriptDocument_Impl::setDocumentModified: only to be called for real documents!" ); @@ -827,7 +810,7 @@ namespace basctl } } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::isDocumentModified() const { OSL_ENSURE( isValid() && isDocument(), "ScriptDocument_Impl::isDocumentModified: only to be called for real documents!" ); @@ -846,7 +829,7 @@ namespace basctl return bIsModified; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const { Reference< XFrame > xFrame; @@ -885,7 +868,7 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument_Impl::getTitle() const { OSL_PRECOND( isValid() && isDocument(), "ScriptDocument_Impl::getTitle: for documents only!" ); @@ -898,7 +881,7 @@ namespace basctl return sTitle; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument_Impl::getURL() const { OSL_PRECOND( isValid() && isDocument(), "ScriptDocument_Impl::getURL: for documents only!" ); @@ -918,7 +901,7 @@ namespace basctl return sURL; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::allowMacros() const { OSL_ENSURE( isValid() && isDocument(), "ScriptDocument_Impl::allowMacros: for documents only!" ); @@ -937,7 +920,7 @@ namespace basctl return bAllow; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::getCurrentFrame( Reference< XFrame >& _out_rxFrame ) const { _out_rxFrame.clear(); @@ -959,7 +942,7 @@ namespace basctl return _out_rxFrame.is(); } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::isLibraryShared( const ::rtl::OUString& _rLibName, LibraryContainerType _eType ) { bool bIsShared = false; @@ -996,10 +979,10 @@ namespace basctl aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); Reference< XComponentContext > xContext; Reference< XPropertySet > xProps( xMSF, UNO_QUERY_THROW ); - xContext.set( xProps->getPropertyValue( ::rtl::OUString::createFromAscii( "DefaultContext" ) ), UNO_QUERY_THROW ); + xContext.set( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" )) ), UNO_QUERY_THROW ); Reference< XMacroExpander > xMacroExpander( xContext->getValueByName( - ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.util.theMacroExpander" ) ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ), UNO_QUERY_THROW ); aFileURL = xMacroExpander->expandMacros( aDecodedURL ); } @@ -1030,43 +1013,37 @@ namespace basctl return bIsShared; } - //-------------------------------------------------------------------- + void ScriptDocument_Impl::onDocumentCreated( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentOpened( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentSave( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentSaveDone( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentSaveAs( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentSaveAsDone( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentClosed( const ScriptDocument& _rDocument ) { DBG_TESTSOLARMUTEX(); @@ -1080,13 +1057,12 @@ namespace basctl } } - //-------------------------------------------------------------------- + void ScriptDocument_Impl::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentModeChanged( const ScriptDocument& /*_rDocument*/ ) { // not interested in @@ -1095,13 +1071,12 @@ namespace basctl //==================================================================== //= ScriptDocument //==================================================================== - //-------------------------------------------------------------------- ScriptDocument::ScriptDocument() :m_pImpl( new ScriptDocument_Impl() ) { } - //-------------------------------------------------------------------- + ScriptDocument::ScriptDocument( ScriptDocument::SpecialDocument _eType ) :m_pImpl( new ScriptDocument_Impl( Reference< XModel >() ) ) { @@ -1109,7 +1084,7 @@ namespace basctl (void)_eType; } - //-------------------------------------------------------------------- + ScriptDocument::ScriptDocument( const Reference< XModel >& _rxDocument ) :m_pImpl( new ScriptDocument_Impl( _rxDocument ) ) { @@ -1118,25 +1093,25 @@ namespace basctl // purpose, there is a dedicated constructor } - //-------------------------------------------------------------------- + ScriptDocument::ScriptDocument( const ScriptDocument& _rSource ) :m_pImpl( _rSource.m_pImpl ) { } - //-------------------------------------------------------------------- + ScriptDocument::~ScriptDocument() { } - //-------------------------------------------------------------------- + const ScriptDocument& ScriptDocument::getApplicationScriptDocument() { static ScriptDocument s_aApplicationScripts; return s_aApplicationScripts; } - //-------------------------------------------------------------------- + ScriptDocument ScriptDocument::getDocumentForBasicManager( const BasicManager* _pManager ) { if ( _pManager == SFX_APP()->GetBasicManager() ) @@ -1163,7 +1138,7 @@ namespace basctl return ScriptDocument( NoDocument ); } - //-------------------------------------------------------------------- + ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption ) { ScriptDocument aDocument( getApplicationScriptDocument() ); @@ -1191,7 +1166,7 @@ namespace basctl return aDocument; } - //-------------------------------------------------------------------- + namespace { struct DocumentTitleLess : public ::std::binary_function< ScriptDocument, ScriptDocument, bool > @@ -1210,7 +1185,7 @@ namespace basctl }; } - //-------------------------------------------------------------------- + ScriptDocuments ScriptDocument::getAllScriptDocuments( ScriptDocument::ScriptDocumentList _eListType ) { ScriptDocuments aScriptDocs; @@ -1254,62 +1229,62 @@ namespace basctl return aScriptDocs; } - //-------------------------------------------------------------------- + bool ScriptDocument::operator==( const ScriptDocument& _rhs ) const { return m_pImpl->getDocumentRef() == _rhs.m_pImpl->getDocumentRef(); } - //-------------------------------------------------------------------- + sal_Int32 ScriptDocument::hashCode() const { return sal::static_int_cast<sal_Int32>(reinterpret_cast< sal_IntPtr >( m_pImpl->getDocumentRef().get() )); } - //-------------------------------------------------------------------- + bool ScriptDocument::isValid() const { return m_pImpl->isValid(); } - //-------------------------------------------------------------------- + bool ScriptDocument::isAlive() const { return m_pImpl->isAlive(); } - //-------------------------------------------------------------------- + Reference< XLibraryContainer > ScriptDocument::getLibraryContainer( LibraryContainerType _eType ) const { return m_pImpl->getLibraryContainer( _eType ); } - //-------------------------------------------------------------------- + Reference< XNameContainer > ScriptDocument::getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const SAL_THROW((NoSuchElementException)) { return m_pImpl->getLibrary( _eType, _rLibName, _bLoadLibrary ); } - //-------------------------------------------------------------------- + bool ScriptDocument::hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { return m_pImpl->hasLibrary( _eType, _rLibName ); } - //-------------------------------------------------------------------- + Reference< XNameContainer > ScriptDocument::getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { return m_pImpl->getOrCreateLibrary( _eType, _rLibName ); } - //-------------------------------------------------------------------- + void ScriptDocument::loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary ) { m_pImpl->loadLibraryIfExists( _eType, _rLibrary ); } - //-------------------------------------------------------------------- + Sequence< ::rtl::OUString > ScriptDocument::getObjectNames( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { Sequence< ::rtl::OUString > aModuleNames; @@ -1334,7 +1309,7 @@ namespace basctl return aModuleNames; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument::createObjectName( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { ::rtl::OUString aObjectName; @@ -1364,19 +1339,19 @@ namespace basctl return aObjectName; } - //-------------------------------------------------------------------- + Sequence< ::rtl::OUString > ScriptDocument::getLibraryNames() const { return BasicIDE::GetMergedLibraryNames( getLibraryContainer( E_SCRIPTS ), getLibraryContainer( E_DIALOGS ) ); } - //-------------------------------------------------------------------- + bool ScriptDocument::isReadOnly() const { return m_pImpl->isReadOnly(); } - //-------------------------------------------------------------------- + bool ScriptDocument::isApplication() const { return m_pImpl->isApplication(); @@ -1387,19 +1362,19 @@ namespace basctl return m_pImpl->isInVBAMode(); } - //-------------------------------------------------------------------- + BasicManager* ScriptDocument::getBasicManager() const { return m_pImpl->getBasicManager(); } - //-------------------------------------------------------------------- + Reference< XModel > ScriptDocument::getDocument() const { return m_pImpl->getDocument(); } - //-------------------------------------------------------------------- + Reference< XModel > ScriptDocument::getDocumentOrNull() const { if ( isDocument() ) @@ -1407,19 +1382,19 @@ namespace basctl return NULL; } - //-------------------------------------------------------------------- + bool ScriptDocument::removeModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const { return m_pImpl->removeModuleOrDialog( E_SCRIPTS, _rLibName, _rModuleName ); } - //-------------------------------------------------------------------- + bool ScriptDocument::hasModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const { return m_pImpl->hasModuleOrDialog( E_SCRIPTS, _rLibName, _rModuleName ); } - //-------------------------------------------------------------------- + bool ScriptDocument::getModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, ::rtl::OUString& _out_rModuleSource ) const { Any aCode; @@ -1429,13 +1404,13 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + bool ScriptDocument::renameModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName ) const { return m_pImpl->renameModuleOrDialog( E_SCRIPTS, _rLibName, _rOldName, _rNewName, NULL ); } - //-------------------------------------------------------------------- + bool ScriptDocument::createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const { if ( !m_pImpl->createModule( _rLibName, _rModName, _bCreateMain, _out_rNewModuleCode ) ) @@ -1446,31 +1421,31 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + bool ScriptDocument::insertModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const { return m_pImpl->insertModuleOrDialog( E_SCRIPTS, _rLibName, _rModName, makeAny( _rModuleCode ) ); } - //-------------------------------------------------------------------- + bool ScriptDocument::updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const { return m_pImpl->updateModule( _rLibName, _rModName, _rModuleCode ); } - //-------------------------------------------------------------------- + bool ScriptDocument::removeDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const { return m_pImpl->removeModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName ); } - //-------------------------------------------------------------------- + bool ScriptDocument::hasDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const { return m_pImpl->hasModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName ); } - //-------------------------------------------------------------------- + bool ScriptDocument::getDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const { Any aCode; @@ -1480,13 +1455,13 @@ namespace basctl return _out_rDialogProvider.is(); } - //-------------------------------------------------------------------- + bool ScriptDocument::renameDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel ) const { return m_pImpl->renameModuleOrDialog( E_DIALOGS, _rLibName, _rOldName, _rNewName, _rxExistingDialogModel ); } - //-------------------------------------------------------------------- + bool ScriptDocument::createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const { if ( !m_pImpl->createDialog( _rLibName, _rDialogName, _out_rDialogProvider ) ) @@ -1496,31 +1471,31 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + bool ScriptDocument::insertDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, const Reference< XInputStreamProvider >& _rxDialogProvider ) const { return m_pImpl->insertModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName, makeAny( _rxDialogProvider ) ); } - //-------------------------------------------------------------------- + void ScriptDocument::setDocumentModified() const { m_pImpl->setDocumentModified(); } - //-------------------------------------------------------------------- + bool ScriptDocument::isDocumentModified() const { return m_pImpl->isDocumentModified(); } - //-------------------------------------------------------------------- + bool ScriptDocument::saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const { return m_pImpl->saveDocument( _rxStatusIndicator ); } - //-------------------------------------------------------------------- + LibraryLocation ScriptDocument::getLibraryLocation( const ::rtl::OUString& _rLibName ) const { LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN; @@ -1548,7 +1523,7 @@ namespace basctl return eLocation; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument::getTitle( LibraryLocation _eLocation, LibraryType _eType ) const { ::rtl::OUString aTitle; @@ -1589,19 +1564,19 @@ namespace basctl return aTitle; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument::getTitle() const { return m_pImpl->getTitle(); } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument::getURL() const { return m_pImpl->getURL(); } - //-------------------------------------------------------------------- + bool ScriptDocument::isActive() const { bool bIsActive( false ); @@ -1618,14 +1593,12 @@ namespace basctl return bIsActive; } - //-------------------------------------------------------------------- + bool ScriptDocument::allowMacros() const { return m_pImpl->allowMacros(); } -//........................................................................ -} // namespace basctl -//........................................................................ +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx index 3f3968524245..14ad71b2b93a 100644 --- a/basctl/source/basicide/tbxctl.cxx +++ b/basctl/source/basicide/tbxctl.cxx @@ -183,8 +183,8 @@ void TbxControls::StateChanged( USHORT nSID, SfxItemState eState, aSlotURL += rtl::OUString::valueOf( sal_Int32( nTemp )); Image aImage = GetImage( m_xFrame, aSlotURL, - hasBigImages(), - GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() ); + hasBigImages() + ); ToolBox& rBox = GetToolBox(); rBox.SetItemImage(GetId(), aImage); nLastSlot = nLastEnum; diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx index ab61423b9314..76b3057b6409 100644 --- a/basctl/source/basicide/unomodel.cxx +++ b/basctl/source/basicide/unomodel.cxx @@ -97,12 +97,12 @@ OUString SIDEModel::getImplementationName(void) throw( uno::RuntimeException ) ::rtl::OUString SIDEModel::getImplementationName_Static() { - return rtl::OUString::createFromAscii("com.sun.star.comp.basic.BasicIDE"); + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.basic.BasicIDE" )); } sal_Bool SIDEModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) { - return rServiceName == ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE"); + return rServiceName == ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.BasicIDE" )); } uno::Sequence< OUString > SIDEModel::getSupportedServiceNames(void) throw( uno::RuntimeException ) { @@ -113,7 +113,7 @@ uno::Sequence< OUString > SIDEModel::getSupportedServiceNames_Static(void) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE"); + pArray[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.BasicIDE" )); return aRet; } diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 324d7d829153..f4519a7496c4 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -72,12 +72,9 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::io; using ::rtl::OUString; -static ::rtl::OUString aResourceResolverPropName = - ::rtl::OUString::createFromAscii( "ResourceResolver" ); -static ::rtl::OUString aDecorationPropName = - ::rtl::OUString::createFromAscii( "Decoration" ); -static ::rtl::OUString aTitlePropName = - ::rtl::OUString::createFromAscii( "Title" ); +static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" )); +static ::rtl::OUString aDecorationPropName( RTL_CONSTASCII_USTRINGPARAM( "Decoration" )); +static ::rtl::OUString aTitlePropName( RTL_CONSTASCII_USTRINGPARAM( "Title" )); //============================================================================ @@ -86,14 +83,11 @@ static ::rtl::OUString aTitlePropName = TYPEINIT1( DlgEdHint, SfxHint ); -//---------------------------------------------------------------------------- - DlgEdHint::DlgEdHint( DlgEdHintKind eHint ) :eHintKind( eHint ) { } -//---------------------------------------------------------------------------- DlgEdHint::DlgEdHint( DlgEdHintKind eHint, DlgEdObj* pObj ) :eHintKind( eHint ) @@ -101,7 +95,6 @@ DlgEdHint::DlgEdHint( DlgEdHintKind eHint, DlgEdObj* pObj ) { } -//---------------------------------------------------------------------------- DlgEdHint::~DlgEdHint() { @@ -172,7 +165,6 @@ void DlgEditor::ShowDialog() xComponent->dispose(); } -//---------------------------------------------------------------------------- BOOL DlgEditor::UnmarkDialog() { @@ -187,7 +179,6 @@ BOOL DlgEditor::UnmarkDialog() return bWasMarked; } -//---------------------------------------------------------------------------- BOOL DlgEditor::RemarkDialog() { @@ -202,7 +193,6 @@ BOOL DlgEditor::RemarkDialog() return bWasMarked; } -//---------------------------------------------------------------------------- DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ) :pHScroll(NULL) @@ -244,14 +234,14 @@ DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star:: pFunc = new DlgEdFuncSelect( this ); // set clipboard data flavors - m_ClipboardDataFlavors[0].MimeType = ::rtl::OUString::createFromAscii("application/vnd.sun.xml.dialog"); - m_ClipboardDataFlavors[0].HumanPresentableName = ::rtl::OUString::createFromAscii("Dialog 6.0"); - m_ClipboardDataFlavors[0].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 ); + m_ClipboardDataFlavors[0].MimeType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.xml.dialog" )); + m_ClipboardDataFlavors[0].HumanPresentableName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dialog 6.0" )); + m_ClipboardDataFlavors[0].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 ); - m_ClipboardDataFlavorsResource[0] = m_ClipboardDataFlavors[0]; - m_ClipboardDataFlavorsResource[1].MimeType = ::rtl::OUString::createFromAscii("application/vnd.sun.xml.dialogwithresource"); - m_ClipboardDataFlavorsResource[1].HumanPresentableName = ::rtl::OUString::createFromAscii("Dialog 8.0"); - m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 ); + m_ClipboardDataFlavorsResource[0] = m_ClipboardDataFlavors[0]; + m_ClipboardDataFlavorsResource[1].MimeType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.xml.dialogwithresource" )); + m_ClipboardDataFlavorsResource[1].HumanPresentableName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dialog 8.0" )); + m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 ); aPaintTimer.SetTimeout( 1 ); aPaintTimer.SetTimeoutHdl( LINK( this, DlgEditor, PaintTimeout ) ); @@ -260,7 +250,6 @@ DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star:: aMarkTimer.SetTimeoutHdl( LINK( this, DlgEditor, MarkTimeout ) ); } -//---------------------------------------------------------------------------- DlgEditor::~DlgEditor() { @@ -275,7 +264,6 @@ DlgEditor::~DlgEditor() delete pDlgEdModel; } -//---------------------------------------------------------------------------- Reference< awt::XControlContainer > DlgEditor::GetWindowControlContainer() { @@ -284,7 +272,6 @@ Reference< awt::XControlContainer > DlgEditor::GetWindowControlContainer() return m_xControlContainer; } -//---------------------------------------------------------------------------- void DlgEditor::SetWindow( Window* pWindow_ ) { @@ -309,7 +296,6 @@ void DlgEditor::SetWindow( Window* pWindow_ ) ::comphelper::disposeComponent( m_xControlContainer ); } -//---------------------------------------------------------------------------- void DlgEditor::SetScrollBars( ScrollBar* pHS, ScrollBar* pVS ) { @@ -319,7 +305,6 @@ void DlgEditor::SetScrollBars( ScrollBar* pHS, ScrollBar* pVS ) InitScrollBars(); } -//---------------------------------------------------------------------------- void DlgEditor::InitScrollBars() { @@ -345,7 +330,6 @@ void DlgEditor::InitScrollBars() DoScroll( pVScroll ); } -//---------------------------------------------------------------------------- void DlgEditor::DoScroll( ScrollBar* ) { @@ -375,18 +359,15 @@ void DlgEditor::DoScroll( ScrollBar* ) // pWindow->SetBackground(); // #i74769# children should be scrolled - pWindow->Scroll( -nX, -nY, SCROLL_CHILDREN); // SCROLL_NOCHILDREN ); + pWindow->Scroll( -nX, -nY, SCROLL_CHILDREN); aMap.SetOrigin( Point( -aScrollPos.Width(), -aScrollPos.Height() ) ); pWindow->SetMapMode( aMap ); pWindow->Update(); - // pWindow->SetBackground( aOldBackground ); - DlgEdHint aHint( DLGED_HINT_WINDOWSCROLLED ); Broadcast( aHint ); } -//---------------------------------------------------------------------------- void DlgEditor::UpdateScrollBars() { @@ -400,7 +381,6 @@ void DlgEditor::UpdateScrollBars() pVScroll->SetThumbPos( -aOrg.Y() ); } -//---------------------------------------------------------------------------- void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoControlDialogModel ) { @@ -484,8 +464,6 @@ void DlgEditor::ResetDialog( void ) } -//---------------------------------------------------------------------------- - Reference< util::XNumberFormatsSupplier > const & DlgEditor::GetNumberFormatsSupplier() { if ( !m_xSupplier.is() ) @@ -503,7 +481,6 @@ Reference< util::XNumberFormatsSupplier > const & DlgEditor::GetNumberFormatsSup return m_xSupplier; } -//---------------------------------------------------------------------------- void DlgEditor::MouseButtonDown( const MouseEvent& rMEvt ) { @@ -512,7 +489,6 @@ void DlgEditor::MouseButtonDown( const MouseEvent& rMEvt ) pFunc->MouseButtonDown( rMEvt ); } -//---------------------------------------------------------------------------- void DlgEditor::MouseButtonUp( const MouseEvent& rMEvt ) { @@ -522,21 +498,18 @@ void DlgEditor::MouseButtonUp( const MouseEvent& rMEvt ) bCreateOK = bRet; } -//---------------------------------------------------------------------------- void DlgEditor::MouseMove( const MouseEvent& rMEvt ) { pFunc->MouseMove( rMEvt ); } -//---------------------------------------------------------------------------- BOOL DlgEditor::KeyInput( const KeyEvent& rKEvt ) { return pFunc->KeyInput( rKEvt ); } -//---------------------------------------------------------------------------- void DlgEditor::Paint( const Rectangle& rRect ) { @@ -544,7 +517,6 @@ void DlgEditor::Paint( const Rectangle& rRect ) PaintTimeout( &aPaintTimer ); } -//---------------------------------------------------------------------------- IMPL_LINK( DlgEditor, PaintTimeout, Timer *, EMPTYARG ) { @@ -656,7 +628,6 @@ IMPL_LINK( DlgEditor, PaintTimeout, Timer *, EMPTYARG ) return 0; } -//---------------------------------------------------------------------------- IMPL_LINK( DlgEditor, MarkTimeout, Timer *, EMPTYARG ) { @@ -672,7 +643,6 @@ IMPL_LINK( DlgEditor, MarkTimeout, Timer *, EMPTYARG ) return 1; } -//---------------------------------------------------------------------------- void DlgEditor::SetMode( DlgEdMode eNewMode ) { @@ -697,7 +667,6 @@ void DlgEditor::SetMode( DlgEdMode eNewMode ) eMode = eNewMode; } -//---------------------------------------------------------------------------- void DlgEditor::SetInsertObj( USHORT eObj ) { @@ -707,14 +676,12 @@ void DlgEditor::SetInsertObj( USHORT eObj ) pDlgEdView->SetCurrentObj( eActObj, DlgInventor ); } -//---------------------------------------------------------------------------- USHORT DlgEditor::GetInsertObj() const { return eActObj; } -//---------------------------------------------------------------------------- void DlgEditor::CreateDefaultObject() { @@ -743,7 +710,6 @@ void DlgEditor::CreateDefaultObject() } } -//---------------------------------------------------------------------------- void DlgEditor::Cut() { @@ -751,7 +717,6 @@ void DlgEditor::Cut() Delete(); } -//---------------------------------------------------------------------------- void implCopyStreamToByteSequence( Reference< XInputStream > xStream, Sequence< sal_Int8 >& bytes ) @@ -925,7 +890,6 @@ void DlgEditor::Copy() } } -//---------------------------------------------------------------------------- void DlgEditor::Paste() { @@ -1030,7 +994,7 @@ void DlgEditor::Paste() { Reference< lang::XMultiServiceFactory > xSMgr = getProcessServiceFactory(); xStringResourcePersistence = Reference< resource::XStringResourcePersistence >( xSMgr->createInstance - ( ::rtl::OUString::createFromAscii( "com.sun.star.resource.StringResource" ) ), UNO_QUERY ); + ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.resource.StringResource" )) ), UNO_QUERY ); if( xStringResourcePersistence.is() ) xStringResourcePersistence->importBinary( aResData ); } @@ -1090,7 +1054,7 @@ void DlgEditor::Paste() pDlgEdModel->GetPage(0)->InsertObject( pCtrlObj ); pCtrlObj->SetRectFromProps(); pCtrlObj->UpdateStep(); - pDlgEdForm->UpdateTabOrderAndGroups(); // #110559# + pDlgEdForm->UpdateTabOrderAndGroups(); pCtrlObj->StartListening(); // start listening // mark object @@ -1114,7 +1078,6 @@ void DlgEditor::Paste() } } -//---------------------------------------------------------------------------- void DlgEditor::Delete() { @@ -1171,7 +1134,6 @@ void DlgEditor::Delete() RemarkDialog(); } -//---------------------------------------------------------------------------- BOOL DlgEditor::IsPasteAllowed() { @@ -1197,7 +1159,6 @@ BOOL DlgEditor::IsPasteAllowed() return bPaste; } -//---------------------------------------------------------------------------- void DlgEditor::ShowProperties() { @@ -1207,21 +1168,18 @@ void DlgEditor::ShowProperties() pViewFrame->ToggleChildWindow( SID_SHOW_PROPERTYBROWSER ); } -//---------------------------------------------------------------------------- void DlgEditor::UpdatePropertyBrowserDelayed() { aMarkTimer.Start(); } -//---------------------------------------------------------------------------- BOOL DlgEditor::IsModified() const { return pDlgEdModel->IsChanged() || bDialogModelChanged; } -//---------------------------------------------------------------------------- void DlgEditor::ClearModifyFlag() { @@ -1229,7 +1187,6 @@ void DlgEditor::ClearModifyFlag() bDialogModelChanged = FALSE; } -//---------------------------------------------------------------------------- #define LMARGPRN 1700 #define RMARGPRN 900 @@ -1237,7 +1194,6 @@ void DlgEditor::ClearModifyFlag() #define BMARGPRN 1000 #define BORDERPRN 300 -//---------------------------------------------------------------------------- void lcl_PrintHeader( Printer* pPrinter, const String& rTitle ) // not working yet { @@ -1278,7 +1234,6 @@ void lcl_PrintHeader( Printer* pPrinter, const String& rTitle ) // not working y pPrinter->Pop(); } -//---------------------------------------------------------------------------- sal_Int32 DlgEditor::countPages( Printer* ) { @@ -1291,7 +1246,6 @@ void DlgEditor::printPage( sal_Int32 nPage, Printer* pPrinter, const String& rTi Print( pPrinter, rTitle ); } -//---------------------------------------------------------------------------- void DlgEditor::Print( Printer* pPrinter, const String& rTitle ) // not working yet { @@ -1303,9 +1257,6 @@ void DlgEditor::Print( Printer* pPrinter, const String& rTitle ) // not worki MapMode aMap( MAP_100TH_MM ); pPrinter->SetMapMode( aMap ); Font aFont; -#ifdef OS2 - //aFont.SetName( System::GetStandardFont( STDFONT_SWISS ).GetName() ); -#endif aFont.SetAlign( ALIGN_BOTTOM ); aFont.SetSize( Size( 0, 360 )); pPrinter->SetFont( aFont ); @@ -1319,15 +1270,12 @@ void DlgEditor::Print( Printer* pPrinter, const String& rTitle ) // not worki Bitmap aDlg; #ifdef OS2 Bitmap* pDlg = new Bitmap; - //pSbxForm->SnapShot( *pDlg ); SvMemoryStream* pStrm = new SvMemoryStream; *pStrm << *pDlg; delete pDlg; pStrm->Seek(0); *pStrm >> aDlg; delete pStrm; -#else - //pSbxForm->SnapShot( aDlg ); #endif Size aBmpSz( pPrinter->PixelToLogic( aDlg.GetSizePixel() ) ); double nPaperSzWidth = aPaperSz.Width(); @@ -1363,7 +1311,6 @@ void DlgEditor::Print( Printer* pPrinter, const String& rTitle ) // not worki } } -//---------------------------------------------------------------------------- bool DlgEditor::AdjustPageSize() { @@ -1420,6 +1367,4 @@ bool DlgEditor::AdjustPageSize() return bAdjustedPageSize; } -//---------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index 27bae6fbb8c7..9659dda143ed 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -40,21 +40,18 @@ using namespace ::com::sun::star; -//---------------------------------------------------------------------------- DlgEdFactory::DlgEdFactory() { SdrObjFactory::InsertMakeObjectHdl( LINK(this, DlgEdFactory, MakeObject) ); } -//---------------------------------------------------------------------------- DlgEdFactory::~DlgEdFactory() { SdrObjFactory::RemoveMakeObjectHdl( LINK(this, DlgEdFactory, MakeObject) ); } -//---------------------------------------------------------------------------- IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) { @@ -80,20 +77,20 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) switch( pObjFactory->nIdentifier ) { case OBJ_DLG_PUSHBUTTON: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlButtonModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlButtonModel" )) , xDialogSFact ); break; case OBJ_DLG_RADIOBUTTON: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlRadioButtonModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlRadioButtonModel" )) , xDialogSFact ); break; case OBJ_DLG_CHECKBOX: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlCheckBoxModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlCheckBoxModel" )) , xDialogSFact ); break; case OBJ_DLG_LISTBOX: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlListBoxModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlListBoxModel" )) , xDialogSFact ); break; case OBJ_DLG_COMBOBOX: { - DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlComboBoxModel") , xDialogSFact ); + DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlComboBoxModel" )) , xDialogSFact ); pObjFactory->pNewObj = pNew; try { @@ -109,26 +106,26 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) } } break; case OBJ_DLG_GROUPBOX: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlGroupBoxModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlGroupBoxModel" )) , xDialogSFact ); break; case OBJ_DLG_EDIT: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlEditModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlEditModel" )) , xDialogSFact ); break; case OBJ_DLG_FIXEDTEXT: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFixedTextModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedTextModel" )) , xDialogSFact ); break; case OBJ_DLG_IMAGECONTROL: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlImageControlModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlImageControlModel" )) , xDialogSFact ); break; case OBJ_DLG_PROGRESSBAR: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlProgressBarModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlProgressBarModel" )) , xDialogSFact ); break; case OBJ_DLG_HSCROLLBAR: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlScrollBarModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlScrollBarModel" )) , xDialogSFact ); break; case OBJ_DLG_VSCROLLBAR: { - DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlScrollBarModel") , xDialogSFact ); + DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlScrollBarModel" )) , xDialogSFact ); pObjFactory->pNewObj = pNew; // set vertical orientation try @@ -146,11 +143,11 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) } } break; case OBJ_DLG_HFIXEDLINE: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFixedLineModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" )) , xDialogSFact ); break; case OBJ_DLG_VFIXEDLINE: { - DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFixedLineModel") , xDialogSFact ); + DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" )) , xDialogSFact ); pObjFactory->pNewObj = pNew; // set vertical orientation try @@ -168,96 +165,29 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) } } break; case OBJ_DLG_DATEFIELD: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlDateFieldModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDateFieldModel" )) , xDialogSFact ); break; case OBJ_DLG_TIMEFIELD: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlTimeFieldModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlTimeFieldModel" )) , xDialogSFact ); break; case OBJ_DLG_NUMERICFIELD: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlNumericFieldModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlNumericFieldModel" )) , xDialogSFact ); break; case OBJ_DLG_CURRENCYFIELD: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlCurrencyFieldModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlCurrencyFieldModel" )) , xDialogSFact ); break; case OBJ_DLG_FORMATTEDFIELD: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFormattedFieldModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFormattedFieldModel" )) , xDialogSFact ); break; case OBJ_DLG_PATTERNFIELD: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlPatternFieldModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlPatternFieldModel" )) , xDialogSFact ); break; case OBJ_DLG_FILECONTROL: - pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFileControlModel") , xDialogSFact ); + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFileControlModel" )) , xDialogSFact ); break; case OBJ_DLG_TREECONTROL: - DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.tree.TreeControlModel") , xDialogSFact ); + DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.tree.TreeControlModel" )) , xDialogSFact ); pObjFactory->pNewObj = pNew; - /* - try - { - uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY); - if (xPSet.is()) - { - // first create a data model for our tree control - Reference< XComponentContext > xComponentContext; - - Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY ); - xPropSet->getPropertyValue( OUString::createFromAscii("DefaultContext") ) >>= xComponentContext; - - // gets the service manager from the office - Reference< XMultiComponentFactory > xMultiComponentFactoryServer( xComponentContext->getServiceManager() ); - - - // gets the TreeDataModel - Reference< XMutableTreeDataModel > xTreeDataModel; - - xTreeDataModel = Reference< XMutableTreeDataModel >( - xMultiComponentFactoryServer->createInstanceWithContext( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.tree.MutableTreeDataModel" ) ), xComponentContext ), UNO_QUERY_THROW ); - - // now fill it with some sample data - const OUString sRoot( RTL_CONSTASCII_USTRINGPARAM( "Root" ) ); - - Reference< XMutableTreeNode > xNode( mxTreeDataModel->createNode( sRoot, false ), UNO_QUERY_THROW ); - xNode->setDataValue( sRoot ); - xNode->setExpandedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_down.png" ) ) ); - xNode->setCollapsedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_right.png" ) ) ); - - const OUString sNode_1( RTL_CONSTASCII_USTRINGPARAM( "Node_1" ) ); - - Reference< XMutableTreeNode > xChildNode_1( mxTreeDataModel->createNode( sNode_1, true ), UNO_QUERY_THROW ); - xChildNode_1->setDataValue( sNode_1 ); - xChildNode_1->setExpandedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_down.png" ) ) ); - xChildNode_1->setCollapsedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_right.png" ) ) ); - - xNode->appendChild( xChildNode_1 ); - - const OUString sNode_1_1( RTL_CONSTASCII_USTRINGPARAM( "Node_1_1" ) ); - - Reference< XMutableTreeNode > xChildNode_1_1( mxTreeDataModel->createNode( sNode_1_1, false ), UNO_QUERY_THROW ); - xChildNode_1_1->setDataValue( sNode_1_1 ); - xChildNode_1_1->setExpandedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_down.png" ) ) ); - xChildNode_1_1->setCollapsedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_right.png" ) ) ); - - xChildNode_1->appendChild( xChildNode_1_1 ); - - const OUString sNode_1_1( RTL_CONSTASCII_USTRINGPARAM( "Node_2" ) ); - - Reference< XMutableTreeNode > xChildNode_2( mxTreeDataModel->createNode( sNode_2, false ), UNO_QUERY_THROW ); - xChildNode_2->setDataValue( sNode_2 ); - xChildNode_2->setNodeGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM("private:graphicrepository/sw/imglst/nc20010.png") ) ); - xNode->appendChild( xChildNode_2 ); - - xTreeDataModel->setRoot( xNode ); - - - const OUString sDataModel( RTL_CONSTASCII_USTRINGPARAM( "DataModel" ) ); - - xPSet->setPropertyValue( sDataModel, xTreeDataModel ); - } - } - catch(...) - { - }*/ break; } } @@ -265,6 +195,4 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) return 0; } -//---------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/dlged/makefile.mk b/basctl/source/dlged/makefile.mk index 1b765ad91ae4..68a21a22a5bf 100644 --- a/basctl/source/dlged/makefile.mk +++ b/basctl/source/dlged/makefile.mk @@ -39,19 +39,20 @@ VISIBILITY_HIDDEN=TRUE # --- Files -------------------------------------------------------- -EXCEPTIONSFILES=$(SLO)$/dlged.obj \ - $(SLO)$/dlgedobj.obj \ +EXCEPTIONSFILES= \ + $(SLO)$/dlged.obj \ + $(SLO)$/dlgedclip.obj \ $(SLO)$/dlgedfac.obj \ + $(SLO)$/dlgedfunc.obj \ $(SLO)$/dlgedlist.obj \ - $(SLO)$/dlgedclip.obj \ + $(SLO)$/dlgedmod.obj \ + $(SLO)$/dlgedobj.obj \ + $(SLO)$/dlgedpage.obj \ + $(SLO)$/dlgedview.obj \ + $(SLO)$/managelang.obj \ $(SLO)$/propbrw.obj -SLOFILES= $(EXCEPTIONSFILES) \ - $(SLO)$/dlgedfunc.obj \ - $(SLO)$/dlgedmod.obj \ - $(SLO)$/dlgedpage.obj \ - $(SLO)$/dlgedview.obj \ - $(SLO)$/managelang.obj +SLOFILES= $(EXCEPTIONSFILES) SRS1NAME=$(TARGET) SRC1FILES= dlgresid.src \ diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index d210482a8ef5..080fca450279 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -75,13 +75,9 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::comphelper; -//============================================================================ -// PropBrwMgr -//============================================================================ SFX_IMPL_FLOATINGWINDOW(PropBrwMgr, SID_SHOW_PROPERTYBROWSER) -//---------------------------------------------------------------------------- PropBrwMgr::PropBrwMgr( Window* _pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo) @@ -103,7 +99,7 @@ PropBrwMgr::PropBrwMgr( Window* _pParent, sal_uInt16 nId, ((PropBrw*)pWindow)->Update( pShell ); } -//---------------------------------------------------------------------------- + void PropBrw::Update( const SfxViewShell* _pShell ) { const BasicIDEShell* pBasicIDEShell = dynamic_cast< const BasicIDEShell* >( _pShell ); @@ -122,7 +118,6 @@ void PropBrw::Update( const SfxViewShell* _pShell ) } } -//---------------------------------------------------------------------------- const long STD_WIN_SIZE_X = 300; const long STD_WIN_SIZE_Y = 350; @@ -136,15 +131,9 @@ const long WIN_BORDER = 2; const long MIN_WIN_SIZE_X = 50; const long MIN_WIN_SIZE_Y = 50; -//---------------------------------------------------------------------------- - -//============================================================================ -// PropBrw -//============================================================================ DBG_NAME(PropBrw) -//---------------------------------------------------------------------------- PropBrw::PropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBindings* _pBindings, PropBrwMgr* _pMgr, Window* _pParent, const Reference< XModel >& _rxContextDocument ) @@ -163,11 +152,11 @@ PropBrw::PropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBindings* _ try { // create a frame wrapper for myself - m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Frame")), UNO_QUERY); + m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Frame" ))), UNO_QUERY); if (m_xMeAsFrame.is()) { m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) ); - m_xMeAsFrame->setName(::rtl::OUString::createFromAscii("form property browser")); // change name! + m_xMeAsFrame->setName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "form property browser" ))); // change name! } } catch (Exception&) @@ -179,7 +168,6 @@ PropBrw::PropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBindings* _ ImplReCreateController(); } -//---------------------------------------------------------------------------- void PropBrw::ImplReCreateController() { @@ -208,7 +196,7 @@ void PropBrw::ImplReCreateController() // create a property browser controller Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_QUERY_THROW ); - static const ::rtl::OUString s_sControllerServiceName = ::rtl::OUString::createFromAscii("com.sun.star.awt.PropertyBrowserController"); + static const ::rtl::OUString s_sControllerServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.PropertyBrowserController" )); m_xBrowserController = Reference< XPropertySet >( xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY ); @@ -265,7 +253,6 @@ void PropBrw::ImplReCreateController() Resize(); } -//---------------------------------------------------------------------------- PropBrw::~PropBrw() { @@ -275,7 +262,6 @@ PropBrw::~PropBrw() DBG_DTOR(PropBrw,NULL); } -//---------------------------------------------------------------------------- void PropBrw::ImplDestroyController() { @@ -300,7 +286,6 @@ void PropBrw::ImplDestroyController() m_xBrowserController.clear(); } -//---------------------------------------------------------------------------- sal_Bool PropBrw::Close() { @@ -314,7 +299,7 @@ sal_Bool PropBrw::Close() return bClose; } -//---------------------------------------------------------------------------- + Sequence< Reference< XInterface > > PropBrw::CreateMultiSelectionSequence( const SdrMarkList& _rMarkList ) { @@ -359,7 +344,7 @@ Sequence< Reference< XInterface > > return aSeq; } -//---------------------------------------------------------------------------- + void PropBrw::implSetNewObjectSequence ( const Sequence< Reference< XInterface > >& _rObjectSeq ) { @@ -374,14 +359,13 @@ void PropBrw::implSetNewObjectSequence } } -//---------------------------------------------------------------------------- void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject ) { if ( m_xBrowserController.is() ) { m_xBrowserController->setPropertyValue( - ::rtl::OUString::createFromAscii( "IntrospectedObject" ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IntrospectedObject" )), makeAny( _rxObject ) ); @@ -390,7 +374,6 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject ) } } -//---------------------------------------------------------------------------- ::rtl::OUString PropBrw::GetHeadlineName( const Reference< XPropertySet >& _rxObject ) { @@ -510,14 +493,12 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject ) return aName; } -//---------------------------------------------------------------------------- void PropBrw::FillInfo( SfxChildWinInfo& rInfo ) const { rInfo.bVisible = sal_False; } -//---------------------------------------------------------------------------- void PropBrw::Resize() { @@ -536,7 +517,6 @@ void PropBrw::Resize() } } -//---------------------------------------------------------------------------- void PropBrw::ImplUpdate( const Reference< XModel >& _rxContextDocument, SdrView* pNewView ) { @@ -619,6 +599,4 @@ void PropBrw::ImplUpdate( const Reference< XModel >& _rxContextDocument, SdrView } } -//---------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |