diff options
127 files changed, 896 insertions, 558 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx index cd3e1dd0061f..34f9e5096fb1 100644 --- a/basic/source/app/app.cxx +++ b/basic/source/app/app.cxx @@ -857,6 +857,15 @@ void BasicFrame::Resize() } } +Rectangle BasicFrame::GetInnerRect() const +{ + Rectangle aRect( Point(0,0), GetOutputSizePixel() ); + aRect.Bottom() = pStatus->GetPosPixel().Y()-1; + if( aRect.Bottom() < 0 ) // sanity check + aRect.Bottom() = 0; + return aRect; +} + void BasicFrame::Move() { Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); diff --git a/basic/source/app/app.hxx b/basic/source/app/app.hxx index 5a501ec5efcf..47dd5056fb58 100644 --- a/basic/source/app/app.hxx +++ b/basic/source/app/app.hxx @@ -188,6 +188,7 @@ public: void SetAppMode( const String &aNewMode ){ aAppMode = aNewMode; UpdateTitle(); } String GenRealString( const String &aResString ); + Rectangle GetInnerRect() const; }; diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx index 4d0a5f95fca4..eb80a96f4183 100644 --- a/basic/source/app/appwin.cxx +++ b/basic/source/app/appwin.cxx @@ -121,14 +121,8 @@ void AppWin::Maximize() pFrame->nMaximizedWindows++; nWinState = TT_WIN_STATE_MAX; } - sal_Int32 nTitleHeight; - { - sal_Int32 nDummy1, nDummy2, nDummy3; - pFrame->GetBorder( nDummy1, nTitleHeight, nDummy2, nDummy3 ); - } - Size aSize = pFrame->GetOutputSizePixel(); - aSize.Height() -= nTitleHeight; + Size aSize = pFrame->GetInnerRect().GetSize(); aSize.Height() -= 2; aSize.Width() -= 2; SetSizePixel( aSize ); diff --git a/basic/source/runtime/dllmgr.cxx b/basic/source/runtime/dllmgr.cxx index 8cc6ce7edd82..8baf819372ba 100644 --- a/basic/source/runtime/dllmgr.cxx +++ b/basic/source/runtime/dllmgr.cxx @@ -36,6 +36,7 @@ #include "basic/sbx.hxx" #include "basic/sbxvar.hxx" +#include "runtime.hxx" #include "osl/thread.h" #include "rtl/ref.hxx" #include "rtl/string.hxx" @@ -266,9 +267,15 @@ SbError marshal( std::vector< char > & blob, std::size_t offset, MarshalData & data) { OSL_ASSERT(variable != 0); - if ((variable->GetFlags() & SBX_REFERENCE) == 0) { - if ((variable->GetType() & SbxARRAY) == 0) { - switch (variable->GetType()) { + + SbxDataType eVarType = variable->GetType(); + bool bByVal = (variable->GetFlags() & SBX_REFERENCE) == 0; + if( !bByVal && !SbiRuntime::isVBAEnabled() && eVarType == SbxSTRING ) + bByVal = true; + + if (bByVal) { + if ((eVarType & SbxARRAY) == 0) { + switch (eVarType) { case SbxINTEGER: add(blob, variable->GetInteger(), outer ? 4 : 2, offset); break; @@ -317,8 +324,8 @@ SbError marshal( } } } else { - if ((variable->GetType() & SbxARRAY) == 0) { - switch (variable->GetType()) { + if ((eVarType & SbxARRAY) == 0) { + switch (eVarType) { case SbxINTEGER: case SbxLONG: case SbxSINGLE: diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 02b22a35b732..bbb3668b5b69 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -521,7 +521,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) pPar->Put( NULL, 0 ); } // Index-Access bei UnoObjekten beruecksichtigen - else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || !pElem->IsBroadcaster()) ) + else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || (bVBAEnabled && !pElem->IsBroadcaster()) ) ) { pPar = pElem->GetParameters(); if ( pPar ) diff --git a/desktop/os2/source/applauncher/makefile.mk b/desktop/os2/source/applauncher/makefile.mk index bf71b57c2fdf..7eec8aee9c23 100644 --- a/desktop/os2/source/applauncher/makefile.mk +++ b/desktop/os2/source/applauncher/makefile.mk @@ -47,7 +47,7 @@ OBJFILES= \ $(OBJ)$/sbase.obj \ $(OBJ)$/smath.obj \ $(OBJ)$/officeloader.obj \ - $(OBJ)$/quickstart.obj + $(OBJ)$/os2quickstart.obj APP1TARGET=swriter APP1NOSAL=TRUE @@ -106,13 +106,13 @@ APP7OBJS = \ $(OBJ)$/launcher.obj\ $(OBJ)$/officeloader.obj -APP8TARGET=quickstart +APP8TARGET=os2quickstart APP8NOSAL=TRUE APP8LINKRES=$(MISC)$/$(TARGET)8.res APP8ICON=$(SOLARRESDIR)$/icons$/ooo-main-app.ico APP8OBJS = \ $(OBJ)$/launcher.obj\ - $(OBJ)$/quickstart.obj + $(OBJ)$/os2quickstart.obj # --- Targets ------------------------------------------------------ diff --git a/desktop/os2/source/applauncher/quickstart.cxx b/desktop/os2/source/applauncher/os2quickstart.cxx index 63585434bb50..63585434bb50 100644 --- a/desktop/os2/source/applauncher/quickstart.cxx +++ b/desktop/os2/source/applauncher/os2quickstart.cxx diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index fc782c35a71b..f1dee0761ccd 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -17,6 +17,9 @@ dt desktop\win32\source\guistdio nmake - w dt_guistdio dt_inc N dt desktop\win32\source\applauncher nmake - w dt_applauncher dt_inc NULL dt desktop\win32\source\applauncher\ooo nmake - w dt_applauncher_ooo dt_applauncher.w dt_inc NULL dt desktop\win32\source\rebase nmake - w dt_rebase dt_inc NULL +dt desktop\win32\source\QuickStart nmake - w dt_win32_quickstart NULL +dt desktop\win32\source\QuickStart\so nmake - w dt_win32_quickstart_so dt_win32_quickstart.w NULL + dt desktop\os2\source\applauncher nmake - p dt_applauncher dt_inc NULL dt desktop\unx\source\officeloader nmake - u dt_officeloader_unx dt_inc NULL dt desktop\source\pagein nmake - u dt_pagein dt_inc NULL @@ -35,7 +38,7 @@ dt desktop\source\deployment\registry\configuration nmake - all dt_dp_registry_c dt desktop\source\deployment\registry\help nmake - all dt_dp_registry_help dt_inc NULL dt desktop\source\deployment\registry\executable nmake - all dt_dp_registry_executable dt_inc NULL dt desktop\scripts nmake - u dt_scripts dt_inc NULL -dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_so_comp dt_spl dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w NULL +dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_so_comp dt_spl dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w dt_win32_quickstart_so.w NULL dt desktop\zipintro nmake - all dt_zipintro NULL dt desktop\registry\data\org\openoffice\Office nmake - all sn_regconfig NULL dt desktop\source\registration\com\sun\star\servicetag\resources get - all sn_svctagres NULL diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst index b6e14a5ce722..be7b77388763 100644 --- a/desktop/prj/d.lst +++ b/desktop/prj/d.lst @@ -31,7 +31,7 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms ..\%__SRC%\bin\swriter.exe %_DEST%\bin%_EXT%\swriter.exe ..\%__SRC%\bin\sbase.exe %_DEST%\bin%_EXT%\sbase.exe ..\%__SRC%\bin\sweb.exe %_DEST%\bin%_EXT%\sweb.exe -..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe +..\%__SRC%\bin\os2quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe ..\%__SRC%\bin\so\scalc.exe %_DEST%\bin%_EXT%\so\scalc.exe ..\%__SRC%\bin\so\sdraw.exe %_DEST%\bin%_EXT%\so\sdraw.exe ..\%__SRC%\bin\so\simpress.exe %_DEST%\bin%_EXT%\so\simpress.exe @@ -40,6 +40,11 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms ..\%__SRC%\bin\so\sbase.exe %_DEST%\bin%_EXT%\so\sbase.exe ..\%__SRC%\bin\so\sweb.exe %_DEST%\bin%_EXT%\so\sweb.exe +..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe +..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\install_quickstart.exe +..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\quickstart.exe +..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\install_quickstart.exe + ..\%__SRC%\misc\soffice.exe.manifest %_DEST%\bin%_EXT%\soffice.exe.manifest ..\%__SRC%\misc\soffice.bin.manifest %_DEST%\bin%_EXT%\soffice.bin.manifest ..\%__SRC%\bin\wrp*.dll %_DEST%\bin%_EXT%\wrp*.dll diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index a2f602082fe4..3b5ed1916f9b 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1215,7 +1215,7 @@ void Desktop::retrieveCrashReporterState() { static const ::rtl::OUString CFG_PACKAGE_RECOVERY = ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery/"); static const ::rtl::OUString CFG_PATH_CRASHREPORTER = ::rtl::OUString::createFromAscii("CrashReporter" ); - static const ::rtl::OUString CFG_ENTRY_ENABLED = ::rtl::OUString::createFromAscii("Enabled" ); + static const ::rtl::OUString CFG_ENTRY_ENABLED = ::rtl::OUString::createFromAscii("Enabled" ); css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); @@ -1627,7 +1627,8 @@ void Desktop::Main() // there is no other instance using our data files from a remote host RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" ); m_pLockfile = new Lockfile; - if ( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) { + if ( !pCmdLineArgs->IsHeadless() && !pCmdLineArgs->IsInvisible() && + !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) { // Lockfile exists, and user clicked 'no' return; } @@ -1802,7 +1803,7 @@ void Desktop::Main() if ( !pExecGlobals->bRestartRequested ) { - if ((!pCmdLineArgs->WantsToLoadDocument() ) && + if ((!pCmdLineArgs->WantsToLoadDocument() && !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsHeadless() ) && (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) && (!bExistsRecoveryData ) && (!bExistsSessionData ) && @@ -2116,9 +2117,9 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r // unfortunately this broke the QUARTZ behavior which is to always run // in quickstart mode since Mac applications do not usually quit // when the last document closes - //#ifndef QUARTZ + #ifndef QUARTZ if ( bQuickstart ) - //#endif + #endif { Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments( DEFINE_CONST_UNICODE( "com.sun.star.office.Quickstart" ), aSeq ), @@ -3203,6 +3204,7 @@ void Desktop::OpenSplashScreen() sal_Bool bVisible = sal_False; // Show intro only if this is normal start (e.g. no server, no quickstart, no printing ) if ( !pCmdLine->IsInvisible() && + !pCmdLine->IsHeadless() && !pCmdLine->IsQuickstart() && !pCmdLine->IsMinimized() && !pCmdLine->IsNoLogo() && diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 8bd8a6191201..a8a1025959f1 100755..100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -165,7 +165,7 @@ public: m_bWarnUser( false ) {} - Dialog * activeDialog() { return m_pDialogHelper->getWindow(); } + Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : NULL; } void setTitle( const OUString& rNewTitle ) { m_sTitle = rNewTitle; } void startProgress(); diff --git a/desktop/util/ooverinfo.rc b/desktop/util/ooverinfo.rc index 6d92e2a99500..3ddff6b66b02 100644 --- a/desktop/util/ooverinfo.rc +++ b/desktop/util/ooverinfo.rc @@ -112,7 +112,7 @@ VS_VERSION_INFO versioninfo 15 ICON "icons\\oasis-formula.ico" 16 ICON "icons\\oasis-web-template.ico" 17 ICON "icons\\empty-document.ico" -18 ICON "icons\\ooo-configuration.ico" +18 ICON "icons\\empty-document.ico" 19 ICON "icons\\ooo3_open.ico" 20 ICON "icons\\empty-document.ico" 21 ICON "icons\\ooo3_writer_app.ico" diff --git a/desktop/util/ooverinfo2.rc b/desktop/util/ooverinfo2.rc index 17af6818551e..caacb294122d 100755..100644 --- a/desktop/util/ooverinfo2.rc +++ b/desktop/util/ooverinfo2.rc @@ -50,7 +50,7 @@ ICON 14 "icons/oasis-database.ico" ICON 15 "icons/oasis-formula.ico" ICON 16 "icons/oasis-web-template.ico" ICON 17 "icons/empty-document.ico" -ICON 18 "icons/ooo-configuration.ico" +ICON 18 "icons/empty-document.ico" ICON 19 "icons/ooo-open.ico" ICON 20 "icons/empty-document.ico" ICON 21 "icons/ooo-writer-app.ico" diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc index 7d589956ec83..5a2b03769963 100755..100644 --- a/desktop/util/verinfo.rc +++ b/desktop/util/verinfo.rc @@ -117,8 +117,8 @@ VS_VERSION_INFO versioninfo 15 ICON "icons\\oasis-formula.ico" 16 ICON "icons\\oasis-web-template.ico" 17 ICON "icons\\empty-document.ico" -18 ICON "icons\\so8-configuration.ico" -19 ICON "icons\\so9_open.ico" +18 ICON "icons\\empty-document.ico" +19 ICON "icons\\so9_main_app.ico" 20 ICON "icons\\empty-document.ico" 21 ICON "icons\\so9_writer_app.ico" 22 ICON "icons\\so9_calc_app.ico" diff --git a/sysui/source/win32/QuickStart/OOQuickStart.rc b/desktop/win32/source/QuickStart/OOQuickStart.rc index 0dc4dab256b6..9baf7e864f5f 100644 --- a/sysui/source/win32/QuickStart/OOQuickStart.rc +++ b/desktop/win32/source/QuickStart/OOQuickStart.rc @@ -31,10 +31,10 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -ICON_ACTIVE ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico" -IDI_QUICKSTART ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico" -IDI_SMALL ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico" -ICON_INACTIVE ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico" +ICON_ACTIVE ICON DISCARDABLE "icons/ooo3_main_app.ico" +IDI_QUICKSTART ICON DISCARDABLE "icons/ooo3_main_app.ico" +IDI_SMALL ICON DISCARDABLE "icons/ooo3_main_app.ico" +ICON_INACTIVE ICON DISCARDABLE "icons/ooo3_main_app.ico" ///////////////////////////////////////////////////////////////////////////// diff --git a/sysui/source/win32/QuickStart/QuickStart.cpp b/desktop/win32/source/QuickStart/QuickStart.cpp index 3467e35524f8..3467e35524f8 100644 --- a/sysui/source/win32/QuickStart/QuickStart.cpp +++ b/desktop/win32/source/QuickStart/QuickStart.cpp diff --git a/sysui/source/win32/QuickStart/QuickStart.h b/desktop/win32/source/QuickStart/QuickStart.h index d0afd98ec430..d0afd98ec430 100644 --- a/sysui/source/win32/QuickStart/QuickStart.h +++ b/desktop/win32/source/QuickStart/QuickStart.h diff --git a/sysui/source/win32/QuickStart/StdAfx.h b/desktop/win32/source/QuickStart/StdAfx.h index a4bdd66f630c..a4bdd66f630c 100644 --- a/sysui/source/win32/QuickStart/StdAfx.h +++ b/desktop/win32/source/QuickStart/StdAfx.h diff --git a/sysui/source/win32/QuickStart/makefile.mk b/desktop/win32/source/QuickStart/makefile.mk index 41242d849dfb..41242d849dfb 100644 --- a/sysui/source/win32/QuickStart/makefile.mk +++ b/desktop/win32/source/QuickStart/makefile.mk diff --git a/sysui/source/win32/QuickStart/resource.h b/desktop/win32/source/QuickStart/resource.h index d34beb00c5c9..d34beb00c5c9 100644 --- a/sysui/source/win32/QuickStart/resource.h +++ b/desktop/win32/source/QuickStart/resource.h diff --git a/sysui/source/win32/QuickStart/so/QuickStart.rc b/desktop/win32/source/QuickStart/so/QuickStart.rc index c48dc2358d0d..732904dc745a 100644 --- a/sysui/source/win32/QuickStart/so/QuickStart.rc +++ b/desktop/win32/source/QuickStart/so/QuickStart.rc @@ -31,10 +31,10 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -ICON_ACTIVE ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico" -IDI_QUICKSTART ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico" -IDI_SMALL ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico" -ICON_INACTIVE ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico" +ICON_ACTIVE ICON DISCARDABLE "icons/so9_main_app.ico" +IDI_QUICKSTART ICON DISCARDABLE "icons/so9_main_app.ico" +IDI_SMALL ICON DISCARDABLE "icons/so9_main_app.ico" +ICON_INACTIVE ICON DISCARDABLE "icons/so9_main_app.ico" ///////////////////////////////////////////////////////////////////////////// diff --git a/sysui/source/win32/QuickStart/so/makefile.mk b/desktop/win32/source/QuickStart/so/makefile.mk index 6c7897232576..50154c7d50b2 100644 --- a/sysui/source/win32/QuickStart/so/makefile.mk +++ b/desktop/win32/source/QuickStart/so/makefile.mk @@ -41,6 +41,8 @@ UWINAPILIB = # --- Resources ---------------------------------------------------- +.IF "$(LINK_SO)"=="TRUE" + RCFILES=QuickStart.rc INCPRE=.. @@ -68,6 +70,8 @@ APP1STDLIBS+=$(SHELL32LIB)\ APP1NOSVRES=$(RES)$/$(TARGET).res +.ENDIF # "$(LINK_SO)"=="TRUE" + # --- Targets ------------------------------------------------------ .INCLUDE : target.mk diff --git a/desktop/win32/source/applauncher/makefile.mk b/desktop/win32/source/applauncher/makefile.mk index f0f5743f38a1..d08309bbed24 100644 --- a/desktop/win32/source/applauncher/makefile.mk +++ b/desktop/win32/source/applauncher/makefile.mk @@ -53,6 +53,7 @@ OBJFILES= \ $(OBJ)$/sweb.obj # SO launcher +.IF "$(LINK_SO)"=="TRUE" .IF "$(BUILD_SPECIAL)"!="" APP1DEPN= $(APP1RES) verinfo.rc APP1TARGET=so$/swriter @@ -139,7 +140,8 @@ APP7VERINFO=verinfo.rc APP7PRODUCTDEF+=-DRES_APP_NAME=sweb -.ENDIF # "$(BUILD_SPECIAL)"!="" +.ENDIF # "$(BUILD_SPECIAL)"!="" +.ENDIF # "$(LINK_SO)"=="TRUE" # --- Targets ------------------------------------------------------ diff --git a/desktop/win32/source/guiloader/makefile.mk b/desktop/win32/source/guiloader/makefile.mk index 5bb1c523ff19..7912471fba13 100644 --- a/desktop/win32/source/guiloader/makefile.mk +++ b/desktop/win32/source/guiloader/makefile.mk @@ -48,14 +48,16 @@ APP1OBJS=\ $(SOLARLIBDIR)$/pathutils-obj.obj STDLIB1=$(SHLWAPILIB) +.IF "$(LINK_SO)"=="TRUE" APP2TARGET=so$/guiloader APP2NOSAL=TRUE -APP2ICON=$(SOLARRESDIR)$/icons/so8-main-app.ico +APP2ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico APP2OBJS=\ $(OBJ)$/extendloaderenvironment.obj \ $(OBJ)$/genericloader.obj \ $(SOLARLIBDIR)$/pathutils-obj.obj STDLIB2=$(SHLWAPILIB) +.ENDIF # "$(LINK_SO)"=="TRUE" # --- Targets ------------------------------------------------------ diff --git a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx index 6dffd80b332e..da7aedc6f983 100644 --- a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx +++ b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx @@ -65,6 +65,7 @@ namespace drawinglayer bool bSymbol = false, bool bVertical = false, bool bItalic = false, + bool bMonospaced = false, bool bOutline = false, bool bRTL = false, bool bBiDiStrong = false); @@ -89,6 +90,7 @@ namespace drawinglayer bool getOutline() const; bool getRTL() const; bool getBiDiStrong() const; + bool getMonospaced() const; }; } // end of namespace attribute } // end of namespace drawinglayer diff --git a/drawinglayer/source/attribute/fontattribute.cxx b/drawinglayer/source/attribute/fontattribute.cxx index 7d10d3a37384..d4246376d9ca 100644 --- a/drawinglayer/source/attribute/fontattribute.cxx +++ b/drawinglayer/source/attribute/fontattribute.cxx @@ -55,6 +55,7 @@ namespace drawinglayer unsigned mbOutline : 1; // Outline Flag unsigned mbRTL : 1; // RTL Flag unsigned mbBiDiStrong : 1; // BiDi Flag + unsigned mbMonospaced : 1; ImpFontAttribute( const String& rFamilyName, @@ -63,6 +64,7 @@ namespace drawinglayer bool bSymbol, bool bVertical, bool bItalic, + bool bMonospaced, bool bOutline, bool bRTL, bool bBiDiStrong) @@ -75,7 +77,8 @@ namespace drawinglayer mbItalic(bItalic), mbOutline(bOutline), mbRTL(bRTL), - mbBiDiStrong(bBiDiStrong) + mbBiDiStrong(bBiDiStrong), + mbMonospaced(bMonospaced) { } @@ -89,6 +92,7 @@ namespace drawinglayer bool getOutline() const { return mbOutline; } bool getRTL() const { return mbRTL; } bool getBiDiStrong() const { return mbBiDiStrong; } + bool getMonospaced() const { return mbMonospaced; } bool operator==(const ImpFontAttribute& rCompare) const { @@ -100,7 +104,8 @@ namespace drawinglayer && getItalic() == rCompare.getItalic() && getOutline() == rCompare.getOutline() && getRTL() == rCompare.getRTL() - && getBiDiStrong() == rCompare.getBiDiStrong()); + && getBiDiStrong() == rCompare.getBiDiStrong() + && getMonospaced() == rCompare.getMonospaced()); } static ImpFontAttribute* get_global_default() @@ -112,7 +117,7 @@ namespace drawinglayer pDefault = new ImpFontAttribute( String(), String(), 0, - false, false, false, false, false, false); + false, false, false, false, false, false, false); // never delete; start with RefCount 1, not 0 pDefault->mnRefCount++; @@ -129,11 +134,12 @@ namespace drawinglayer bool bSymbol, bool bVertical, bool bItalic, + bool bMonospaced, bool bOutline, bool bRTL, bool bBiDiStrong) : mpFontAttribute(new ImpFontAttribute( - rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bOutline, bRTL, bBiDiStrong)) + rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bMonospaced, bOutline, bRTL, bBiDiStrong)) { } @@ -246,6 +252,12 @@ namespace drawinglayer return mpFontAttribute->getBiDiStrong(); } + bool FontAttribute::getMonospaced() const + { + return mpFontAttribute->getMonospaced(); + } + + } // end of namespace attribute } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index c9774bea3f34..9aafd195a707 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -406,6 +406,7 @@ namespace drawinglayer aRetval.SetWeight(static_cast<FontWeight>(rFontAttribute.getWeight())); aRetval.SetItalic(rFontAttribute.getItalic() ? ITALIC_NORMAL : ITALIC_NONE); aRetval.SetOutline(rFontAttribute.getOutline()); + aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : PITCH_VARIABLE); aRetval.SetLanguage(MsLangId::convertLocaleToLanguage(rLocale)); #ifdef WIN32 @@ -445,6 +446,7 @@ namespace drawinglayer RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet(), rFont.IsVertical(), ITALIC_NONE != rFont.GetItalic(), + PITCH_FIXED == rFont.GetPitch(), rFont.IsOutline(), bRTL, bBiDiStrong); diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx index e20f1a417dcc..23661fe3747b 100644 --- a/drawinglayer/source/processor2d/canvasprocessor.cxx +++ b/drawinglayer/source/processor2d/canvasprocessor.cxx @@ -57,6 +57,7 @@ #include <basegfx/tuple/b2i64tuple.hxx> #include <basegfx/range/b2irange.hxx> #include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp> +#include <com/sun/star/rendering/PanoseProportion.hpp> #include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/StrokeAttributes.hpp> #include <com/sun/star/rendering/PathJoinType.hpp> @@ -1517,6 +1518,10 @@ namespace drawinglayer aFontRequest.FontDescription.IsVertical = rFontAttr.getVertical() ? util::TriState_YES : util::TriState_NO; // TODO(F2): improve vclenum->panose conversion aFontRequest.FontDescription.FontDescription.Weight = static_cast< sal_uInt8 >(rFontAttr.getWeight()); + aFontRequest.FontDescription.FontDescription.Proportion = + rFontAttr.getMonospaced() + ? rendering::PanoseProportion::MONO_SPACED + : rendering::PanoseProportion::ANYTHING; aFontRequest.FontDescription.FontDescription.Letterform = rFontAttr.getItalic() ? 9 : 0; // init CellSize to 1.0, else a default font height will be used diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx index 4ec96052769c..c64c8d99d9e4 100644..100755 --- a/editeng/inc/editeng/fontitem.hxx +++ b/editeng/inc/editeng/fontitem.hxx @@ -81,30 +81,23 @@ public: String &rText, const IntlWrapper * = 0 ) const; // ZugriffsMethoden: - inline String &GetFamilyName() { return aFamilyName; } + void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; } inline const String &GetFamilyName() const { return aFamilyName; } - inline String &GetStyleName() { return aStyleName; } + void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; } inline const String &GetStyleName() const { return aStyleName; } - inline FontFamily &GetFamily() { return eFamily; } + void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; } inline FontFamily GetFamily() const { return eFamily; } - inline FontPitch &GetPitch() { return ePitch; } + void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; } inline FontPitch GetPitch() const { return ePitch; } - inline rtl_TextEncoding &GetCharSet() { return eTextEncoding; } + void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; } + inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; } - inline SvxFontItem& operator=(const SvxFontItem& rFont) - { - aFamilyName = rFont.GetFamilyName(); - aStyleName = rFont.GetStyleName(); - eFamily = rFont.GetFamily(); - ePitch = rFont.GetPitch(); - eTextEncoding = rFont.GetCharSet(); - return *this; - } + SvxFontItem& operator=(const SvxFontItem& rFont); static void EnableStoreUnicodeNames( sal_Bool bEnable ); diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index f355a669a304..73dc7664562e 100644..100755 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -79,6 +79,7 @@ public: virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0; virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) = 0; virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) = 0; + virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt ) = 0; virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId, SfxPoolItem& ) = 0; diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index cda87dea9f7d..cb042b721c4d 100644..100755 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -1472,7 +1472,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) if ( hConv ) { SvxFontItem aNewFontItem( rFontItem ); - aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv ); + aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) ); pC->GetAttribs().Remove( nAttr ); XEditAttribute* pNewAttr = CreateAttrib( aNewFontItem, pAttr->GetStart(), pAttr->GetEnd() ); @@ -1503,7 +1503,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) if ( hConv ) { SvxFontItem aNewFontItem( rFontItem ); - aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv ); + aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) ); pC->GetParaAttribs().Put( aNewFontItem ); for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ ) diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index afc329040e29..5fc43f461cac 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -583,8 +583,13 @@ sal_Bool EdtAutoCorrDoc::Insert( sal_uInt16 nPos, const String& rTxt ) sal_Bool EdtAutoCorrDoc::Replace( sal_uInt16 nPos, const String& rTxt ) { + return ReplaceRange( nPos, rTxt.Len(), rTxt ); +} + +sal_Bool EdtAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength, const String& rTxt ) +{ // Eigentlich ein Replace einfuehren => Entspr. UNDO - sal_uInt16 nEnd = nPos+rTxt.Len(); + sal_uInt16 nEnd = nPos+nSourceLength; if ( nEnd > pCurNode->Len() ) nEnd = pCurNode->Len(); diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx index 3ed82ac367f1..49978cdd310d 100644..100755 --- a/editeng/source/editeng/edtspell.hxx +++ b/editeng/source/editeng/edtspell.hxx @@ -158,6 +158,7 @@ public: virtual sal_Bool Delete( sal_uInt16 nStt, sal_uInt16 nEnd ); virtual sal_Bool Insert( sal_uInt16 nPos, const String& rTxt ); virtual sal_Bool Replace( sal_uInt16 nPos, const String& rTxt ); + virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt ); virtual sal_Bool SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_uInt16 nSlotId, SfxPoolItem& ); virtual sal_Bool SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const String& rURL ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 4b4b5e4514a8..71caa4f176fa 100755 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1682,11 +1682,11 @@ void ImpEditEngine::SetLanguageAndFont( { // set new font attribute SvxFontItem aFontItem = (SvxFontItem&) aNewSet.Get( nFontWhichId ); - aFontItem.GetFamilyName() = pFont->GetName(); - aFontItem.GetFamily() = pFont->GetFamily(); - aFontItem.GetStyleName() = pFont->GetStyleName(); - aFontItem.GetPitch() = pFont->GetPitch(); - aFontItem.GetCharSet() = pFont->GetCharSet(); + aFontItem.SetFamilyName( pFont->GetName()); + aFontItem.SetFamily( pFont->GetFamily()); + aFontItem.SetStyleName( pFont->GetStyleName()); + aFontItem.SetPitch( pFont->GetPitch()); + aFontItem.SetCharSet( pFont->GetCharSet() ); aNewSet.Put( aFontItem ); } diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx index b92284eb60bf..d2dc1c8a846d 100644..100755 --- a/editeng/source/editeng/textconv.cxx +++ b/editeng/source/editeng/textconv.cxx @@ -302,11 +302,11 @@ void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel, { // set new font attribute SvxFontItem aFontItem = (SvxFontItem&) aNewSet.Get( nFontWhichId ); - aFontItem.GetFamilyName() = pFont->GetName(); - aFontItem.GetFamily() = pFont->GetFamily(); - aFontItem.GetStyleName() = pFont->GetStyleName(); - aFontItem.GetPitch() = pFont->GetPitch(); - aFontItem.GetCharSet() = pFont->GetCharSet(); + aFontItem.SetFamilyName( pFont->GetName()); + aFontItem.SetFamily( pFont->GetFamily()); + aFontItem.SetStyleName( pFont->GetStyleName()); + aFontItem.SetPitch( pFont->GetPitch()); + aFontItem.SetCharSet(pFont->GetCharSet()); aNewSet.Put( aFontItem ); } diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 8c0e533a40f4..5f2dc3a2d803 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -406,6 +406,8 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC ---------------------------------------------------------------------------*/ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) { + if (& rFormat == this) { return *this; } + SetNumberingType(rFormat.GetNumberingType()); eNumAdjust = rFormat.eNumAdjust ; nInclUpperLevels = rFormat.nInclUpperLevels ; diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index f1dc1f6c6f85..f0fa8cd02d8f 100644..100755 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -256,6 +256,16 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName, } // ----------------------------------------------------------------------- +SvxFontItem& SvxFontItem::operator=(const SvxFontItem& rFont) +{ + aFamilyName = rFont.GetFamilyName(); + aStyleName = rFont.GetStyleName(); + eFamily = rFont.GetFamily(); + ePitch = rFont.GetPitch(); + eTextEncoding = rFont.GetCharSet(); + return *this; +} +// ----------------------------------------------------------------------- sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { @@ -3806,11 +3816,11 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo aOutTypeArr[ n ].nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0 ) ); SvxFontItem* pItem = aItemArr[ n ]; - pItem->GetFamily() = aFont.GetFamily(); - pItem->GetFamilyName() = aFont.GetName(); - pItem->GetStyleName().Erase(); - pItem->GetPitch() = aFont.GetPitch(); - pItem->GetCharSet() = aFont.GetCharSet(); + pItem->SetFamily( aFont.GetFamily() ); + pItem->SetFamilyName( aFont.GetName() ); + pItem->SetStyleName( String() ); + pItem->SetPitch( aFont.GetPitch()); + pItem->SetCharSet(aFont.GetCharSet()); } } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index e15e92200e0c..1eebd5349fe4 100644..100755 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -47,6 +47,7 @@ #include <com/sun/star/i18n/UnicodeType.hdl> #include <unotools/collatorwrapper.hxx> #include <com/sun/star/i18n/CollatorOptions.hpp> +#include <com/sun/star/i18n/UnicodeScript.hpp> #include <unotools/localedatawrapper.hxx> #include <unotools/transliterationwrapper.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -139,6 +140,41 @@ inline int IsUpperLetter( sal_Int32 nCharType ) 0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType); } +bool lcl_IsUnsupportedUnicodeChar( CharClass& rCC, const String& rTxt, + xub_StrLen nStt, xub_StrLen nEnd ) +{ + for( ; nStt < nEnd; ++nStt ) + { +#if OSL_DEBUG_LEVEL > 1 + sal_Int32 nCharType; + sal_Int32 nChType; + nCharType = rCC.getCharacterType( rTxt, nStt ); + nChType = rCC.getType( rTxt, nStt ); +#endif + short nScript = rCC.getScript( rTxt, nStt ); + switch( nScript ) + { + case ::com::sun::star::i18n::UnicodeScript_kCJKRadicalsSupplement: + case ::com::sun::star::i18n::UnicodeScript_kHangulJamo: + case ::com::sun::star::i18n::UnicodeScript_kCJKSymbolPunctuation: + case ::com::sun::star::i18n::UnicodeScript_kHiragana: + case ::com::sun::star::i18n::UnicodeScript_kKatakana: + case ::com::sun::star::i18n::UnicodeScript_kHangulCompatibilityJamo: + case ::com::sun::star::i18n::UnicodeScript_kEnclosedCJKLetterMonth: + case ::com::sun::star::i18n::UnicodeScript_kCJKCompatibility: + case ::com::sun::star::i18n::UnicodeScript_k_CJKUnifiedIdeographsExtensionA: + case ::com::sun::star::i18n::UnicodeScript_kCJKUnifiedIdeograph: + case ::com::sun::star::i18n::UnicodeScript_kHangulSyllable: + case ::com::sun::star::i18n::UnicodeScript_kCJKCompatibilityIdeograph: + case ::com::sun::star::i18n::UnicodeScript_kHalfwidthFullwidthForm: + return true; + default: ; //do nothing + } + + } + return false; +} + sal_Bool lcl_IsSymbolChar( CharClass& rCC, const String& rTxt, xub_StrLen nStt, xub_StrLen nEnd ) { @@ -456,7 +492,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, sal_Unicode cSave = rTxt.GetChar( nSttPos ); String sChar( cSave ); rCC.toLower( sChar ); - if( sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar )) + if( sChar.GetChar(0) != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar )) { if( SaveWordWrdSttLst & nFlags ) rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave ); @@ -888,7 +924,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, String sChar( *pWordStt ); rCC.toUpper( sChar ); return sChar != *pWordStt && - rDoc.Replace( xub_StrLen( pWordStt - pStart ), sChar ); + rDoc.ReplaceRange( xub_StrLen( pWordStt - pStart ), 1, sChar ); } aText = *pPrevPara; @@ -1068,7 +1104,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() ); String sChar( cSave ); rCC.toUpper( sChar ); - sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ); + sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar ); // das Wort will vielleicht jemand haben if( bRet && SaveWordCplSttLst & nFlags ) @@ -1299,7 +1335,7 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, eLang = MsLangId::getSystemLanguage(); CharClass& rCC = GetCharClass( eLang ); - // Bug 19285: Symbolzeichen nicht anfassen + // no symbol characters if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nInsPos )) break; @@ -1368,13 +1404,16 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, else { nRet = 0; + bool bUnsupported = lcl_IsUnsupportedUnicodeChar( rCC, rTxt, nCapLttrPos, nInsPos ); // Grossbuchstabe am Satz-Anfang ?? - if( IsAutoCorrFlag( CptlSttSntnc ) && + if( !bUnsupported && + IsAutoCorrFlag( CptlSttSntnc ) && FnCptlSttSntnc( rDoc, rTxt, sal_True, nCapLttrPos, nInsPos, eLang ) ) nRet |= CptlSttSntnc; // Zwei Grossbuchstaben am Wort-Anfang ?? - if( IsAutoCorrFlag( CptlSttWrd ) && + if( !bUnsupported && + IsAutoCorrFlag( CptlSttWrd ) && FnCptlSttWrd( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) ) nRet |= CptlSttWrd; diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index d81af6ccff0c..bc2245e7e6a9 100644..100755 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -91,11 +91,11 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte { SvxFontItem aFontItem( EE_CHAR_FONTINFO ); - aFontItem.GetFamilyName()= rDesc.Name; - aFontItem.GetStyleName() = rDesc.StyleName; - aFontItem.GetFamily() = (FontFamily)rDesc.Family; - aFontItem.GetCharSet() = rDesc.CharSet; - aFontItem.GetPitch() = (FontPitch)rDesc.Pitch; + aFontItem.SetFamilyName( rDesc.Name); + aFontItem.SetStyleName( rDesc.StyleName); + aFontItem.SetFamily( (FontFamily)rDesc.Family); + aFontItem.SetCharSet( rDesc.CharSet ); + aFontItem.SetPitch( (FontPitch)rDesc.Pitch); rSet.Put(aFontItem); } diff --git a/framework/inc/services/substitutepathvars.hxx b/framework/inc/services/substitutepathvars.hxx index 9bf4b1ead43d..8825386d1b57 100644 --- a/framework/inc/services/substitutepathvars.hxx +++ b/framework/inc/services/substitutepathvars.hxx @@ -36,7 +36,7 @@ #include <hash_map> //_________________________________________________________________________________________________________________ -// my own includes +// my own includes //_________________________________________________________________________________________________________________ #include <threadhelp/threadhelpbase.hxx> #include <macros/generic.hxx> @@ -46,7 +46,7 @@ #include <stdtypes.h> //_________________________________________________________________________________________________________________ -// interface includes +// interface includes //_________________________________________________________________________________________________________________ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> @@ -54,7 +54,7 @@ #include <com/sun/star/util/XStringSubstitution.hpp> //_________________________________________________________________________________________________________________ -// other includes +// other includes //_________________________________________________________________________________________________________________ #include <cppuhelper/implbase2.hxx> #include <rtl/ustring.hxx> @@ -68,24 +68,24 @@ namespace framework // Must be zero value based enum EnvironmentType { - ET_HOST = 0 , - ET_YPDOMAIN , - ET_DNSDOMAIN , - ET_NTDOMAIN , - ET_OS , - ET_UNKNOWN , - ET_COUNT + ET_HOST = 0 , + ET_YPDOMAIN , + ET_DNSDOMAIN , + ET_NTDOMAIN , + ET_OS , + ET_UNKNOWN , + ET_COUNT }; // Must be zero value based enum OperatingSystem { - OS_WINDOWS = 0, - OS_UNIX , - OS_SOLARIS , - OS_LINUX , - OS_UNKNOWN , - OS_COUNT + OS_WINDOWS = 0, + OS_UNIX , + OS_SOLARIS , + OS_LINUX , + OS_UNKNOWN , + OS_COUNT }; struct SubstituteRule @@ -97,15 +97,16 @@ struct SubstituteRule EnvironmentType aType ) : aSubstVariable( aVarName ), aSubstValue( aValue ), aEnvValue( aVal ), aEnvType( aType ) {} - rtl::OUString aSubstVariable; - rtl::OUString aSubstValue; - com::sun::star::uno::Any aEnvValue; - EnvironmentType aEnvType; + rtl::OUString aSubstVariable; + rtl::OUString aSubstValue; + com::sun::star::uno::Any aEnvValue; + EnvironmentType aEnvType; }; struct SubstitutePathNotify { SubstitutePathNotify() {}; + const com::sun::star::uno::Sequence<rtl::OUString> aPropertyNames; }; @@ -131,45 +132,45 @@ class SubstitutePathVariables_Impl : public utl::ConfigItem static OperatingSystem GetOperatingSystemFromString( const rtl::OUString& ); static EnvironmentType GetEnvTypeFromString( const rtl::OUString& ); - void GetSharePointsRules( SubstituteVariables& aSubstVarMap ); + void GetSharePointsRules( SubstituteVariables& aSubstVarMap ); /** is called from the ConfigManager before application ends or from the PropertyChangeListener if the sub tree broadcasts changes. */ - virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - virtual void Commit(); - - private: - // Wrapper methods for low-level functions - OperatingSystem GetOperatingSystem(); - const rtl::OUString& GetYPDomainName(); - const rtl::OUString& GetDNSDomainName(); - const rtl::OUString& GetNTDomainName(); - const rtl::OUString& GetHostName(); - - sal_Bool FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule ); - - void ReadSharePointsFromConfiguration( com::sun::star::uno::Sequence< rtl::OUString >& aSharePointsSeq ); - void ReadSharePointRuleSetFromConfiguration( const rtl::OUString& aSharePointName, - const rtl::OUString& aSharePointNodeName, - SubstituteRuleVector& aRuleSet ); - - // Stored values for domains and host - sal_Bool m_bYPDomainRetrieved; - rtl::OUString m_aYPDomain; - sal_Bool m_bDNSDomainRetrieved; - rtl::OUString m_aDNSDomain; - sal_Bool m_bNTDomainRetrieved; - rtl::OUString m_aNTDomain; - sal_Bool m_bHostRetrieved; - rtl::OUString m_aHost; - sal_Bool m_bOSRetrieved; - OperatingSystem m_eOSType; - - Link m_aListenerNotify; - const rtl::OUString m_aSharePointsNodeName; - const rtl::OUString m_aDirPropertyName; - const rtl::OUString m_aEnvPropertyName; - const rtl::OUString m_aLevelSep; + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); + virtual void Commit(); + + private: + // Wrapper methods for low-level functions + OperatingSystem GetOperatingSystem(); + const rtl::OUString& GetYPDomainName(); + const rtl::OUString& GetDNSDomainName(); + const rtl::OUString& GetNTDomainName(); + const rtl::OUString& GetHostName(); + + bool FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule ); + + void ReadSharePointsFromConfiguration( com::sun::star::uno::Sequence< rtl::OUString >& aSharePointsSeq ); + void ReadSharePointRuleSetFromConfiguration( const rtl::OUString& aSharePointName, + const rtl::OUString& aSharePointNodeName, + SubstituteRuleVector& aRuleSet ); + + // Stored values for domains and host + bool m_bYPDomainRetrieved; + rtl::OUString m_aYPDomain; + bool m_bDNSDomainRetrieved; + rtl::OUString m_aDNSDomain; + bool m_bNTDomainRetrieved; + rtl::OUString m_aNTDomain; + bool m_bHostRetrieved; + rtl::OUString m_aHost; + bool m_bOSRetrieved; + OperatingSystem m_eOSType; + + Link m_aListenerNotify; + const rtl::OUString m_aSharePointsNodeName; + const rtl::OUString m_aDirPropertyName; + const rtl::OUString m_aEnvPropertyName; + const rtl::OUString m_aLevelSep; }; enum PreDefVariable @@ -234,8 +235,8 @@ struct ReSubstUserVarOrder typedef std::list< ReSubstFixedVarOrder > ReSubstFixedVarOrderVector; typedef std::list< ReSubstUserVarOrder > ReSubstUserVarOrderVector; -class SubstitutePathVariables : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. - public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringSubstitution, css::lang::XServiceInfo> +class SubstitutePathVariables : private ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses. + public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringSubstitution, css::lang::XServiceInfo > { friend class SubstitutePathVariables_Impl; @@ -254,51 +255,51 @@ class SubstitutePathVariables : private ThreadHelpBase virtual ::rtl::OUString SAL_CALL getSubstituteVariableValue( const ::rtl::OUString& variable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - protected: - DECL_LINK( implts_ConfigurationNotify, SubstitutePathNotify* ); - - void SetPredefinedPathVariables( PredefinedPathVariables& ); - rtl::OUString ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const; - - // Special case (transient) values can change during runtime! - // Don't store them in the pre defined struct - rtl::OUString GetWorkPath() const; - rtl::OUString GetWorkVariableValue() const; - rtl::OUString GetPathVariableValue() const; - - rtl::OUString GetHomeVariableValue() const; - - // XStringSubstitution implementation methods - rtl::OUString impl_substituteVariable( const ::rtl::OUString& aText, sal_Bool bSustRequired ) - throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - rtl::OUString impl_reSubstituteVariables( const ::rtl::OUString& aText ) - throw (::com::sun::star::uno::RuntimeException); - ::rtl::OUString impl_getSubstituteVariableValue( const ::rtl::OUString& variable ) - throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - - private: - class VarNameToIndexMap : public std::hash_map< ::rtl::OUString, - PreDefVariable, - OUStringHashCode, - ::std::equal_to< ::rtl::OUString > > - { - inline void free() + protected: + DECL_LINK( implts_ConfigurationNotify, SubstitutePathNotify* ); + + void SetPredefinedPathVariables( PredefinedPathVariables& ); + rtl::OUString ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const; + + // Special case (transient) values can change during runtime! + // Don't store them in the pre defined struct + rtl::OUString GetWorkPath() const; + rtl::OUString GetWorkVariableValue() const; + rtl::OUString GetPathVariableValue() const; + + rtl::OUString GetHomeVariableValue() const; + + // XStringSubstitution implementation methods + rtl::OUString impl_substituteVariable( const ::rtl::OUString& aText, bool bSustRequired ) + throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); + rtl::OUString impl_reSubstituteVariables( const ::rtl::OUString& aText ) + throw (::com::sun::star::uno::RuntimeException); + ::rtl::OUString impl_getSubstituteVariableValue( const ::rtl::OUString& variable ) + throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); + + private: + class VarNameToIndexMap : public std::hash_map< ::rtl::OUString, + PreDefVariable, + OUStringHashCode, + ::std::equal_to< ::rtl::OUString > > { - VarNameToIndexMap().swap( *this ); - } - }; - - // heavy used string - const rtl::OUString m_aVarStart; - const rtl::OUString m_aVarEnd; - - VarNameToIndexMap m_aPreDefVarMap; // Mapping from pre-def variable names to enum for array access - SubstituteVariables m_aSubstVarMap; // Active rule set map indexed by variable name! - PredefinedPathVariables m_aPreDefVars; // All predefined variables - SubstitutePathVariables_Impl m_aImpl; // Implementation class that access the configuration - ReSubstFixedVarOrderVector m_aReSubstFixedVarOrder; // To speed up resubstitution fixed variables (order for lookup) - ReSubstUserVarOrderVector m_aReSubstUserVarOrder; // To speed up resubstitution user variables - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + inline void free() + { + VarNameToIndexMap().swap( *this ); + } + }; + + // heavy used string + const rtl::OUString m_aVarStart; + const rtl::OUString m_aVarEnd; + + VarNameToIndexMap m_aPreDefVarMap; // Mapping from pre-def variable names to enum for array access + SubstituteVariables m_aSubstVarMap; // Active rule set map indexed by variable name! + PredefinedPathVariables m_aPreDefVars; // All predefined variables + SubstitutePathVariables_Impl m_aImpl; // Implementation class that access the configuration + ReSubstFixedVarOrderVector m_aReSubstFixedVarOrder; // To speed up resubstitution fixed variables (order for lookup) + ReSubstUserVarOrderVector m_aReSubstUserVarOrder; // To speed up resubstitution user variables + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; }; } diff --git a/framework/qa/complex/path_substitution/PathSubstitutionTest.java b/framework/qa/complex/path_substitution/PathSubstitutionTest.java index aeea9907e6bc..e936fbf6ccad 100755 --- a/framework/qa/complex/path_substitution/PathSubstitutionTest.java +++ b/framework/qa/complex/path_substitution/PathSubstitutionTest.java @@ -63,20 +63,20 @@ public class PathSubstitutionTest /** * Create an array with all substitution variables */ - @Before private void initialize() + @Before public void initialize() { substVars = new VariableContainer(); - substVars.add("$(prog)", false, true); - substVars.add("$(inst)", false, true); - substVars.add("$(user)", false, true); - substVars.add("$(work)", false, true); - substVars.add("$(home)", false, true); - substVars.add("$(temp)", false, true); + substVars.add("$(prog)", true, true); + substVars.add("$(inst)", true, true); + substVars.add("$(user)", true, true); + substVars.add("$(work)", true, true); + substVars.add("$(home)", true, true); + substVars.add("$(temp)", true, true); substVars.add("$(lang)", false, false); substVars.add("$(langid)", false, false); substVars.add("$(vlang)", false, false); // path won't resubstitute - substVars.add("$(path)", false, false); + substVars.add("$(path)", true, false); } /** @@ -106,8 +106,6 @@ public class PathSubstitutionTest return; } -// initialize(); - for (int i = 0; i < substVars.size(); i++) { String var = substVars.getVariable(i); @@ -148,6 +146,12 @@ public class PathSubstitutionTest //in middle of text works substString = "file:///starting/" + var + "/path"; + String sCanSubstAllPos; + if (substVars.onlySubstituteAtBegin(i)) + sCanSubstAllPos = "NO"; + else + sCanSubstAllPos = "YES"; + System.out.println("Variable can substitute within string: "+sCanSubstAllPos); System.out.println("Substitute '" + substString + "'"); newValue = oObj.substituteVariables(substString, false); System.out.println("Return value '" + newValue + "'"); diff --git a/framework/qa/unoapi/makefile.mk b/framework/qa/unoapi/makefile.mk new file mode 100644 index 000000000000..38a6cf7cced8 --- /dev/null +++ b/framework/qa/unoapi/makefile.mk @@ -0,0 +1,48 @@ +#************************************************************************* +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +#***********************************************************************/ + +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ = ../.. +PRJNAME = framework +TARGET = qa_unoapi + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = org/openoffice/framework/qa/unoapi +JAVATESTFILES = Test.java +JAVAFILES = $(JAVATESTFILES) +JARFILES = OOoRunner.jar ridl.jar test.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END + +.INCLUDE: settings.mk +.INCLUDE: target.mk +.INCLUDE: installationtest.mk + +ALLTAR : javatest + +.END diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 90c460b74298..5fde74764eda 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -29,7 +29,7 @@ #include "precompiled_framework.hxx" //_________________________________________________________________________________________________________________ -// my own includes +// my own includes //_________________________________________________________________________________________________________________ #include "services/substitutepathvars.hxx" #include <threadhelp/resetableguard.hxx> @@ -37,12 +37,12 @@ #include "services.h" //_________________________________________________________________________________________________________________ -// interface includes +// interface includes //_________________________________________________________________________________________________________________ #include <com/sun/star/beans/XPropertySet.hpp> //_________________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //_________________________________________________________________________________________________________________ #include <unotools/configitem.hxx> #include <unotools/localfilehelper.hxx> @@ -69,38 +69,38 @@ #include <string.h> //_________________________________________________________________________________________________________________ -// Defines +// Defines //_________________________________________________________________________________________________________________ // -#define STRPOS_NOTFOUND (sal_Int32)-1 +#define STRPOS_NOTFOUND (sal_Int32)-1 -#define ASCII_STR( val ) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( val )) +#define ASCII_STR( val ) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( val )) -#define SEARCHPATH_DELIMITER ';' +#define SEARCHPATH_DELIMITER ';' // Variable start/end characters -#define SIGN_STARTVARIABLE ASCII_STR("$(") -#define SIGN_ENDVARIABLE ASCII_STR(")") +#define SIGN_STARTVARIABLE ASCII_STR("$(") +#define SIGN_ENDVARIABLE ASCII_STR(")") // Length of SUBSTITUTE_... to replace it with real values. -#define REPLACELENGTH_INST 7 -#define REPLACELENGTH_PROG 7 -#define REPLACELENGTH_USER 7 -#define REPLACELENGTH_WORK 7 -#define REPLACELENGTH_HOME 7 -#define REPLACELENGTH_TEMP 7 -#define REPLACELENGTH_PATH 7 +#define REPLACELENGTH_INST 7 +#define REPLACELENGTH_PROG 7 +#define REPLACELENGTH_USER 7 +#define REPLACELENGTH_WORK 7 +#define REPLACELENGTH_HOME 7 +#define REPLACELENGTH_TEMP 7 +#define REPLACELENGTH_PATH 7 #define REPLACELENGTH_INSTPATH 11 #define REPLACELENGTH_PROGPATH 11 #define REPLACELENGTH_USERPATH 11 #define REPLACELENGTH_INSTURL 10 #define REPLACELENGTH_PROGURL 10 #define REPLACELENGTH_USERURL 10 -#define REPLACELENGTH_PATH 7 -#define REPLACELENGTH_LANG 7 -#define REPLACELENGTH_LANGID 9 -#define REPLACELENGTH_VLANG 8 +#define REPLACELENGTH_PATH 7 +#define REPLACELENGTH_LANG 7 +#define REPLACELENGTH_LANGID 9 +#define REPLACELENGTH_VLANG 8 #define REPLACELENGTH_WORKDIRURL 13 // --> PB 2004-10-27 #i32656# - new variable of hierachy service #define REPLACELENGTH_BASEINSTURL 14 @@ -108,27 +108,28 @@ // <-- // Name of the pre defined path variables -#define VARIABLE_INST "$(inst)" -#define VARIABLE_PROG "$(prog)" -#define VARIABLE_USER "$(user)" -#define VARIABLE_WORK "$(work)" -#define VARIABLE_HOME "$(home)" -#define VARIABLE_TEMP "$(temp)" -#define VARIABLE_PATH "$(path)" -#define VARIABLE_LANG "$(lang)" -#define VARIABLE_LANGID "$(langid)" -#define VARIABLE_VLANG "$(vlang)" -#define VARIABLE_INSTPATH "$(instpath)" -#define VARIABLE_PROGPATH "$(progpath)" -#define VARIABLE_USERPATH "$(userpath)" -#define VARIABLE_INSTURL "$(insturl)" -#define VARIABLE_PROGURL "$(progurl)" -#define VARIABLE_USERURL "$(userurl)" -#define VARIABLE_WORKDIRURL "$(workdirurl)" +#define VARIABLE_INST "$(inst)" +#define VARIABLE_PROG "$(prog)" +#define VARIABLE_USER "$(user)" +#define VARIABLE_WORK "$(work)" +#define VARIABLE_HOME "$(home)" +#define VARIABLE_TEMP "$(temp)" +#define VARIABLE_PATH "$(path)" +#define VARIABLE_LANG "$(lang)" +#define VARIABLE_LANGID "$(langid)" +#define VARIABLE_VLANG "$(vlang)" +#define VARIABLE_INSTPATH "$(instpath)" +#define VARIABLE_PROGPATH "$(progpath)" +#define VARIABLE_USERPATH "$(userpath)" +#define VARIABLE_INSTURL "$(insturl)" +#define VARIABLE_PROGURL "$(progurl)" +#define VARIABLE_USERURL "$(userurl)" +#define VARIABLE_WORKDIRURL "$(workdirurl)" // --> PB 2004-10-27 #i32656# - new variable of hierachy service -#define VARIABLE_BASEINSTURL "$(baseinsturl)" -#define VARIABLE_USERDATAURL "$(userdataurl)" +#define VARIABLE_BASEINSTURL "$(baseinsturl)" +#define VARIABLE_USERDATAURL "$(userdataurl)" // <-- +#define VARIABLE_BRANDBASEURL "$(brandbaseurl)" using namespace com::sun::star::uno; using namespace com::sun::star::beans; @@ -137,7 +138,7 @@ using namespace com::sun::star::lang; using namespace com::sun::star::container; //_________________________________________________________________________________________________________________ -// Namespace +// Namespace //_________________________________________________________________________________________________________________ // @@ -149,6 +150,7 @@ struct FixedVariable const char* pVarName; PreDefVariable nEnumValue; int nStrLen; + bool bAbsPath; }; struct TableEntry @@ -162,11 +164,11 @@ struct TableEntry // of the string static TableEntry aOSTable[OS_COUNT] = { - { "WINDOWS" , 7 }, - { "UNIX" , 4 }, - { "SOLARIS" , 7 }, - { "LINUX" , 5 }, - { "" , 0 } // unknown + { "WINDOWS" , 7 }, + { "UNIX" , 4 }, + { "SOLARIS" , 7 }, + { "LINUX" , 5 }, + { "" , 0 } // unknown }; // Table with valid environment variables @@ -174,12 +176,12 @@ static TableEntry aOSTable[OS_COUNT] = // the length of the string. static TableEntry aEnvTable[ET_COUNT] = { - { "HOST" , 4 }, - { "YPDOMAIN" , 8 }, - { "DNSDOMAIN" , 9 }, - { "NTDOMAIN" , 8 }, - { "OS" , 2 }, - { "" , 0 } // unknown + { "HOST" , 4 }, + { "YPDOMAIN" , 8 }, + { "DNSDOMAIN" , 9 }, + { "NTDOMAIN" , 8 }, + { "OS" , 2 }, + { "" , 0 } // unknown }; // Priority table for the environment types. Lower numbers define @@ -187,44 +189,43 @@ static TableEntry aEnvTable[ET_COUNT] = // that the first match wins!! static sal_Int16 aEnvPrioTable[ET_COUNT] = { - 1, // ET_HOST - 2, // ET_IPDOMAIN - 2, // ET_DNSDOMAIN - 2, // ET_NTDOMAIN - 3, // ET_OS - 99, // ET_UNKNOWN + 1, // ET_HOST + 2, // ET_IPDOMAIN + 2, // ET_DNSDOMAIN + 2, // ET_NTDOMAIN + 3, // ET_OS + 99, // ET_UNKNOWN }; // Table with all fixed/predefined variables supported. static FixedVariable aFixedVarTable[] = { - { VARIABLE_INST, PREDEFVAR_INST, REPLACELENGTH_INST }, - { VARIABLE_PROG, PREDEFVAR_PROG, REPLACELENGTH_PROG }, - { VARIABLE_USER, PREDEFVAR_USER, REPLACELENGTH_USER }, - { VARIABLE_WORK, PREDEFVAR_WORK, REPLACELENGTH_WORK }, // Special variable (transient)! - { VARIABLE_HOME, PREDEFVAR_HOME, REPLACELENGTH_HOME }, - { VARIABLE_TEMP, PREDEFVAR_TEMP, REPLACELENGTH_TEMP }, - { VARIABLE_PATH, PREDEFVAR_PATH, REPLACELENGTH_PATH }, - { VARIABLE_LANG, PREDEFVAR_LANG, REPLACELENGTH_LANG }, - { VARIABLE_LANGID, PREDEFVAR_LANGID, REPLACELENGTH_LANGID }, - { VARIABLE_VLANG, PREDEFVAR_VLANG, REPLACELENGTH_VLANG }, - { VARIABLE_INSTPATH, PREDEFVAR_INSTPATH, REPLACELENGTH_INSTPATH }, - { VARIABLE_PROGPATH, PREDEFVAR_PROGPATH, REPLACELENGTH_PROGPATH }, - { VARIABLE_USERPATH, PREDEFVAR_USERPATH, REPLACELENGTH_USERPATH }, - { VARIABLE_INSTURL, PREDEFVAR_INSTURL, REPLACELENGTH_INSTURL }, - { VARIABLE_PROGURL, PREDEFVAR_PROGURL, REPLACELENGTH_PROGURL }, - { VARIABLE_USERURL, PREDEFVAR_USERURL, REPLACELENGTH_USERURL }, - { VARIABLE_WORKDIRURL, PREDEFVAR_WORKDIRURL, REPLACELENGTH_WORKDIRURL }, // Special variable (transient) and don't use for resubstitution! + { VARIABLE_INST, PREDEFVAR_INST, REPLACELENGTH_INST, true }, + { VARIABLE_PROG, PREDEFVAR_PROG, REPLACELENGTH_PROG, true }, + { VARIABLE_USER, PREDEFVAR_USER, REPLACELENGTH_USER, true }, + { VARIABLE_WORK, PREDEFVAR_WORK, REPLACELENGTH_WORK, true }, // Special variable (transient)! + { VARIABLE_HOME, PREDEFVAR_HOME, REPLACELENGTH_HOME, true }, + { VARIABLE_TEMP, PREDEFVAR_TEMP, REPLACELENGTH_TEMP, true }, + { VARIABLE_PATH, PREDEFVAR_PATH, REPLACELENGTH_PATH, true }, + { VARIABLE_LANG, PREDEFVAR_LANG, REPLACELENGTH_LANG, false }, + { VARIABLE_LANGID, PREDEFVAR_LANGID, REPLACELENGTH_LANGID, false }, + { VARIABLE_VLANG, PREDEFVAR_VLANG, REPLACELENGTH_VLANG, false }, + { VARIABLE_INSTPATH, PREDEFVAR_INSTPATH, REPLACELENGTH_INSTPATH, true }, + { VARIABLE_PROGPATH, PREDEFVAR_PROGPATH, REPLACELENGTH_PROGPATH, true }, + { VARIABLE_USERPATH, PREDEFVAR_USERPATH, REPLACELENGTH_USERPATH, true }, + { VARIABLE_INSTURL, PREDEFVAR_INSTURL, REPLACELENGTH_INSTURL, true }, + { VARIABLE_PROGURL, PREDEFVAR_PROGURL, REPLACELENGTH_PROGURL, true }, + { VARIABLE_USERURL, PREDEFVAR_USERURL, REPLACELENGTH_USERURL, true }, + { VARIABLE_WORKDIRURL, PREDEFVAR_WORKDIRURL, REPLACELENGTH_WORKDIRURL,true }, // Special variable (transient) and don't use for resubstitution! // --> PB 2004-10-27 #i32656# - new variable of hierachy service - { VARIABLE_BASEINSTURL, PREDEFVAR_BASEINSTURL, REPLACELENGTH_BASEINSTURL }, - { VARIABLE_USERDATAURL, PREDEFVAR_USERDATAURL, REPLACELENGTH_USERDATAURL }, + { VARIABLE_BASEINSTURL, PREDEFVAR_BASEINSTURL, REPLACELENGTH_BASEINSTURL,true }, + { VARIABLE_USERDATAURL, PREDEFVAR_USERDATAURL, REPLACELENGTH_USERDATAURL,true }, // <-- - { "$(brandbaseurl)", PREDEFVAR_BRANDBASEURL, - RTL_CONSTASCII_LENGTH("$(brandbaseurl)") } + { VARIABLE_BRANDBASEURL,PREDEFVAR_BRANDBASEURL, RTL_CONSTASCII_LENGTH(VARIABLE_BRANDBASEURL), true } }; //_________________________________________________________________________________________________________________ -// Implementation helper classes +// Implementation helper classes //_________________________________________________________________________________________________________________ // @@ -252,11 +253,11 @@ EnvironmentType SubstitutePathVariables_Impl::GetEnvTypeFromString( const rtl::O SubstitutePathVariables_Impl::SubstitutePathVariables_Impl( const Link& aNotifyLink ) : utl::ConfigItem( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Substitution" ))), - m_bYPDomainRetrieved( sal_False ), - m_bDNSDomainRetrieved( sal_False ), - m_bNTDomainRetrieved( sal_False ), - m_bHostRetrieved( sal_False ), - m_bOSRetrieved( sal_False ), + m_bYPDomainRetrieved( false ), + m_bDNSDomainRetrieved( false ), + m_bNTDomainRetrieved( false ), + m_bHostRetrieved( false ), + m_bOSRetrieved( false ), m_aListenerNotify( aNotifyLink ), m_aSharePointsNodeName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SharePoints" ))), m_aDirPropertyName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/Directory" ))), @@ -302,10 +303,9 @@ void SubstitutePathVariables_Impl::GetSharePointsRules( SubstituteVariables& aSu // We have found an active rule aActiveRule.aSubstVariable = aSharePointNames[ nSharePoints ]; aSubstVarMap.insert( SubstituteVariables::value_type( - aActiveRule.aSubstVariable, aActiveRule )); + aActiveRule.aSubstVariable, aActiveRule )); } } - ++nSharePoints; } } @@ -322,7 +322,7 @@ void SubstitutePathVariables_Impl::Commit() //_________________________________________________________________________________________________________________ -// private methods +// private methods //_________________________________________________________________________________________________________________ // @@ -407,18 +407,19 @@ const rtl::OUString& SubstitutePathVariables_Impl::GetHostName() return m_aHost; } -sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule ) +bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule ) { - sal_Bool bResult = sal_False; + bool bResult = sal_False; if ( !aRuleSet.empty() ) { - sal_Int16 nPrioCurrentRule = aEnvPrioTable[ ET_UNKNOWN ]; const sal_uInt32 nCount = aRuleSet.size(); + + sal_Int16 nPrioCurrentRule = aEnvPrioTable[ ET_UNKNOWN ]; for ( sal_uInt32 nIndex = 0; nIndex < nCount; nIndex++ ) { const SubstituteRule& aRule = aRuleSet[nIndex]; - EnvironmentType eEnvType = aRule.aEnvType; + EnvironmentType eEnvType = aRule.aEnvType; // Check if environment type has a higher priority than current one! if ( nPrioCurrentRule > aEnvPrioTable[eEnvType] ) @@ -433,13 +434,13 @@ sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector aHostStr = aHostStr.toAsciiLowerCase(); // Pattern match if domain environment match - WildCard aPattern(aHostStr); - sal_Bool bMatch = aPattern.Matches(aHost); + WildCard aPattern(aHostStr); + bool bMatch = aPattern.Matches(aHost); if ( bMatch ) { - aActiveRule = aRule; - bResult = sal_True; - nPrioCurrentRule = aEnvPrioTable[eEnvType]; + aActiveRule = aRule; + bResult = true; + nPrioCurrentRule = aEnvPrioTable[eEnvType]; } } break; @@ -462,13 +463,13 @@ sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector aDomain = GetNTDomainName(); // Pattern match if domain environment match - WildCard aPattern(aDomainStr); - sal_Bool bMatch = aPattern.Matches(aDomain); + WildCard aPattern(aDomainStr); + bool bMatch = aPattern.Matches(aDomain); if ( bMatch ) { - aActiveRule = aRule; - bResult = sal_True; - nPrioCurrentRule = aEnvPrioTable[eEnvType]; + aActiveRule = aRule; + bResult = true; + nPrioCurrentRule = aEnvPrioTable[eEnvType]; } } break; @@ -481,24 +482,24 @@ sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector sal_Int16 nValue = 0; aRule.aEnvValue >>= nValue; - sal_Bool bUnix = ( eOSType == OS_LINUX ) || ( eOSType == OS_SOLARIS ); + bool bUnix = ( eOSType == OS_LINUX ) || ( eOSType == OS_SOLARIS ); OperatingSystem eRuleOSType = (OperatingSystem)nValue; // Match if OS identical or rule is set to UNIX and OS is LINUX/SOLARIS! if (( eRuleOSType == eOSType ) || ( eRuleOSType == OS_UNIX && bUnix )) { - aActiveRule = aRule; - bResult = sal_True; - nPrioCurrentRule = aEnvPrioTable[eEnvType]; + aActiveRule = aRule; + bResult = true; + nPrioCurrentRule = aEnvPrioTable[eEnvType]; } } break; - case ET_UNKNOWN: // nothing to do - break; + case ET_UNKNOWN: // nothing to do + break; - default: - break; + default: + break; } } } @@ -514,9 +515,9 @@ void SubstitutePathVariables_Impl::ReadSharePointsFromConfiguration( Sequence< r } void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration( - const rtl::OUString& aSharePointName, - const rtl::OUString& aSharePointNodeName, - SubstituteRuleVector& rRuleSet ) + const rtl::OUString& aSharePointName, + const rtl::OUString& aSharePointNodeName, + SubstituteRuleVector& rRuleSet ) { Sequence< rtl::OUString > aSharePointMappingsNodeNames = GetNodeNames( aSharePointNodeName, utl::CONFIG_NAME_LOCAL_PATH ); @@ -569,7 +570,7 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration( } // Decode the environment and optional the operatng system settings - Any aEnvValue; + Any aEnvValue; EnvironmentType eEnvType = GetEnvTypeFromString( aEnvUsed ); if ( eEnvType == ET_OS ) { @@ -588,13 +589,12 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration( } //***************************************************************************************************************** -// XInterface, XTypeProvider, XServiceInfo +// XInterface, XTypeProvider, XServiceInfo //***************************************************************************************************************** -DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( SubstitutePathVariables , - ::cppu::OWeakObject , - SERVICENAME_SUBSTITUTEPATHVARIABLES , - IMPLEMENTATIONNAME_SUBSTITUTEPATHVARIABLES - ) +DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( SubstitutePathVariables , + ::cppu::OWeakObject , + SERVICENAME_SUBSTITUTEPATHVARIABLES , + IMPLEMENTATIONNAME_SUBSTITUTEPATHVARIABLES ) DEFINE_INIT_SERVICE ( SubstitutePathVariables, {} ) @@ -626,16 +626,15 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XMultiService // Sort predefined/fixed variable to path length for ( i = 0; i < PREDEFVAR_COUNT; i++ ) { - if (( i != PREDEFVAR_WORKDIRURL ) && - ( i != PREDEFVAR_PATH )) + if (( i != PREDEFVAR_WORKDIRURL ) && ( i != PREDEFVAR_PATH )) { // Special path variables, don't include into automatic resubstituion search! // $(workdirurl) is not allowed to resubstitute! This variable is the value of path settings entry // and it could be possible that it will be resubstituted by itself!! // Example: WORK_PATH=c:\test, $(workdirurl)=WORK_PATH => WORK_PATH=$(workdirurl) and this cannot be substituted! ReSubstFixedVarOrder aFixedVar; - aFixedVar.eVariable = aFixedVarTable[i].nEnumValue; - aFixedVar.nVarValueLength = m_aPreDefVars.m_FixedVar[(sal_Int32)aFixedVar.eVariable].getLength(); + aFixedVar.eVariable = aFixedVarTable[i].nEnumValue; + aFixedVar.nVarValueLength = m_aPreDefVars.m_FixedVar[(sal_Int32)aFixedVar.eVariable].getLength(); m_aReSubstFixedVarOrder.push_back( aFixedVar ); } } @@ -650,8 +649,8 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XMultiService aStrBuffer.append( m_aVarStart ); aStrBuffer.append( pIter->second.aSubstVariable ); aStrBuffer.append( m_aVarEnd ); - aUserOrderVar.aVarName = aStrBuffer.makeStringAndClear(); - aUserOrderVar.nVarValueLength = pIter->second.aSubstVariable.getLength(); + aUserOrderVar.aVarName = aStrBuffer.makeStringAndClear(); + aUserOrderVar.nVarValueLength = pIter->second.aSubstVariable.getLength(); m_aReSubstUserVarOrder.push_back( aUserOrderVar ); } m_aReSubstUserVarOrder.sort(); @@ -687,7 +686,7 @@ throw ( NoSuchElementException, RuntimeException ) } //_________________________________________________________________________________________________________________ -// protected methods +// protected methods //_________________________________________________________________________________________________________________ // @@ -702,7 +701,7 @@ IMPL_LINK( SubstitutePathVariables, implts_ConfigurationNotify, SubstitutePathNo rtl::OUString SubstitutePathVariables::ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::ConvertOSLtoUCBURL" ); - String aResult; + String aResult; rtl::OUString aTemp; osl::FileBase::getSystemPathFromFileURL( aOSLCompliantURL, aTemp ); @@ -718,7 +717,7 @@ rtl::OUString SubstitutePathVariables::ConvertOSLtoUCBURL( const rtl::OUString& rtl::OUString SubstitutePathVariables::GetWorkPath() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::GetWorkPath" ); - rtl::OUString aWorkPath; + rtl::OUString aWorkPath; ::comphelper::ConfigurationHelper::readDirectKey( m_xServiceManager, ::rtl::OUString::createFromAscii("org.openoffice.Office.Paths"), @@ -739,7 +738,7 @@ rtl::OUString SubstitutePathVariables::GetWorkVariableValue() const ::rtl::OUString::createFromAscii("Work"), ::comphelper::ConfigurationHelper::E_READONLY) >>= aWorkPath; - // fallback to $HOME in case platform dependend config layer does not return + // fallback to $HOME in case platform dependend config layer does not return // an usuable work dir value. if (aWorkPath.getLength() < 1) { @@ -773,7 +772,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const rtl::OUString aPathList( pEnv, strlen( pEnv ), gsl_getSystemTextEncoding() ); rtl::OUStringBuffer aPathStrBuffer( aPathList.getLength() * PATH_EXTEND_FACTOR / 100 ); - sal_Bool bAppendSep = sal_False; + bool bAppendSep = false; sal_Int32 nToken = 0; do { @@ -784,7 +783,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const if ( bAppendSep ) aPathStrBuffer.appendAscii( ";" ); // Office uses ';' as path separator aPathStrBuffer.append( aTmp ); - bAppendSep = sal_True; + bAppendSep = true; } } while(nToken>=0); @@ -795,7 +794,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const return aRetStr; } -rtl::OUString SubstitutePathVariables::impl_substituteVariable( const ::rtl::OUString& rText, sal_Bool bSubstRequired ) +rtl::OUString SubstitutePathVariables::impl_substituteVariable( const ::rtl::OUString& rText, bool bSubstRequired ) throw ( NoSuchElementException, RuntimeException ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::impl_substituteVariable" ); @@ -811,9 +810,9 @@ throw ( NoSuchElementException, RuntimeException ) // Search for first occure of "$(...". sal_Int32 nDepth = 0; sal_Int32 bSubstitutionCompleted = sal_False; - sal_Int32 nPosition = aWorkText.indexOf( m_aVarStart ); // = first position of "$(" in string + sal_Int32 nPosition = aWorkText.indexOf( m_aVarStart ); // = first position of "$(" in string sal_Int32 nLength = 0; // = count of letters from "$(" to ")" in string - sal_Bool bVarNotSubstituted = sal_False; + bool bVarNotSubstituted = false; // Have we found any variable like "$(...)"? if ( nPosition != STRPOS_NOTFOUND ) @@ -826,17 +825,17 @@ throw ( NoSuchElementException, RuntimeException ) } // Is there something to replace ? - sal_Bool bWorkRetrieved = sal_False; - sal_Bool bWorkDirURLRetrieved = sal_False; + bool bWorkRetrieved = false; + bool bWorkDirURLRetrieved = false; while ( !bSubstitutionCompleted && nDepth < nMaxRecursiveDepth ) { while ( ( nPosition != STRPOS_NOTFOUND ) && ( nLength > 3 ) ) // "$(" ")" { // YES; Get the next variable for replace. - sal_Int32 nReplaceLength = 0; - rtl::OUString aReplacement; - rtl::OUString aSubString = aWorkText.copy( nPosition, nLength ); - rtl::OUString aSubVarString; + sal_Int32 nReplaceLength = 0; + rtl::OUString aReplacement; + rtl::OUString aSubString = aWorkText.copy( nPosition, nLength ); + rtl::OUString aSubVarString; // Path variables are not case sensitive! aSubVarString = aSubString.toAsciiLowerCase(); @@ -851,17 +850,24 @@ throw ( NoSuchElementException, RuntimeException ) { // Transient value, retrieve it again m_aPreDefVars.m_FixedVar[ (PreDefVariable)nIndex ] = GetWorkVariableValue(); - bWorkRetrieved = sal_True; + bWorkRetrieved = true; } else if ( nIndex == PREDEFVAR_WORKDIRURL && !bWorkDirURLRetrieved ) { // Transient value, retrieve it again m_aPreDefVars.m_FixedVar[ (PreDefVariable)nIndex ] = GetWorkPath(); - bWorkDirURLRetrieved = sal_True; + bWorkDirURLRetrieved = true; } - aReplacement = m_aPreDefVars.m_FixedVar[ (PreDefVariable)nIndex ]; - nReplaceLength = nLength; + // Check preconditions to substitue path variables. + // 1. A path variable can only be substituted if it follows a SEARCHPATH_DELIMITER ';'! + // 2. It's located exactly at the start of the string being substituted! + if (( aFixedVarTable[ int( nIndex ) ].bAbsPath && (( nPosition == 0 ) || (( nPosition > 0 ) && ( aWorkText[nPosition-1] == ';')))) || + ( !aFixedVarTable[ int( nIndex ) ].bAbsPath )) + { + aReplacement = m_aPreDefVars.m_FixedVar[ (PreDefVariable)nIndex ]; + nReplaceLength = nLength; + } } else { @@ -870,7 +876,7 @@ throw ( NoSuchElementException, RuntimeException ) SubstituteVariables::const_iterator pIter = m_aSubstVarMap.find( aVarName ); if ( pIter != m_aSubstVarMap.end() ) { - // found! + // Found. aReplacement = pIter->second.aSubstValue; nReplaceLength = nLength; } @@ -885,7 +891,7 @@ throw ( NoSuchElementException, RuntimeException ) else { // Variable not known - bVarNotSubstituted = sal_False; + bVarNotSubstituted = false; nPosition += nLength; } @@ -1017,8 +1023,8 @@ throw ( RuntimeException ) } // Due to a recursive definition this code must exchange variables with variables! - sal_Bool bResubstitutionCompleted = sal_False; - sal_Bool bVariableFound = sal_False; + bool bResubstitutionCompleted = false; + bool bVariableFound = false; // Get transient predefined path variable $(work) value before starting resubstitution m_aPreDefVars.m_FixedVar[ PREDEFVAR_WORK ] = GetWorkVariableValue(); @@ -1032,7 +1038,7 @@ throw ( RuntimeException ) sal_Int32 nPos = aURL.indexOf( aValue ); if ( nPos >= 0 ) { - sal_Bool bMatch = sal_True; + bool bMatch = true; if ( pIterFixed->eVariable == PREDEFVAR_LANG || pIterFixed->eVariable == PREDEFVAR_LANGID || pIterFixed->eVariable == PREDEFVAR_VLANG ) @@ -1058,7 +1064,7 @@ throw ( RuntimeException ) aStrBuffer.append( m_aPreDefVars.m_FixedVarNames[ (sal_Int32)pIterFixed->eVariable ] ); // Get the variable name for struct var name array! aStrBuffer.append( aURL.copy( nPos + aValue.getLength(), ( aURL.getLength() - ( nPos + aValue.getLength() )) )); aURL = aStrBuffer.makeStringAndClear(); - bVariableFound = sal_True; // Resubstitution not finished yet! + bVariableFound = true; // Resubstitution not finished yet! break; } } @@ -1079,12 +1085,12 @@ throw ( RuntimeException ) aStrBuffer.append( m_aVarEnd ); aStrBuffer.append( aURL.copy( nPos + aVarValue.getLength(), ( aURL.getLength() - ( nPos + aVarValue.getLength() )) )); aURL = aStrBuffer.makeStringAndClear(); - bVariableFound = sal_True; // Resubstitution not finished yet! + bVariableFound = true; // Resubstitution not finished yet! } } if ( !bVariableFound ) - bResubstitutionCompleted = sal_True; + bResubstitutionCompleted = true; else bVariableFound = sal_False; // Next resubstitution } @@ -1150,7 +1156,7 @@ throw ( NoSuchElementException, RuntimeException ) void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariables& aPreDefPathVariables ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::SetPredefinedPathVariables" ); - Any aAny; + Any aAny; ::rtl::OUString aOfficePath; ::rtl::OUString aUserPath; ::rtl::OUString aTmp; @@ -1194,14 +1200,12 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable // Detect the program directory // Set $(prog), $(progpath), $(progurl) INetURLObject aProgObj( - aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTPATH ] ); - if ( !aProgObj.HasError() && - aProgObj.insertName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("program")) ) ) + aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTPATH ] ); + if ( !aProgObj.HasError() && aProgObj.insertName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("program")) ) ) { - aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::NO_DECODE); - aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGURL ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ]; - aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROG ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ]; + aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::NO_DECODE); + aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGURL ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ]; + aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROG ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ]; } // Detect the language type of the current office @@ -1216,7 +1220,8 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable // Set $(lang) aPreDefPathVariables.m_FixedVar[ PREDEFVAR_LANG ] = ConvertOSLtoUCBURL( - rtl::OUString::createFromAscii( ResMgr::GetLang( aPreDefPathVariables.m_eLanguageType, 0 ) )); + rtl::OUString::createFromAscii( ResMgr::GetLang( aPreDefPathVariables.m_eLanguageType, 0 ) )); + // Set $(vlang) aPreDefPathVariables.m_FixedVar[ PREDEFVAR_VLANG ] = aLocaleStr; @@ -1241,7 +1246,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable aPreDefPathVariables.m_FixedVar[ PREDEFVAR_TEMP ] = ConvertOSLtoUCBURL( aTmp ); aPreDefPathVariables.m_FixedVar[PREDEFVAR_BRANDBASEURL] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR")); + RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR")); rtl::Bootstrap::expandMacros( aPreDefPathVariables.m_FixedVar[PREDEFVAR_BRANDBASEURL]); } diff --git a/officecfg/registry/data/org/openoffice/Office/Canvas.xcu b/officecfg/registry/data/org/openoffice/Office/Canvas.xcu index 00030d71bf9b..a51ff5b244c8 100755 --- a/officecfg/registry/data/org/openoffice/Office/Canvas.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Canvas.xcu @@ -14,6 +14,8 @@ <value> <!-- Matrox G550 - blank display on 2nd head --> 4139 9511 260313131 1 5 13 1 1320 + <!-- Matrox G550 - blank display (single head?) --> + 4139 9511 255987755 1 6 12 1 1930 <!-- Matrox G400 - random crashes --> 4139 1317 54005803 4 5 12 1 1200 <!-- Mobility Radeon M6 16MB - blank screen 1st slide on internal LCD --> diff --git a/scripting/java/com/sun/star/script/framework/provider/SwingInvocation.java b/scripting/java/com/sun/star/script/framework/provider/SwingInvocation.java new file mode 100644 index 000000000000..fffb78523798 --- /dev/null +++ b/scripting/java/com/sun/star/script/framework/provider/SwingInvocation.java @@ -0,0 +1,44 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +package com.sun.star.script.framework.provider; + +import javax.swing.SwingUtilities; + +// On Mac OS X, AWT/Swing must not be accessed from the AppKit thread, so call +// SwingUtilities.invokeLater always on a fresh thread to avoid that problem +// (also, the current thread must not wait for that fresh thread to terminate, +// as that would cause a deadlock if this thread is the AppKit thread): +public final class SwingInvocation { + public static void invoke(final Runnable doRun) { + new Thread("SwingInvocation") { + public void run() { SwingUtilities.invokeLater(doRun); } + }.start(); + } + + private SwingInvocation() {} +} diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java index 4fd5d85ac28d..167e9297e861 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java @@ -47,6 +47,7 @@ import java.util.HashMap; import com.sun.star.script.provider.XScriptContext; import com.sun.star.script.framework.provider.ScriptEditor; +import com.sun.star.script.framework.provider.SwingInvocation; import com.sun.star.script.framework.container.ScriptMetaData; import com.sun.star.script.framework.provider.ClassLoaderFactory; @@ -128,7 +129,9 @@ public class ScriptEditorForBeanShell */ public static ScriptEditorForBeanShell getEditor(URL url) { - return (ScriptEditorForBeanShell)BEING_EDITED.get(url); + synchronized (BEING_EDITED) { + return (ScriptEditorForBeanShell)BEING_EDITED.get(url); + } } /** @@ -194,8 +197,7 @@ public class ScriptEditorForBeanShell * @param context The context in which to execute the script * */ - public void edit(XScriptContext context, ScriptMetaData entry) { - + public void edit(final XScriptContext context, ScriptMetaData entry) { if (entry != null ) { try { ClassLoader cl = null; @@ -205,26 +207,30 @@ public class ScriptEditorForBeanShell catch (Exception ignore) // TODO re-examine error handling { } + final ClassLoader theCl = cl; String sUrl = entry.getParcelLocation(); if ( !sUrl.endsWith( "/" ) ) { sUrl += "/"; } sUrl += entry.getLanguageName(); - URL url = entry.getSourceURL(); - - // check if there is already an editing session for this script - if (BEING_EDITED.containsKey(url)) - { - ScriptEditorForBeanShell editor = - (ScriptEditorForBeanShell) BEING_EDITED.get(url); - - editor.frame.toFront(); - } - else - { - new ScriptEditorForBeanShell(context, cl, url); - } + final URL url = entry.getSourceURL(); + SwingInvocation.invoke( + new Runnable() { + public void run() { + ScriptEditorForBeanShell editor; + synchronized (BEING_EDITED) { + editor = (ScriptEditorForBeanShell) + BEING_EDITED.get(url); + if (editor == null) { + editor = new ScriptEditorForBeanShell( + context, theCl, url); + BEING_EDITED.put(url, editor); + } + } + editor.frame.toFront(); + } + }); } catch (IOException ioe) { showErrorMessage( "Error loading file: " + ioe.getMessage() ); @@ -269,8 +275,6 @@ public class ScriptEditorForBeanShell this.model.setView(this.view); initUI(); frame.show(); - - BEING_EDITED.put(url, this); } private void showErrorMessage(String message) { @@ -384,7 +388,7 @@ public class ScriptEditorForBeanShell private void shutdown() { - if (BEING_EDITED.containsKey(scriptURL)) { + synchronized (BEING_EDITED) { BEING_EDITED.remove(scriptURL); } } diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java index b9849d1e4e1d..0b62ece9cc9f 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java @@ -36,6 +36,7 @@ import org.mozilla.javascript.tools.debugger.ScopeProvider; import com.sun.star.script.provider.XScriptContext; import com.sun.star.script.framework.container.ScriptMetaData; import com.sun.star.script.framework.provider.ScriptEditor; +import com.sun.star.script.framework.provider.SwingInvocation; import com.sun.star.script.framework.log.LogUtils; import java.io.InputStream; @@ -45,7 +46,6 @@ import java.net.URL; import java.util.Map; import java.util.HashMap; -import javax.swing.SwingUtilities; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; @@ -117,7 +117,9 @@ public class ScriptEditorForJavaScript implements ScriptEditor */ public static ScriptEditorForJavaScript getEditor(URL url) { - return (ScriptEditorForJavaScript)BEING_EDITED.get(url); + synchronized (BEING_EDITED) { + return (ScriptEditorForJavaScript)BEING_EDITED.get(url); + } } /** @@ -187,31 +189,25 @@ public class ScriptEditorForJavaScript implements ScriptEditor sUrl += "/"; } sUrl += entry.getLanguageName(); - URL url = entry.getSourceURL(); - - // check if there is already an editing session for this script - //if (BEING_EDITED.containsKey(url)) - if ( rhinoWindow != null ) - { - ScriptEditorForJavaScript editor = - (ScriptEditorForJavaScript) BEING_EDITED.get(url); - if ( editor == null ) - { - editor = new ScriptEditorForJavaScript( context, url ); - editor.edit( context, entry ); - } - else - { - rhinoWindow.showScriptWindow( url ); - } - } - else - { - ScriptEditorForJavaScript editor = - new ScriptEditorForJavaScript( context, url ); - - } - rhinoWindow.toFront(); + final URL url = entry.getSourceURL(); + SwingInvocation.invoke( + new Runnable() { + public void run() { + synchronized (BEING_EDITED) { + ScriptEditorForJavaScript editor = + (ScriptEditorForJavaScript) BEING_EDITED.get( + url); + if (editor == null) { + editor = new ScriptEditorForJavaScript( + context, url); + BEING_EDITED.put(url, editor); + } + } + assert rhinoWindow != null; + rhinoWindow.showScriptWindow(url); + rhinoWindow.toFront(); + } + }); } catch ( IOException e ) { @@ -234,11 +230,6 @@ public class ScriptEditorForJavaScript implements ScriptEditor this.scriptURL = url; - synchronized( ScriptEditorForJavaScript.class ) - { - BEING_EDITED.put(url, this); - } - } /** @@ -274,13 +265,9 @@ public class ScriptEditorForJavaScript implements ScriptEditor } final Main sdb = new Main("Rhino JavaScript Debugger"); - swingInvoke(new Runnable() { - public void run() { - sdb.pack(); - sdb.setSize(640, 640); - sdb.setVisible(true); - } - }); + sdb.pack(); + sdb.setSize(640, 640); + sdb.setVisible(true); sdb.setExitAction(new Runnable() { public void run() { sdb.clearAllBreakpoints(); @@ -306,18 +293,6 @@ public class ScriptEditorForJavaScript implements ScriptEditor } } - private static void swingInvoke(Runnable f) { - if (SwingUtilities.isEventDispatchThread()) { - f.run(); - return; - } - try { - SwingUtilities.invokeAndWait(f); - } catch (Exception exc) { - LogUtils.DEBUG( LogUtils.getTrace( exc ) ); - } - } - private void shutdown() { // dereference Rhino Debugger window diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk new file mode 100644 index 000000000000..b53a04ec43f9 --- /dev/null +++ b/sfx2/qa/cppunit/makefile.mk @@ -0,0 +1,86 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ=../.. +PRJNAME=sfx2 +TARGET=qa_cppunit + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +#building with stlport, but cppunit was not built with stlport +.IF "$(USE_SYSTEM_STL)"!="YES" +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGSCXX+=-DADAPT_EXT_STL +.ENDIF +.ENDIF + +CFLAGSCXX += $(CPPUNIT_CFLAGS) +DLLPRE = # no leading "lib" on .so files + +# --- Libs --------------------------------------------------------- + +SHL1OBJS= \ + $(SLO)/test_metadatable.obj \ + + +SHL1STDLIBS= \ + $(CPPUNITLIB) \ + $(SALLIB) \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(VCLLIB) \ + $(SFXLIB) \ + + +SHL1TARGET= test_metadatable +SHL1RPATH = NONE +SHL1IMPLIB= i$(SHL1TARGET) +# SHL1DEF= $(MISC)/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +# DEF1EXPORTFILE= export.exp +SHL1VERSIONMAP= version.map + +# --- All object files --------------------------------------------- + +SLOFILES= \ + $(SHL1OBJS) \ + + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk +.INCLUDE : _cppunit.mk + +.END diff --git a/sfx2/qa/unoapi/makefile.mk b/sfx2/qa/unoapi/makefile.mk new file mode 100644 index 000000000000..ea91ba4d1c44 --- /dev/null +++ b/sfx2/qa/unoapi/makefile.mk @@ -0,0 +1,48 @@ +#************************************************************************* +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +#***********************************************************************/ + +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ = ../.. +PRJNAME = sfx2 +TARGET = qa_unoapi + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = org/openoffice/sfx2/qa/unoapi +JAVATESTFILES = Test.java +JAVAFILES = $(JAVATESTFILES) +JARFILES = OOoRunner.jar ridl.jar test.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END + +.INCLUDE: settings.mk +.INCLUDE: target.mk +.INCLUDE: installationtest.mk + +ALLTAR : javatest + +.END diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index f18e903eb6e4..41b969fc1e59 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1142,7 +1142,6 @@ void SAL_CALL SfxDocumentMetaData::init( m_isInitialized = false; m_xDoc = i_xDoc; - m_xDoc->normalize(); // select nodes for standard meta data stuff xPath->registerNS(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("xlink")), @@ -1171,26 +1170,49 @@ void SAL_CALL SfxDocumentMetaData::init( if (!m_xParent.is()) { // all this create/append stuff may throw DOMException try { - css::uno::Reference<css::xml::dom::XElement> xRElem( - i_xDoc->createElementNS( + css::uno::Reference<css::xml::dom::XElement> xRElem; + css::uno::Reference<css::xml::dom::XNode> xNode( + i_xDoc->getFirstChild()); + while (xNode.is()) { + if (css::xml::dom::NodeType_ELEMENT_NODE ==xNode->getNodeType()) + { + if (xNode->getNamespaceURI().equalsAscii(s_nsODF) && + xNode->getLocalName().equalsAscii("document-meta")) + { + xRElem.set(xNode, css::uno::UNO_QUERY_THROW); + break; + } + else + { + OSL_TRACE("SfxDocumentMetaData::init(): " + "deleting unexpected root element: %s", + ::rtl::OUStringToOString(xNode->getLocalName(), + RTL_TEXTENCODING_UTF8).getStr()); + i_xDoc->removeChild(xNode); + xNode = i_xDoc->getFirstChild(); // start over + } + } else { + xNode = xNode->getNextSibling(); + } + } + if (!xRElem.is()) { + xRElem = i_xDoc->createElementNS( ::rtl::OUString::createFromAscii(s_nsODF), - ::rtl::OUString::createFromAscii("office:document-meta"))); - css::uno::Reference<css::xml::dom::XNode> xRNode(xRElem, - css::uno::UNO_QUERY_THROW); - // NB: the following is a _bad_idea_ with our DOM implementation - // do _not_ create attributes with xmlns prefix! -// xRElem->setAttribute(::rtl::OUString::createFromAscii("xmlns:office"), -// ::rtl::OUString::createFromAscii(s_nsODF)); + ::rtl::OUString::createFromAscii("office:document-meta")); + css::uno::Reference<css::xml::dom::XNode> xRNode(xRElem, + css::uno::UNO_QUERY_THROW); + i_xDoc->appendChild(xRNode); + } xRElem->setAttributeNS(::rtl::OUString::createFromAscii(s_nsODF), ::rtl::OUString::createFromAscii("office:version"), ::rtl::OUString::createFromAscii("1.0")); - i_xDoc->appendChild(xRNode); + // does not exist, otherwise m_xParent would not be null css::uno::Reference<css::xml::dom::XNode> xParent ( i_xDoc->createElementNS( ::rtl::OUString::createFromAscii(s_nsODF), ::rtl::OUString::createFromAscii("office:meta")), css::uno::UNO_QUERY_THROW); - xRNode->appendChild(xParent); + xRElem->appendChild(xParent); m_xParent = xParent; } catch (css::xml::dom::DOMException & e) { css::uno::Any a(e); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 515149c5a2d3..b125efc87267 100644..100755 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -191,15 +191,19 @@ SfxPrinterController::~SfxPrinterController() const Any& SfxPrinterController::getSelectionObject() const { + const beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) ) ); + if( pVal ) + { + sal_Bool bSel = sal_False; + pVal->Value >>= bSel; + return bSel ? maSelection : maCompleteSelection; + } + sal_Int32 nChoice = 0; - sal_Bool bSel = sal_False; - const beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ) ); + pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ) ); if( pVal ) pVal->Value >>= nChoice; - pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) ) ); - if( pVal ) - pVal->Value >>= bSel; - return (nChoice > 1 || bSel) ? maSelection : maCompleteSelection; + return (nChoice > 1) ? maSelection : maCompleteSelection; } Sequence< beans::PropertyValue > SfxPrinterController::getMergedOptions() const @@ -307,6 +311,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt { if ( mpObjectShell ) { + bool bCopyJobSetup = false; mpObjectShell->Broadcast( SfxPrintingHint( nState ) ); switch ( nState ) { @@ -334,6 +339,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt rBind.Invalidate( SID_PRINTDOC ); rBind.Invalidate( SID_PRINTDOCDIRECT ); rBind.Invalidate( SID_SETUPPRINTER ); + bCopyJobSetup = true; break; } @@ -341,6 +347,22 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt break; } + if( bCopyJobSetup && mpViewShell ) + { + SfxPrinter* pDocPrt = mpViewShell->GetPrinter(sal_False); + if( pDocPrt ) + { + if( pDocPrt->GetName() == getPrinter()->GetName() ) + pDocPrt->SetJobSetup( getPrinter()->GetJobSetup() ); + else + { + SfxPrinter* pNewPrt = new SfxPrinter( pDocPrt->GetOptions().Clone(), getPrinter()->GetName() ); + pNewPrt->SetJobSetup( getPrinter()->GetJobSetup() ); + mpViewShell->SetPrinter( pNewPrt, SFX_PRINTER_PRINTER | SFX_PRINTER_JOBSETUP ); + } + } + } + if ( m_bNeedsChange ) mpObjectShell->EnableSetModified( m_bOrigStatus ); @@ -704,10 +726,18 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) } } } - sal_Int32 nLen = aProps.getLength(); - aProps.realloc( nLen + 1 ); - aProps[nLen].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) ); - aProps[nLen].Value = makeAny( bSelection ); + // HACK: writer sets the SID_SELECTION item when printing directly and expects + // to get only the selection document in that case (see getSelectionObject) + // however it also reacts to the PrintContent property. We need this distinction here, too, + // else one of the combinations print / print direct and selection / all will not work. + // it would be better if writer handled this internally + if( nId == SID_PRINTDOCDIRECT ) + { + sal_Int32 nLen = aProps.getLength(); + aProps.realloc( nLen + 1 ); + aProps[nLen].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) ); + aProps[nLen].Value = makeAny( bSelection ); + } ExecPrint( aProps, bIsAPI, (nId == SID_PRINTDOCDIRECT) ); diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 4fbd1f3c288e..abc25d865d06 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -2803,7 +2803,7 @@ void SvxRuler::EvalModifier() const RulerType eType = GetDragType(); nDragType = DRAG_OBJECT_SIZE_PROPORTIONAL; if( RULER_TYPE_TAB == eType || - ( ( RULER_TYPE_BORDER == eType || RULER_TYPE_MARGIN1 == eType ) && + ( ( RULER_TYPE_BORDER == eType || RULER_TYPE_MARGIN1 == eType || RULER_TYPE_MARGIN2 == eType) && pColumnItem ) ) PrepareProportional_Impl(eType); break; diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx index 4f51e111c2c3..b10eac69bc54 100644..100755 --- a/svx/source/mnuctrls/fntctl.cxx +++ b/svx/source/mnuctrls/fntctl.cxx @@ -148,7 +148,7 @@ void SvxFontMenuControl::Notify( SfxBroadcaster&, const SfxHint& rHint ) IMPL_LINK_INLINE_START( SvxFontMenuControl, MenuSelect, FontNameMenu *, pMen ) { SvxFontItem aItem( GetId() ); - aItem.GetFamilyName() = pMen->GetCurName(); + aItem.SetFamilyName(pMen->GetCurName()); GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_RECORD, &aItem, 0L ); return 0; } diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index a951819104aa..82cd950bbbed 100644..100755 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -1258,9 +1258,9 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) case ITEM_XCOLOR: break; case ITEM_COLOR: break; case ITEM_FONT: { - ((SvxFontItem*)pNewItem)->GetFamily()=FAMILY_DONTKNOW; - ((SvxFontItem*)pNewItem)->GetFamilyName()=aNewText; - ((SvxFontItem*)pNewItem)->GetStyleName().Erase(); + ((SvxFontItem*)pNewItem)->SetFamily( FAMILY_DONTKNOW ); + ((SvxFontItem*)pNewItem)->SetFamilyName(aNewText); + ((SvxFontItem*)pNewItem)->SetStyleName( String() ); } break; case ITEM_FONTHEIGHT: { sal_uIntPtr nHgt=0; diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 5328e5f1a3d1..30628a10df86 100644..100755 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -836,11 +836,11 @@ void ImpGetDefaultFontsLanguage( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFo aOutTypeArr[ n ].nFntType, aOutTypeArr[ n ].nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0 )); SvxFontItem* pI = aItemArr[ n ]; - pI->GetFamily() = aFnt.GetFamily(); - pI->GetFamilyName() = aFnt.GetName(); - pI->GetStyleName().Erase(); - pI->GetPitch() = aFnt.GetPitch(); - pI->GetCharSet() = aFnt.GetCharSet(); + pI->SetFamily( aFnt.GetFamily()); + pI->SetFamilyName( aFnt.GetName()); + pI->SetStyleName( String() ); + pI->SetPitch( aFnt.GetPitch()); + pI->SetCharSet( aFnt.GetCharSet() ); } } @@ -854,29 +854,29 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt // get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); - aSvxFontItem.GetFamily() = aFont.GetFamily(); - aSvxFontItem.GetFamilyName() = aFont.GetName(); - aSvxFontItem.GetStyleName().Erase(); - aSvxFontItem.GetPitch() = aFont.GetPitch(); - aSvxFontItem.GetCharSet() = aFont.GetCharSet(); + aSvxFontItem.SetFamily(aFont.GetFamily()); + aSvxFontItem.SetFamilyName(aFont.GetName()); + aSvxFontItem.SetStyleName(String()); + aSvxFontItem.SetPitch( aFont.GetPitch()); + aSvxFontItem.SetCharSet( aFont.GetCharSet() ); pItemPool->SetPoolDefaultItem(aSvxFontItem); // get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default Font aFontCJK(OutputDevice::GetDefaultFont(DEFAULTFONT_CJK_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); - aSvxFontItemCJK.GetFamily() = aFontCJK.GetFamily(); - aSvxFontItemCJK.GetFamilyName() = aFontCJK.GetName(); - aSvxFontItemCJK.GetStyleName().Erase(); - aSvxFontItemCJK.GetPitch() = aFontCJK.GetPitch(); - aSvxFontItemCJK.GetCharSet() = aFontCJK.GetCharSet(); + aSvxFontItemCJK.SetFamily( aFontCJK.GetFamily()); + aSvxFontItemCJK.SetFamilyName(aFontCJK.GetName()); + aSvxFontItemCJK.SetStyleName(String()); + aSvxFontItemCJK.SetPitch( aFontCJK.GetPitch()); + aSvxFontItemCJK.SetCharSet( aFontCJK.GetCharSet()); pItemPool->SetPoolDefaultItem(aSvxFontItemCJK); // get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default Font aFontCTL(OutputDevice::GetDefaultFont(DEFAULTFONT_CTL_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); - aSvxFontItemCTL.GetFamily() = aFontCTL.GetFamily(); - aSvxFontItemCTL.GetFamilyName() = aFontCTL.GetName(); - aSvxFontItemCTL.GetStyleName().Erase(); - aSvxFontItemCTL.GetPitch() = aFontCTL.GetPitch(); - aSvxFontItemCTL.GetCharSet() = aFontCTL.GetCharSet(); + aSvxFontItemCTL.SetFamily(aFontCTL.GetFamily()); + aSvxFontItemCTL.SetFamilyName(aFontCTL.GetName()); + aSvxFontItemCTL.SetStyleName(String()); + aSvxFontItemCTL.SetPitch( aFontCTL.GetPitch() ); + aSvxFontItemCTL.SetCharSet( aFontCTL.GetCharSet()); pItemPool->SetPoolDefaultItem(aSvxFontItemCTL); // set dynamic FontHeight defaults diff --git a/sysui/desktop/icons/makefile.mk b/sysui/desktop/icons/makefile.mk index ac32cdbe453b..ce5b0b70b636 100644 --- a/sysui/desktop/icons/makefile.mk +++ b/sysui/desktop/icons/makefile.mk @@ -127,69 +127,6 @@ all: \ $(MISC)$/ooo11-math-doc.ico \ $(MISC)$/ooo11-writer-doc.ico \ $(MISC)$/ooo11-writer-tem.ico \ - $(MISC)$/so8-base-app.ico \ - $(MISC)$/so8-base-doc.ico \ - $(MISC)$/so8-calc-app.ico \ - $(MISC)$/so8-calc-doc.ico \ - $(MISC)$/so8-calc-tem.ico \ - $(MISC)$/so8-chart-doc.ico \ - $(MISC)$/so8-configuration.ico \ - $(MISC)$/so8-draw-app.ico \ - $(MISC)$/so8-draw-doc.ico \ - $(MISC)$/so8-draw-tem.ico \ - $(MISC)$/so8-empty-doc.ico \ - $(MISC)$/so8-empty-tem.ico \ - $(MISC)$/so8-image-doc.ico \ - $(MISC)$/so8-impress-app.ico \ - $(MISC)$/so8-impress-doc.ico \ - $(MISC)$/so8-impress-tem.ico \ - $(MISC)$/so8-macro-doc.ico \ - $(MISC)$/so8-main-app.ico \ - $(MISC)$/so8-master-doc.ico \ - $(MISC)$/so8-math-app.ico \ - $(MISC)$/so8-math-doc.ico \ - $(MISC)$/so8-open.ico \ - $(MISC)$/so8-printer.ico \ - $(MISC)$/so8-web-doc.ico \ - $(MISC)$/so8-writer-app.ico \ - $(MISC)$/so8-writer-doc.ico \ - $(MISC)$/so8-writer-tem.ico \ - $(MISC)$/so9_empty_tem.ico \ - $(MISC)$/so9_math_app.ico \ - $(MISC)$/so9_global_doc.ico \ - $(MISC)$/so9_main_app.ico \ - $(MISC)$/so9_empty_doc.ico \ - $(MISC)$/so9_math_doc.ico \ - $(MISC)$/so9_base_app.ico \ - $(MISC)$/so9_html_doc.ico \ - $(MISC)$/so9_impress_doc.ico \ - $(MISC)$/so9_draw_tem.ico \ - $(MISC)$/so9_writer_tem.ico \ - $(MISC)$/so9_impress_app.ico \ - $(MISC)$/so9_calc_tem.ico \ - $(MISC)$/so9_base_doc.ico \ - $(MISC)$/so9_macro_doc.ico \ - $(MISC)$/so9_calc_doc.ico \ - $(MISC)$/so9_draw_doc.ico \ - $(MISC)$/so9_writer_doc.ico \ - $(MISC)$/so9_calc_app.ico \ - $(MISC)$/so9_impress_tem.ico \ - $(MISC)$/so9_chart_doc.ico \ - $(MISC)$/so9_writer_app.ico \ - $(MISC)$/so9_draw_app.ico \ - $(MISC)$/so9_open.ico \ - $(MISC)$/so7-base-doc.ico \ - $(MISC)$/so7-calc-doc.ico \ - $(MISC)$/so7-calc-tem.ico \ - $(MISC)$/so7-chart-doc.ico \ - $(MISC)$/so7-draw-doc.ico \ - $(MISC)$/so7-draw-tem.ico \ - $(MISC)$/so7-impress-doc.ico \ - $(MISC)$/so7-impress-tem.ico \ - $(MISC)$/so7-master-doc.ico \ - $(MISC)$/so7-math-doc.ico \ - $(MISC)$/so7-writer-doc.ico \ - $(MISC)$/so7-writer-tem.ico \ $(MISC)$/oxt-extension.ico $(MISC)$/%.ico: %.ico diff --git a/sysui/desktop/icons/so7-base-doc.ico b/sysui/desktop/icons/so7-base-doc.ico Binary files differdeleted file mode 100755 index e4beab7270e1..000000000000 --- a/sysui/desktop/icons/so7-base-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-calc-doc.ico b/sysui/desktop/icons/so7-calc-doc.ico Binary files differdeleted file mode 100755 index 8b34fc606c5d..000000000000 --- a/sysui/desktop/icons/so7-calc-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-calc-tem.ico b/sysui/desktop/icons/so7-calc-tem.ico Binary files differdeleted file mode 100755 index d074a214a90b..000000000000 --- a/sysui/desktop/icons/so7-calc-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-chart-doc.ico b/sysui/desktop/icons/so7-chart-doc.ico Binary files differdeleted file mode 100755 index bdc613fb30e2..000000000000 --- a/sysui/desktop/icons/so7-chart-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-draw-doc.ico b/sysui/desktop/icons/so7-draw-doc.ico Binary files differdeleted file mode 100755 index c2881862053a..000000000000 --- a/sysui/desktop/icons/so7-draw-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-draw-tem.ico b/sysui/desktop/icons/so7-draw-tem.ico Binary files differdeleted file mode 100755 index 8d713d0f470e..000000000000 --- a/sysui/desktop/icons/so7-draw-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-impress-doc.ico b/sysui/desktop/icons/so7-impress-doc.ico Binary files differdeleted file mode 100755 index a8f9518e624b..000000000000 --- a/sysui/desktop/icons/so7-impress-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-impress-tem.ico b/sysui/desktop/icons/so7-impress-tem.ico Binary files differdeleted file mode 100755 index ac140b269242..000000000000 --- a/sysui/desktop/icons/so7-impress-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-master-doc.ico b/sysui/desktop/icons/so7-master-doc.ico Binary files differdeleted file mode 100755 index 1c3068715990..000000000000 --- a/sysui/desktop/icons/so7-master-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-math-doc.ico b/sysui/desktop/icons/so7-math-doc.ico Binary files differdeleted file mode 100755 index d1cd9bd4c6bd..000000000000 --- a/sysui/desktop/icons/so7-math-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-writer-doc.ico b/sysui/desktop/icons/so7-writer-doc.ico Binary files differdeleted file mode 100755 index b8eb3df20564..000000000000 --- a/sysui/desktop/icons/so7-writer-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so7-writer-tem.ico b/sysui/desktop/icons/so7-writer-tem.ico Binary files differdeleted file mode 100755 index 318cce4bc9a7..000000000000 --- a/sysui/desktop/icons/so7-writer-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-base-app.ico b/sysui/desktop/icons/so8-base-app.ico Binary files differdeleted file mode 100755 index 4a22d3529614..000000000000 --- a/sysui/desktop/icons/so8-base-app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-base-doc.ico b/sysui/desktop/icons/so8-base-doc.ico Binary files differdeleted file mode 100755 index bcddbf957630..000000000000 --- a/sysui/desktop/icons/so8-base-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-calc-app.ico b/sysui/desktop/icons/so8-calc-app.ico Binary files differdeleted file mode 100755 index a28cab56157b..000000000000 --- a/sysui/desktop/icons/so8-calc-app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-calc-doc.ico b/sysui/desktop/icons/so8-calc-doc.ico Binary files differdeleted file mode 100755 index 5f293dd82c30..000000000000 --- a/sysui/desktop/icons/so8-calc-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-calc-tem.ico b/sysui/desktop/icons/so8-calc-tem.ico Binary files differdeleted file mode 100755 index 98bf90678573..000000000000 --- a/sysui/desktop/icons/so8-calc-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-chart-doc.ico b/sysui/desktop/icons/so8-chart-doc.ico Binary files differdeleted file mode 100755 index 01ff8365434b..000000000000 --- a/sysui/desktop/icons/so8-chart-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-configuration.ico b/sysui/desktop/icons/so8-configuration.ico Binary files differdeleted file mode 100755 index 57f3b6701b30..000000000000 --- a/sysui/desktop/icons/so8-configuration.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-draw-app.ico b/sysui/desktop/icons/so8-draw-app.ico Binary files differdeleted file mode 100755 index 6003ccb3d7c3..000000000000 --- a/sysui/desktop/icons/so8-draw-app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-draw-doc.ico b/sysui/desktop/icons/so8-draw-doc.ico Binary files differdeleted file mode 100755 index f4f169bd6fb5..000000000000 --- a/sysui/desktop/icons/so8-draw-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-draw-tem.ico b/sysui/desktop/icons/so8-draw-tem.ico Binary files differdeleted file mode 100755 index d3f63c38dbe0..000000000000 --- a/sysui/desktop/icons/so8-draw-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-empty-doc.ico b/sysui/desktop/icons/so8-empty-doc.ico Binary files differdeleted file mode 100755 index b71d2b939ca7..000000000000 --- a/sysui/desktop/icons/so8-empty-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-empty-tem.ico b/sysui/desktop/icons/so8-empty-tem.ico Binary files differdeleted file mode 100755 index 9368b0a81aef..000000000000 --- a/sysui/desktop/icons/so8-empty-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-image-doc.ico b/sysui/desktop/icons/so8-image-doc.ico Binary files differdeleted file mode 100755 index 11b4f0f6c718..000000000000 --- a/sysui/desktop/icons/so8-image-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-impress-app.ico b/sysui/desktop/icons/so8-impress-app.ico Binary files differdeleted file mode 100755 index 8fae43dab26d..000000000000 --- a/sysui/desktop/icons/so8-impress-app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-impress-doc.ico b/sysui/desktop/icons/so8-impress-doc.ico Binary files differdeleted file mode 100755 index 9a91f89f2900..000000000000 --- a/sysui/desktop/icons/so8-impress-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-impress-tem.ico b/sysui/desktop/icons/so8-impress-tem.ico Binary files differdeleted file mode 100755 index f84f813f992c..000000000000 --- a/sysui/desktop/icons/so8-impress-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-macro-doc.ico b/sysui/desktop/icons/so8-macro-doc.ico Binary files differdeleted file mode 100755 index f3742e1274e7..000000000000 --- a/sysui/desktop/icons/so8-macro-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-main-app.ico b/sysui/desktop/icons/so8-main-app.ico Binary files differdeleted file mode 100755 index aa044ad9c702..000000000000 --- a/sysui/desktop/icons/so8-main-app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-master-doc.ico b/sysui/desktop/icons/so8-master-doc.ico Binary files differdeleted file mode 100755 index 27a1d2f61c49..000000000000 --- a/sysui/desktop/icons/so8-master-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-math-app.ico b/sysui/desktop/icons/so8-math-app.ico Binary files differdeleted file mode 100755 index 956c259c756a..000000000000 --- a/sysui/desktop/icons/so8-math-app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-math-doc.ico b/sysui/desktop/icons/so8-math-doc.ico Binary files differdeleted file mode 100755 index e7b88449999f..000000000000 --- a/sysui/desktop/icons/so8-math-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-open.ico b/sysui/desktop/icons/so8-open.ico Binary files differdeleted file mode 100755 index b77a741b338f..000000000000 --- a/sysui/desktop/icons/so8-open.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-printer.ico b/sysui/desktop/icons/so8-printer.ico Binary files differdeleted file mode 100755 index 25e61f8de5d5..000000000000 --- a/sysui/desktop/icons/so8-printer.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-web-doc.ico b/sysui/desktop/icons/so8-web-doc.ico Binary files differdeleted file mode 100755 index 12eeb63cffb2..000000000000 --- a/sysui/desktop/icons/so8-web-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-writer-app.ico b/sysui/desktop/icons/so8-writer-app.ico Binary files differdeleted file mode 100755 index 15f7f92d4b45..000000000000 --- a/sysui/desktop/icons/so8-writer-app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-writer-doc.ico b/sysui/desktop/icons/so8-writer-doc.ico Binary files differdeleted file mode 100755 index da774be1d3ac..000000000000 --- a/sysui/desktop/icons/so8-writer-doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so8-writer-tem.ico b/sysui/desktop/icons/so8-writer-tem.ico Binary files differdeleted file mode 100755 index 1bdb86c8090f..000000000000 --- a/sysui/desktop/icons/so8-writer-tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_base_app.ico b/sysui/desktop/icons/so9_base_app.ico Binary files differdeleted file mode 100755 index aa7036eb90fc..000000000000 --- a/sysui/desktop/icons/so9_base_app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_base_doc.ico b/sysui/desktop/icons/so9_base_doc.ico Binary files differdeleted file mode 100755 index 8cc1d4433c2c..000000000000 --- a/sysui/desktop/icons/so9_base_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_calc_app.ico b/sysui/desktop/icons/so9_calc_app.ico Binary files differdeleted file mode 100755 index d7182cad0943..000000000000 --- a/sysui/desktop/icons/so9_calc_app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_calc_doc.ico b/sysui/desktop/icons/so9_calc_doc.ico Binary files differdeleted file mode 100755 index 2b9e514cb97b..000000000000 --- a/sysui/desktop/icons/so9_calc_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_calc_tem.ico b/sysui/desktop/icons/so9_calc_tem.ico Binary files differdeleted file mode 100755 index 17f4823c4374..000000000000 --- a/sysui/desktop/icons/so9_calc_tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_chart_doc.ico b/sysui/desktop/icons/so9_chart_doc.ico Binary files differdeleted file mode 100755 index b116c81903b3..000000000000 --- a/sysui/desktop/icons/so9_chart_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_draw_app.ico b/sysui/desktop/icons/so9_draw_app.ico Binary files differdeleted file mode 100755 index a8b3c3270fc0..000000000000 --- a/sysui/desktop/icons/so9_draw_app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_draw_doc.ico b/sysui/desktop/icons/so9_draw_doc.ico Binary files differdeleted file mode 100755 index 51f95046709a..000000000000 --- a/sysui/desktop/icons/so9_draw_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_draw_tem.ico b/sysui/desktop/icons/so9_draw_tem.ico Binary files differdeleted file mode 100755 index e4b341175bff..000000000000 --- a/sysui/desktop/icons/so9_draw_tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_empty_doc.ico b/sysui/desktop/icons/so9_empty_doc.ico Binary files differdeleted file mode 100755 index a3970775e3ed..000000000000 --- a/sysui/desktop/icons/so9_empty_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_empty_tem.ico b/sysui/desktop/icons/so9_empty_tem.ico Binary files differdeleted file mode 100755 index 1b0088b80277..000000000000 --- a/sysui/desktop/icons/so9_empty_tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_global_doc.ico b/sysui/desktop/icons/so9_global_doc.ico Binary files differdeleted file mode 100755 index ea4ccb383956..000000000000 --- a/sysui/desktop/icons/so9_global_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_html_doc.ico b/sysui/desktop/icons/so9_html_doc.ico Binary files differdeleted file mode 100755 index 4e5b8bc99c07..000000000000 --- a/sysui/desktop/icons/so9_html_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_impress_app.ico b/sysui/desktop/icons/so9_impress_app.ico Binary files differdeleted file mode 100755 index cf10331c5ff9..000000000000 --- a/sysui/desktop/icons/so9_impress_app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_impress_doc.ico b/sysui/desktop/icons/so9_impress_doc.ico Binary files differdeleted file mode 100755 index 5258a8b6aa4c..000000000000 --- a/sysui/desktop/icons/so9_impress_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_impress_tem.ico b/sysui/desktop/icons/so9_impress_tem.ico Binary files differdeleted file mode 100755 index dcdbddb3b654..000000000000 --- a/sysui/desktop/icons/so9_impress_tem.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_macro_doc.ico b/sysui/desktop/icons/so9_macro_doc.ico Binary files differdeleted file mode 100755 index cd004015e63f..000000000000 --- a/sysui/desktop/icons/so9_macro_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_main_app.ico b/sysui/desktop/icons/so9_main_app.ico Binary files differdeleted file mode 100755 index 90f193d80dd9..000000000000 --- a/sysui/desktop/icons/so9_main_app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_math_app.ico b/sysui/desktop/icons/so9_math_app.ico Binary files differdeleted file mode 100755 index 11fbbf9a494a..000000000000 --- a/sysui/desktop/icons/so9_math_app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_math_doc.ico b/sysui/desktop/icons/so9_math_doc.ico Binary files differdeleted file mode 100755 index 622ae939d23a..000000000000 --- a/sysui/desktop/icons/so9_math_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_open.ico b/sysui/desktop/icons/so9_open.ico Binary files differdeleted file mode 100755 index 90f193d80dd9..000000000000 --- a/sysui/desktop/icons/so9_open.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_writer_app.ico b/sysui/desktop/icons/so9_writer_app.ico Binary files differdeleted file mode 100755 index 10c964dba966..000000000000 --- a/sysui/desktop/icons/so9_writer_app.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_writer_doc.ico b/sysui/desktop/icons/so9_writer_doc.ico Binary files differdeleted file mode 100755 index b0cf11a993c9..000000000000 --- a/sysui/desktop/icons/so9_writer_doc.ico +++ /dev/null diff --git a/sysui/desktop/icons/so9_writer_tem.ico b/sysui/desktop/icons/so9_writer_tem.ico Binary files differdeleted file mode 100755 index 2e62a1934646..000000000000 --- a/sysui/desktop/icons/so9_writer_tem.ico +++ /dev/null diff --git a/sysui/prj/build.lst b/sysui/prj/build.lst index b5f26eb936b9..097cae97ed29 100644 --- a/sysui/prj/build.lst +++ b/sysui/prj/build.lst @@ -1,6 +1,6 @@ su sysui : L10N:l10n offapi xml2cmp rdbmaker l10ntools setup_native NULL -su sysui\source\win32\QuickStart nmake - w su_win32_quickstart NULL -su sysui\source\win32\QuickStart\so nmake - w su_win32_quickstart_so su_win32_quickstart.w NULL +#su sysui\source\win32\QuickStart nmake - w su_win32_quickstart NULL +#su sysui\source\win32\QuickStart\so nmake - w su_win32_quickstart_so su_win32_quickstart.w NULL su sysui\desktop\icons nmake - w su_iconsw NULL su sysui\desktop\os2 nmake - p su_iconsw NULL su sysui\desktop\macosx nmake - u su_dtmacosx su_dtshare.u NULL @@ -16,4 +16,4 @@ su sysui\desktop\debian nmake - u su_dtdebian su_dtshare.u su sysui\desktop\slackware nmake - u su_dtslackware su_dtshare.u NULL su sysui\desktop\solaris nmake - u su_dtsolaris su_dtshare.u NULL su sysui\desktop\util nmake - u su_desktop su_dtredhat.u su_dtsuse.u su_dtmdk.u su_dtfreedesktop.u su_dtdebian.u su_dtslackware.u NULL -su sysui\util nmake - all su_util su_dtsolaris.u su_desktop.u su_win32_quickstart_so.w su_iconsw.w NULL +su sysui\util nmake - all su_util su_dtsolaris.u su_desktop.u su_iconsw.w NULL diff --git a/sysui/prj/d.lst b/sysui/prj/d.lst index c6019cea9a43..918ee8bcbc8f 100644 --- a/sysui/prj/d.lst +++ b/sysui/prj/d.lst @@ -15,10 +15,6 @@ mkdir: %_DEST%\bin%_EXT%\desktop-integration\pkg ..\%__SRC%\bin\pkg\*.tar.gz %_DEST%\bin%_EXT%\desktop-integration\pkg\*.tar.gz ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll -..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe -..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\install_quickstart.exe -..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\quickstart.exe -..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\install_quickstart.exe ..\%__SRC%\misc\ooo3_main_app.ico %_DEST%\bin%_EXT%\soffice.ico diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 50e0447d4a9d..32b4d322bba2 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -117,8 +117,8 @@ sal_Char __READONLY_DATA sXML_1_2[] = "1.2"; const sal_Char *sOpenOfficeOrgProject ="OpenOffice.org_project"; -const sal_Char s_grddl_xsl[] = - "http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl"; +// #i115030#: the XSLT is not finished, and not available via HTTP +const sal_Char s_grddl_xsl[] = "http://FIXME"; #define LOGFILE_AUTHOR "mb93740" @@ -1315,7 +1315,7 @@ void SvXMLExport::SetBodyAttributes() } static void -lcl_AddGrddl(SvXMLExport & rExport, const sal_Int32 nExportMode) +lcl_AddGrddl(SvXMLExport & rExport, const sal_Int32 /*nExportMode*/) { // check version >= 1.2 switch (rExport.getDefaultVersion()) { @@ -1324,11 +1324,14 @@ lcl_AddGrddl(SvXMLExport & rExport, const sal_Int32 nExportMode) default: break; } + // #i115030#: disabled +#if 0 if (EXPORT_SETTINGS != nExportMode) // meta, content, styles { rExport.AddAttribute( XML_NAMESPACE_GRDDL, XML_TRANSFORMATION, OUString::createFromAscii(s_grddl_xsl) ); } +#endif } sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index d4e880f09b52..59849df1a20e 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -298,15 +298,25 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, sTmp.append( nLevel + 1 ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL, sTmp.makeStringAndClear() ); // #i110694#: no style-name on list-level-style-image - if ((sTextStyleName.getLength() > 0) && (NumberingType::BITMAP != eType)) + // #i116149#: neither prefix/suffix + if (NumberingType::BITMAP != eType) { - GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, - GetExport().EncodeStyleName( sTextStyleName ) ); + if (sTextStyleName.getLength() > 0) + { + GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, + GetExport().EncodeStyleName( sTextStyleName ) ); + } + if (sPrefix.getLength() > 0) + { + GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX, + sPrefix ); + } + if (sSuffix.getLength() > 0) + { + GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_SUFFIX, + sSuffix ); + } } - if( sPrefix.getLength() > 0 ) - GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX, sPrefix ); - if( sSuffix.getLength() > 0 ) - GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_SUFFIX, sSuffix ); enum XMLTokenEnum eElem = XML_LIST_LEVEL_STYLE_NUMBER; if( NumberingType::CHAR_SPECIAL == eType ) diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 0d45fdc289d0..1417f239082a 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -501,6 +501,22 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( nCount++; } + if (bBullet && sSuffix.getLength()) + { + sal_uInt16 const nVersion(GetImport().getGeneratorVersion()); + sal_Int32 nUPD; + sal_Int32 nBuildId; + if (GetImport().getBuildIds(nUPD, nBuildId) + && ( (SvXMLImport::OOo_1x == nVersion) + || (SvXMLImport::OOo_2x == nVersion) + || (310 == nUPD) || (320 == nUPD) || (330 == nUPD) + || ((300 == nUPD) && (nBuildId <= 9573)))) + { + // #i93908# OOo < 3.4 wrote a bogus suffix for bullet chars + sSuffix = ::rtl::OUString(); // clear it + } + } + Sequence<beans::PropertyValue> aPropSeq( nCount ); if( nCount > 0 ) { diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx index dcef23ba5734..eab3c77efc7f 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.cxx +++ b/xmloff/source/text/XMLAutoTextEventExport.cxx @@ -221,6 +221,9 @@ void XMLAutoTextEventExport::addNamespaces() GetAttrList().AddAttribute( GetNamespaceMap().GetAttrNameByIndex( XML_NAMESPACE_OOO ), GetNamespaceMap().GetNameByIndex( XML_NAMESPACE_OOO ) ); + GetAttrList().AddAttribute( + GetNamespaceMap().GetAttrNameByIndex( XML_NAMESPACE_XLINK ), + GetNamespaceMap().GetNameByIndex( XML_NAMESPACE_XLINK ) ); } void XMLAutoTextEventExport::exportEvents() diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index 3a26fe37c794..9c3d50d6f9ed 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -1039,7 +1039,8 @@ sal_Bool XMLTextCombineCharPropHdl_Impl::exportXML( { rValue >>= rStrExpValue; - return sal_True; + // #i114107# attribute of type "character": export only if length is 1 + return (1 == rStrExpValue.getLength()) ? sal_True : sal_False; } XMLTextCombineCharPropHdl_Impl::~XMLTextCombineCharPropHdl_Impl() diff --git a/xmloff/source/transform/PropertyActionsOOo.cxx b/xmloff/source/transform/PropertyActionsOOo.cxx index bc91561de206..e0b9259787eb 100644 --- a/xmloff/source/transform/PropertyActionsOOo.cxx +++ b/xmloff/source/transform/PropertyActionsOOo.cxx @@ -649,6 +649,8 @@ XMLTransformerActionInit aTextPropertyOOoAttrActionTable[] = NO_PARAMS }, /* #i113645# */ { XML_NAMESPACE_STYLE, XML_TEXT_OVERLINE_COLOR, XML_ATACTION_REMOVE, NO_PARAMS }, /* #i113645# */ + { XML_NAMESPACE_FO, XML_WRAP_OPTION, XML_ATACTION_REMOVE, + NO_PARAMS }, /* #i116555# */ { XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT, NO_PARAMS } }; |