summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/inc/dbaccess_helpid.hrc1
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx34
-rw-r--r--dbaccess/source/core/api/query.cxx2
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx8
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx18
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx30
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx33
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hrc1
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hxx1
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.src15
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx2
-rw-r--r--dbaccess/source/ui/inc/dsitems.hxx3
-rw-r--r--dbaccess/source/ui/inc/dsmeta.hxx1
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx1
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx3
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx41
-rw-r--r--reportdesign/source/ui/inc/ReportSection.hxx4
-rw-r--r--reportdesign/source/ui/inc/ReportWindow.hxx9
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx8
-rw-r--r--reportdesign/source/ui/misc/ColorListener.cxx16
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx23
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx5
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx5
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx8
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx163
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx14
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx2
-rw-r--r--reportdesign/source/ui/report/SectionView.cxx1
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx35
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx22
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx79
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx8
35 files changed, 372 insertions, 236 deletions
diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc
index 2ab9c80c8..1003efa8f 100644
--- a/dbaccess/inc/dbaccess_helpid.hrc
+++ b/dbaccess/inc/dbaccess_helpid.hrc
@@ -436,6 +436,7 @@
#define HID_DSADMIN_IGNORECURRENCY "DBACCESS_HID_DSADMIN_IGNORECURRENCY"
#define HID_MACRO_MIGRATION_BACKUP_LOCATION "DBACCESS_HID_MACRO_MIGRATION_BACKUP_LOCATION"
#define HID_DSADMIN_PRIMARY_KEY_SUPPORT "DBACCESS_HID_DSADMIN_PRIMARY_KEY_SUPPORT"
+#define HID_DSADMIN_RESPECTRESULTSETTYPE "DBACCESS_HID_DSADMIN_RESPECTRESULTSETTYPE"
// this one below have hid in number space HID_SBA_START
#define HID_DLG_ADABAS_NEWDB "DBACCESS_HID_DLG_ADABAS_NEWDB"
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index c17801939..43b2f580e 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -116,12 +116,13 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
DBG_CTOR(ORowSetCache,NULL);
// first try if the result can be used to do inserts and updates
+ Reference< XPropertySet> xProp(_xRs,UNO_QUERY);
+ Reference< XPropertySetInfo > xPropInfo = xProp->getPropertySetInfo();
+ sal_Bool bBookmarkable = sal_False;
try
{
Reference< XResultSetUpdate> xUp(_xRs,UNO_QUERY_THROW);
- Reference< XPropertySet> xProp(_xRs,UNO_QUERY);
- Reference< XPropertySetInfo > xPropInfo = xProp->getPropertySetInfo();
- sal_Bool bBookmarkable = xPropInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) &&
+ bBookmarkable = xPropInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) &&
any2bool(xProp->getPropertyValue(PROPERTY_ISBOOKMARKABLE)) && Reference< XRowLocate >(_xRs, UNO_QUERY).is();
if ( bBookmarkable )
{
@@ -139,17 +140,22 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
{
(void)ex;
}
- _xRs->beforeFirst();
+ try
+ {
+ if ( xPropInfo->hasPropertyByName(PROPERTY_RESULTSETTYPE) &&
+ ::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETTYPE)) != ResultSetType::FORWARD_ONLY)
+ _xRs->beforeFirst();
+ }
+ catch(const SQLException& e)
+ {
+ (void)e;
+ }
// check if all keys of the updateable table are fetched
sal_Bool bAllKeysFound = sal_False;
sal_Int32 nTablesCount = 0;
- Reference< XPropertySet> xProp(_xRs,UNO_QUERY);
- Reference< XPropertySetInfo > xPropInfo = xProp->getPropertySetInfo();
- sal_Bool bNeedKeySet = !(xPropInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) &&
- any2bool(xProp->getPropertyValue(PROPERTY_ISBOOKMARKABLE)) && Reference< XRowLocate >(_xRs, UNO_QUERY).is() );
- bNeedKeySet = bNeedKeySet || (xPropInfo->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) &&
+ sal_Bool bNeedKeySet = !bBookmarkable || (xPropInfo->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) &&
::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETCONCURRENCY)) == ResultSetConcurrency::READ_ONLY);
Reference< XIndexAccess> xUpdateTableKeys;
@@ -272,6 +278,16 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
// oj removed because keyset uses only the next// || (xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_RESULTSETTYPE) && comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETTYPE)) == ResultSetType::FORWARD_ONLY)
if(!bAllKeysFound )
{
+ if ( bBookmarkable )
+ {
+ // here I know that we have a read only bookmarable cursor
+ _xRs->beforeFirst();
+ m_nPrivileges = Privilege::SELECT;
+ m_pCacheSet = new WrappedResultSet(i_nMaxRows);
+ m_xCacheSet = m_pCacheSet;
+ m_pCacheSet->construct(_xRs,i_sRowSetFilter);
+ return;
+ }
m_pCacheSet = new OStaticSet(i_nMaxRows);
m_xCacheSet = m_pCacheSet;
m_pCacheSet->construct(_xRs,i_sRowSetFilter);
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index f0be9bafe..bbd5f0a00 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -361,7 +361,7 @@ void OQuery::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _r
{ // the base class holds the property values itself, but we have to forward this to our CommandDefinition
m_eDoingCurrently = SETTING_PROPERTIES;
- OAutoActionReset(this);
+ OAutoActionReset aActionResetter(this);
m_xCommandDefinition->setPropertyValue(sAggPropName, _rValue);
if ( PROPERTY_ID_COMMAND == _nHandle )
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index d093170ca..93f2447a1 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -41,6 +41,7 @@
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/sdb/XCompletedExecution.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
@@ -49,6 +50,7 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/chart/XDateCategories.hpp>
#include <vector>
#include <list>
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 14a051a18..0dcdd3278 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -99,6 +99,7 @@
#include <algorithm>
#include "dbtreelistbox.hxx"
#include "IApplicationController.hxx"
+#include "imageprovider.hxx"
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
@@ -135,6 +136,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent )
SetSpaceBetweenEntries(nSize);
SetSelectionMode( NO_SELECTION );
SetExtendedWinBits( EWB_NO_AUTO_CURENTRY );
+ SetNodeDefaultImages( );
EnableEntryMnemonics();
}
// -----------------------------------------------------------------------------
@@ -412,6 +414,12 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView
m_aHelpText.SetHelpId(HID_APP_HELP_TEXT);
m_aDescription.SetHelpId(HID_APP_DESCRIPTION_TEXT);
m_aDescription.SetText(ModuleRes(STR_DESCRIPTION));
+
+ ImageProvider aImageProvider;
+ Image aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM, false );
+ m_aCreation.SetDefaultCollapsedEntryBmp( aFolderImage );
+ m_aCreation.SetDefaultExpandedEntryBmp( aFolderImage );
+
ImplInitSettings(sal_True,sal_True,sal_True);
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 0cc058a7a..a4257787b 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -736,7 +736,7 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r
const Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY);
if (::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)))
xFormSet->getPropertyValue(PROPERTY_SINGLESELECTQUERYCOMPOSER) >>= m_xParser;
-
+#if 0
{
const Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY );
const Reference< XSingleSelectQueryAnalyzer > xAnalyzer( xRowSetProps->getPropertyValue( PROPERTY_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY );
@@ -756,15 +756,23 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r
}
}
}
+#endif
Reference< XWarningsSupplier > xWarnings( _rxLoadable, UNO_QUERY );
if ( xWarnings.is() )
{
- SQLExceptionInfo aInfo( xWarnings->getWarnings() );
- if ( aInfo.isValid() )
+ try
+ {
+ SQLExceptionInfo aInfo( xWarnings->getWarnings() );
+ if ( aInfo.isValid() )
+ {
+ showError( aInfo );
+ impl_checkForCannotSelectUnfiltered( aInfo );
+ }
+ }
+ catch(const SQLException& e)
{
- showError( aInfo );
- impl_checkForCannotSelectUnfiltered( aInfo );
+ (void)e;
}
}
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 9dfbe0f27..df441ee2c 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1682,35 +1682,7 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr )
}
if ( sDefault.getLength() )
- {
- sal_uInt32 nFormatKey;
- try
- {
- if ( isTextFormat(pFieldDescr,nFormatKey) || pBoolDefault )
- {
- pFieldDescr->SetControlDefault(makeAny(sDefault));
- }
- else
- {
- try
- {
- double nValue = GetFormatter()->convertStringToNumber(nFormatKey,sDefault);
- nValue = checkDoubleForDateFormat(nValue,nFormatKey,GetFormatter());
- pFieldDescr->SetControlDefault(makeAny(nValue));
- }
- catch(const Exception&)
- {
- if ( sDefault.getLength() )
- pFieldDescr->SetControlDefault(makeAny(sDefault));
- else
- pFieldDescr->SetControlDefault(Any());
- }
- }
- }
- catch(const Exception&)
- {
- }
- } // if ( sDefault.getLength() )
+ pFieldDescr->SetControlDefault(makeAny(sDefault));
else
pFieldDescr->SetControlDefault(Any());
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 7ffa5f5e0..8a5459c3d 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -204,6 +204,8 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOSLINEENDS, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferDosLikeLineEnds" ) ) ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SOCKET, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalSocket" ) ) ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_NAMED_PIPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NamedPipe" ) ) ) );
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_RESPECTRESULTSETTYPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RespectDriverResultSetType" ) ) ) );
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_MAX_ROW_SCAN, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxRowScan" ) ) ) );
// special settings for adabas
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SHUTSERVICE, ::rtl::OUString::createFromAscii("ShutdownDatabase")));
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 40305c835..fc8fc3699 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -95,6 +95,7 @@ namespace dbaui
,m_pIgnoreCurrency(NULL)
,m_pEscapeDateTime(NULL)
,m_pPrimaryKeySupport(NULL)
+ ,m_pRespectDriverResultSetType(NULL)
,m_pBooleanComparisonModeLabel( NULL )
,m_pBooleanComparisonMode( NULL )
,m_pMaxRowScanLabel( NULL )
@@ -206,6 +207,7 @@ namespace dbaui
DELETEZ( m_pIgnoreCurrency );
DELETEZ( m_pEscapeDateTime );
DELETEZ( m_pPrimaryKeySupport );
+ DELETEZ( m_pRespectDriverResultSetType );
DELETEZ( m_pBooleanComparisonModeLabel );
DELETEZ( m_pBooleanComparisonMode );
DELETEZ( m_pMaxRowScanLabel );
@@ -219,21 +221,22 @@ namespace dbaui
// for easier maintainance, write the table in this form, then copy it to m_aBooleanSettings
BooleanSettingDesc aSettings[] = {
- { &m_pIsSQL92Check, CB_SQL92CHECK, DSID_SQL92CHECK, false },
- { &m_pAppendTableAlias, CB_APPENDTABLEALIAS, DSID_APPEND_TABLE_ALIAS, false },
- { &m_pAsBeforeCorrelationName, CB_AS_BEFORE_CORR_NAME, DSID_AS_BEFORE_CORRNAME, false },
- { &m_pEnableOuterJoin, CB_ENABLEOUTERJOIN, DSID_ENABLEOUTERJOIN, false },
- { &m_pIgnoreDriverPrivileges, CB_IGNOREDRIVER_PRIV, DSID_IGNOREDRIVER_PRIV, false },
- { &m_pParameterSubstitution, CB_PARAMETERNAMESUBST, DSID_PARAMETERNAMESUBST, false },
- { &m_pSuppressVersionColumn, CB_SUPPRESVERSIONCL, DSID_SUPPRESSVERSIONCL, true },
- { &m_pCatalog, CB_CATALOG, DSID_CATALOG, false },
- { &m_pSchema, CB_SCHEMA, DSID_SCHEMA, false },
- { &m_pIndexAppendix, CB_IGNOREINDEXAPPENDIX, DSID_INDEXAPPENDIX, false },
- { &m_pDosLineEnds, CB_DOSLINEENDS, DSID_DOSLINEENDS, false },
- { &m_pCheckRequiredFields, CB_CHECK_REQUIRED, DSID_CHECK_REQUIRED_FIELDS, false },
- { &m_pIgnoreCurrency, CB_IGNORECURRENCY, DSID_IGNORECURRENCY, false },
- { &m_pEscapeDateTime, CB_ESCAPE_DATETIME, DSID_ESCAPE_DATETIME, false },
- { &m_pPrimaryKeySupport, CB_PRIMARY_KEY_SUPPORT, DSID_PRIMARY_KEY_SUPPORT, false },
+ { &m_pIsSQL92Check, CB_SQL92CHECK, DSID_SQL92CHECK, false },
+ { &m_pAppendTableAlias, CB_APPENDTABLEALIAS, DSID_APPEND_TABLE_ALIAS, false },
+ { &m_pAsBeforeCorrelationName, CB_AS_BEFORE_CORR_NAME, DSID_AS_BEFORE_CORRNAME, false },
+ { &m_pEnableOuterJoin, CB_ENABLEOUTERJOIN, DSID_ENABLEOUTERJOIN, false },
+ { &m_pIgnoreDriverPrivileges, CB_IGNOREDRIVER_PRIV, DSID_IGNOREDRIVER_PRIV, false },
+ { &m_pParameterSubstitution, CB_PARAMETERNAMESUBST, DSID_PARAMETERNAMESUBST, false },
+ { &m_pSuppressVersionColumn, CB_SUPPRESVERSIONCL, DSID_SUPPRESSVERSIONCL, true },
+ { &m_pCatalog, CB_CATALOG, DSID_CATALOG, false },
+ { &m_pSchema, CB_SCHEMA, DSID_SCHEMA, false },
+ { &m_pIndexAppendix, CB_IGNOREINDEXAPPENDIX, DSID_INDEXAPPENDIX, false },
+ { &m_pDosLineEnds, CB_DOSLINEENDS, DSID_DOSLINEENDS, false },
+ { &m_pCheckRequiredFields, CB_CHECK_REQUIRED, DSID_CHECK_REQUIRED_FIELDS, false },
+ { &m_pIgnoreCurrency, CB_IGNORECURRENCY, DSID_IGNORECURRENCY, false },
+ { &m_pEscapeDateTime, CB_ESCAPE_DATETIME, DSID_ESCAPE_DATETIME, false },
+ { &m_pPrimaryKeySupport, CB_PRIMARY_KEY_SUPPORT, DSID_PRIMARY_KEY_SUPPORT, false },
+ { &m_pRespectDriverResultSetType, CB_RESPECTRESULTSETTYPE,DSID_RESPECTRESULTSETTYPE, false },
{ NULL, 0, 0, false }
};
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hrc b/dbaccess/source/ui/dlg/advancedsettings.hrc
index 320683897..389afea6a 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hrc
+++ b/dbaccess/source/ui/dlg/advancedsettings.hrc
@@ -62,6 +62,7 @@
#define CB_IGNORECURRENCY 14
#define CB_ESCAPE_DATETIME 15
#define CB_PRIMARY_KEY_SUPPORT 16
+#define CB_RESPECTRESULTSETTYPE 17
#define ET_AUTOINCREMENTVALUE 1
#define ET_RETRIEVE_AUTO 2
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx
index 1f02ac087..a826c9691 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -73,6 +73,7 @@ namespace dbaui
CheckBox* m_pIgnoreCurrency;
CheckBox* m_pEscapeDateTime;
CheckBox* m_pPrimaryKeySupport;
+ CheckBox* m_pRespectDriverResultSetType;
FixedText* m_pBooleanComparisonModeLabel;
ListBox* m_pBooleanComparisonMode;
diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src
index 7e7d73e97..360bde979 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.src
+++ b/dbaccess/source/ui/dlg/advancedsettings.src
@@ -217,6 +217,16 @@
Text [ en-US ] = "Supports primary keys"; \
};
+#define AUTO_RESPECTRESULTSETTYPE(AUTO_Y) \
+ CheckBox CB_RESPECTRESULTSETTYPE \
+ { \
+ Pos = MAP_APPFONT ( 6 , AUTO_Y ) ; \
+ Size = MAP_APPFONT ( ADVANCED_PAGE_X - 12 , CHECKBOX_HEIGHT ) ; \
+ TabStop = TRUE ; \
+ HelpId = HID_DSADMIN_RESPECTRESULTSETTYPE; \
+ Text [ en-US ] = "Respect the result set type from the database driver"; \
+ };
+
//-------------------------------------------------------------------------
@@ -351,8 +361,9 @@ TabPage PAGE_ADVANCED_SETTINGS_SPECIAL
AUTO_IGNORECURRENCY( 13*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 12*CHECKBOX_HEIGHT + RELATED_CONTROLS )
AUTO_ESCAPE_DATETIME( 14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS )
AUTO_PRIMARY_KEY_SUPPORT( 15*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS )
- AUTO_BOOLEANCOMPARISON( 16*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
- AUTO_MAXROWSCAN( 17*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
+ AUTO_RESPECTRESULTSETTYPE( 16*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 16*CHECKBOX_HEIGHT + RELATED_CONTROLS )
+ AUTO_BOOLEANCOMPARISON( 17*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
+ AUTO_MAXROWSCAN( 18*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
};
//-------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index f80f0db53..47e3d5072 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -411,6 +411,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
*pCounter++ = new SfxStringItem(DSID_NAMED_PIPE, String());
*pCounter++ = new OptionalBoolItem( DSID_PRIMARY_KEY_SUPPORT );
*pCounter++ = new SfxInt32Item(DSID_MAX_ROW_SCAN, 100);
+ *pCounter++ = new SfxBoolItem( DSID_RESPECTRESULTSETTYPE,sal_False );
// create the pool
static SfxItemInfo __READONLY_DATA aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] =
@@ -474,6 +475,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
{0,0},
{0,0},
{0,0},
+ {0,0},
{0,0}
};
diff --git a/dbaccess/source/ui/inc/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx
index deb36c70e..6940812a9 100644
--- a/dbaccess/source/ui/inc/dsitems.hxx
+++ b/dbaccess/source/ui/inc/dsitems.hxx
@@ -93,6 +93,7 @@ typedef sal_Int32 ItemID;
#define DSID_NAMED_PIPE 58
#define DSID_PRIMARY_KEY_SUPPORT 59
#define DSID_MAX_ROW_SCAN 60
+#define DSID_RESPECTRESULTSETTYPE 61
// don't forget to adjust DSID_LAST_ITEM_ID below!
@@ -100,7 +101,7 @@ typedef sal_Int32 ItemID;
//= item range. Adjust this if you introduce new items above
#define DSID_FIRST_ITEM_ID DSID_NAME
-#define DSID_LAST_ITEM_ID DSID_MAX_ROW_SCAN
+#define DSID_LAST_ITEM_ID DSID_RESPECTRESULTSETTYPE
#endif // _DBAUI_DATASOURCEITEMS_HXX_
diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx
index 9ed7afdd0..6e89515b4 100644
--- a/dbaccess/source/ui/inc/dsmeta.hxx
+++ b/dbaccess/source/ui/inc/dsmeta.hxx
@@ -133,6 +133,7 @@ namespace dbaui
|| has( DSID_ESCAPE_DATETIME )
|| has( DSID_PRIMARY_KEY_SUPPORT )
|| has( DSID_MAX_ROW_SCAN )
+ || has( DSID_RESPECTRESULTSETTYPE )
;
}
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index 4b3af7c59..cbadf1b4c 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -93,6 +93,7 @@ namespace dbaui
{ DSID_IGNORECURRENCY, "IgnoreCurrency" },
{ DSID_ESCAPE_DATETIME, "EscapeDateTime" },
{ DSID_PRIMARY_KEY_SUPPORT, "PrimaryKeySupport" },
+ { DSID_RESPECTRESULTSETTYPE, "RespectDriverResultSetType" },
{ DSID_MAX_ROW_SCAN, "MaxRowScan" },
{ 0, NULL }
};
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 2cf697696..bd790c55b 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -519,10 +519,10 @@ void OJoinController::saveTableWindows( ::comphelper::NamedValueCollection& o_rV
aWindowData.put( "ComposedName", (*aIter)->GetComposedName() );
aWindowData.put( "TableName", (*aIter)->GetTableName() );
aWindowData.put( "WindowName", (*aIter)->GetWinName() );
- aWindowData.put( "WindowTop", (*aIter)->GetPosition().Y() );
- aWindowData.put( "WindowLeft", (*aIter)->GetPosition().X() );
- aWindowData.put( "WindowWidth", (*aIter)->GetSize().Width() );
- aWindowData.put( "WindowHeight", (*aIter)->GetSize().Height() );
+ aWindowData.put( "WindowTop", static_cast<sal_Int32>((*aIter)->GetPosition().Y()) );
+ aWindowData.put( "WindowLeft", static_cast<sal_Int32>((*aIter)->GetPosition().X()) );
+ aWindowData.put( "WindowWidth", static_cast<sal_Int32>((*aIter)->GetSize().Width()) );
+ aWindowData.put( "WindowHeight", static_cast<sal_Int32>((*aIter)->GetSize().Height()) );
aWindowData.put( "ShowAll", (*aIter)->IsShowAll() );
const ::rtl::OUString sTableName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Table" ) ) + ::rtl::OUString::valueOf( i ) );
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 7ee6721d2..61c55db87 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2496,9 +2496,10 @@ namespace
{
OQueryController& rController = static_cast<OQueryController&>(_pView->getController());
::connectivity::OSQLParseNode* pGroupBy = pSelectRoot->getChild(3)->getChild(2)->getChild(2);
- OTableFieldDescRef aDragInfo = new OTableFieldDesc();
+
for( sal_uInt32 i=0 ; i < pGroupBy->count() && eOk == eErrorCode; ++i )
{
+ OTableFieldDescRef aDragInfo = new OTableFieldDesc();
::connectivity::OSQLParseNode* pParamRef = NULL;
::connectivity::OSQLParseNode* pArgument = pGroupBy->getChild( i );
if(SQL_ISRULE(pArgument,column_ref))
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 6ad353e31..4e97ace9b 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -765,14 +765,7 @@ void OUnoObject::NbcMove( const Size& rSize )
}
if (bPositionFixed)
{
- // OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
- // if ( pRptModel )
- // {
- // if (! pRptModel->GetUndoEnv().IsLocked())
- // {
- GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize));
- // }
- // }
+ GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize));
}
// set geometry properties
SetPropsFromRect(GetLogicRect());
@@ -1040,14 +1033,40 @@ void OOle2Obj::NbcMove( const Size& rSize )
// stop listening
OObjectBase::EndListening(sal_False);
+ bool bPositionFixed = false;
+ Size aUndoSize(0,0);
+ bool bUndoMode = false;
if ( m_xReportComponent.is() )
{
OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
+ if (pRptModel->GetUndoEnv().IsUndoMode())
+ {
+ // if we are locked from outside, then we must not handle wrong moves, we are in UNDO mode
+ bUndoMode = true;
+ }
OXUndoEnvironment::OUndoEnvLock aLock(pRptModel->GetUndoEnv());
- m_xReportComponent->setPositionX(m_xReportComponent->getPositionX() + rSize.A());
- m_xReportComponent->setPositionY(m_xReportComponent->getPositionY() + rSize.B());
+
+ // LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point?
+ int nNewX = m_xReportComponent->getPositionX() + rSize.A();
+ // can this hinder us to set components outside the area?
+ // if (nNewX < 0)
+ // {
+ // nNewX = 0;
+ // }
+ m_xReportComponent->setPositionX(nNewX);
+ int nNewY = m_xReportComponent->getPositionY() + rSize.B();
+ if (nNewY < 0 && !bUndoMode)
+ {
+ aUndoSize.B() = abs(nNewY);
+ bPositionFixed = true;
+ nNewY = 0;
+ }
+ m_xReportComponent->setPositionY(nNewY);
+ }
+ if (bPositionFixed)
+ {
+ GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize));
}
-
// set geometry properties
SetPropsFromRect(GetLogicRect());
diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx
index 74444f23d..1cbc54555 100644
--- a/reportdesign/source/ui/inc/ReportSection.hxx
+++ b/reportdesign/source/ui/inc/ReportSection.hxx
@@ -59,6 +59,7 @@ namespace rptui
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pMulti;
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener;
::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection;
+ sal_Int32 m_nPaintEntranceCount;
DlgEdMode m_eMode;
sal_Bool m_bDialogModelChanged;
@@ -67,6 +68,9 @@ namespace rptui
/** fills the section with all control from the report section
*/
void fill();
+ /** checks all objects if they fit in the new paper width.
+ */
+ void impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_Int32 i_nLeftMargin,sal_Int32 i_nRightMargin);
OReportSection(OReportSection&);
void operator =(OReportSection&);
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
index 2b3e1c3fb..5a978c52d 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -36,6 +36,7 @@
#include <vector>
#include <boost/shared_ptr.hpp>
+#include <comphelper/propmultiplex.hxx>
#include <MarkedSection.hxx>
#include "ViewsWindow.hxx"
@@ -54,12 +55,16 @@ namespace rptui
class DlgEdFunc;
class DlgEdFactory;
- class OReportWindow : public Window, public IMarkedSection
+ class OReportWindow : public Window
+ , public IMarkedSection
+ , public ::cppu::BaseMutex
+ , public ::comphelper::OPropertyChangeListener
{
Ruler m_aHRuler;
ODesignView* m_pView;
OScrollWindowHelper* m_pParent;
OViewsWindow m_aViewsWindow;
+ ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener;
::std::auto_ptr<DlgEdFactory>
m_pObjFac;
@@ -72,6 +77,8 @@ namespace rptui
void operator =(OReportWindow&);
protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& _rEvent) throw( ::com::sun::star::uno::RuntimeException);
public:
OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView);
virtual ~OReportWindow();
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 8ddd37083..47cbe30fa 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -866,7 +866,10 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
uno::Reference< inspection::XNumericControl > xNumericControl(aOut.Control,uno::UNO_QUERY);
xNumericControl->setDecimalDigits( 2 );
xNumericControl->setValueUnit( util::MeasureUnit::MM_100TH );
- xNumericControl->setMinValue(beans::Optional<double>(sal_True,0.0));
+ uno::Reference< drawing::XShapeDescriptor> xShapeDesc(m_xReportComponent,uno::UNO_QUERY);
+ bool bSetMin = !xShapeDesc.is() || xShapeDesc->getShapeType() != ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape"));
+ if ( bSetMin )
+ xNumericControl->setMinValue(beans::Optional<double>(sal_True,0.0));
if ( nDisplayUnit != -1 )
xNumericControl->setDisplayUnit( nDisplayUnit );
uno::Reference< report::XReportComponent> xComp(m_xReportComponent,uno::UNO_QUERY);
@@ -884,7 +887,8 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
case PROPERTY_ID_POSITIONX:
case PROPERTY_ID_POSITIONY:
case PROPERTY_ID_WIDTH:
- xNumericControl->setMinValue(beans::Optional<double>(sal_True,0.0));
+ if ( bSetMin )
+ xNumericControl->setMinValue(beans::Optional<double>(sal_True,0.0));
xNumericControl->setMaxValue(beans::Optional<double>(sal_True,double(aSize.Width - nLeftMargin - nRightMargin)));
if ( PROPERTY_ID_WIDTH == nId )
{
diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx
index 8c3aa1f47..b1e490cac 100644
--- a/reportdesign/source/ui/misc/ColorListener.cxx
+++ b/reportdesign/source/ui/misc/ColorListener.cxx
@@ -82,15 +82,21 @@ void OColorListener::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------------
void OColorListener::setCollapsed(sal_Bool _bCollapsed)
{
- m_bCollapsed = _bCollapsed;
- if ( m_aCollapsedLink.IsSet() )
- m_aCollapsedLink.Call(this);
+ if ( m_bCollapsed != _bCollapsed )
+ {
+ m_bCollapsed = _bCollapsed;
+ if ( m_aCollapsedLink.IsSet() )
+ m_aCollapsedLink.Call(this);
+ }
}
// -----------------------------------------------------------------------------
void OColorListener::setMarked(sal_Bool _bMark)
{
- m_bMarked = _bMark;
- Invalidate();
+ if ( m_bMarked != _bMark)
+ {
+ m_bMarked = _bMark;
+ Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE);
+ }
}
// =======================================================================
}
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index c67b77520..1b47d2212 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -876,23 +876,21 @@ SdrObject* isOver(const Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, boo
{
if ( _pIgnore != pObjIter
&& (_bAllObjects || !_rView.IsObjMarked(pObjIter))
- && dynamic_cast<OUnoObject*>(pObjIter) != NULL )
+ && (dynamic_cast<OUnoObject*>(pObjIter) != NULL || dynamic_cast<OOle2Obj*>(pObjIter) != NULL))
{
if (_nIgnoreType == ISOVER_IGNORE_CUSTOMSHAPES && pObjIter->GetObjIdentifier() == OBJ_CUSTOMSHAPE)
{
continue;
}
- OUnoObject* pObj = dynamic_cast<OUnoObject*>(pObjIter);
- if (pObj != NULL)
- {
-
- Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect());
- if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
- pOverlappedObj = pObjIter;
+ if (dynamic_cast<OUnoObject*>(pObjIter) != NULL || dynamic_cast<OOle2Obj*>(pObjIter) != NULL)
+ {
+ Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect());
+ if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
+ pOverlappedObj = pObjIter;
+ }
}
}
- }
return pOverlappedObj;
}
// -----------------------------------------------------------------------------
@@ -923,7 +921,7 @@ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _
}
if ( (_bAllObjects || !_rView.IsObjMarked(pObjIter))
- && dynamic_cast<OUnoObject*>(pObjIter) != NULL )
+ && (dynamic_cast<OUnoObject*>(pObjIter) != NULL || dynamic_cast<OOle2Obj*>(pObjIter) != NULL) )
{
Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect());
if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
@@ -937,10 +935,9 @@ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _
SdrObject* isOver(SdrObject* _pObj,SdrPage& _rPage,SdrView& _rView,bool _bUnMarkedObjects)
{
SdrObject* pOverlappedObj = NULL;
- OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(_pObj);
- if ( pUnoObj ) // this doesn't need to be done for shapes
+ if (dynamic_cast<OUnoObject*>(_pObj) != NULL || dynamic_cast<OOle2Obj*>(_pObj) != NULL) // this doesn't need to be done for shapes
{
- Rectangle aRect = pUnoObj->GetCurrentBoundRect();
+ Rectangle aRect = _pObj->GetCurrentBoundRect();
pOverlappedObj = isOver(aRect,_rPage,_rView,_bUnMarkedObjects,_pObj);
}
return pOverlappedObj;
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 0d176070b..35055252d 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -494,11 +494,8 @@ IMPL_LINK( ODesignView, SplitHdl, void*, )
if ( (aOutputSize.Width() - nTest) >= nMinWidth && nTest > m_aScrollWindow.getMaxMarkerWidth(sal_False) )
{
long nOldSplitPos = getController().getSplitPos();
+ (void)nOldSplitPos;
getController().setSplitPos(nTest);
- if ( nOldSplitPos != -1 && nOldSplitPos <= nTest )
- {
- Invalidate(/*INVALIDATE_NOCHILDREN*/);
- }
}
return 0L;
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index ddaf0fbfa..ba5ca6b87 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -46,7 +46,6 @@ OEndMarker::OEndMarker(Window* _pParent ,const ::rtl::OUString& _sColorEntry)
DBG_CTOR( rpt_OEndMarker,NULL);
SetUniqueId(HID_RPT_ENDMARKER);
ImplInitSettings();
- SetPaintTransparent(sal_True);
}
// -----------------------------------------------------------------------------
OEndMarker::~OEndMarker()
@@ -89,6 +88,10 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ )
// -----------------------------------------------------------------------
void OEndMarker::ImplInitSettings()
{
+ EnableChildTransparentMode( sal_True );
+ SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetPaintTransparent( sal_True );
+
SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) );
SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() );
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index c6a367f9a..f0c424561 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -107,6 +107,7 @@
#include <svx/fmview.hxx>
#include <editeng/paperinf.hxx>
+#include <editeng/memberids.hrc>
#include <svx/svxids.hrc>
#include <svx/svdobj.hxx>
#include <svx/dataaccessdescriptor.hxx>
@@ -2494,8 +2495,11 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_LRSPACE,sal_True,&pItem))
{
- xProp->setPropertyValue(PROPERTY_LEFTMARGIN,uno::makeAny(static_cast<const SvxLRSpaceItem*>(pItem)->GetLeft()));
- xProp->setPropertyValue(PROPERTY_RIGHTMARGIN,uno::makeAny(static_cast<const SvxLRSpaceItem*>(pItem)->GetRight()));
+ Any aValue;
+ static_cast<const SvxLRSpaceItem*>(pItem)->QueryValue(aValue,MID_L_MARGIN);
+ xProp->setPropertyValue(PROPERTY_LEFTMARGIN,aValue);
+ static_cast<const SvxLRSpaceItem*>(pItem)->QueryValue(aValue,MID_R_MARGIN);
+ xProp->setPropertyValue(PROPERTY_RIGHTMARGIN,aValue);
}
if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_ULSPACE,sal_True,&pItem))
{
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 4f5b88af0..b0128c705 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -95,14 +95,18 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
,m_pMulti(NULL)
,m_pReportListener(NULL)
,m_xSection(_xSection)
+,m_nPaintEntranceCount(0)
,m_eMode(RPTUI_SELECT)
,m_bDialogModelChanged(sal_False)
,m_bInDrag(sal_False)
{
DBG_CTOR( rpt_OReportSection,NULL);
- EnableChildTransparentMode();
+ //EnableChildTransparentMode();
SetHelpId(HID_REPORTSECTION);
SetMapMode( MapMode( MAP_100TH_MM ) );
+ SetParentClipMode( PARENTCLIPMODE_CLIP );
+ EnableChildTransparentMode( sal_False );
+ SetPaintTransparent( sal_False );
try
{
@@ -142,8 +146,9 @@ void OReportSection::Paint( const Rectangle& rRect )
{
Window::Paint(rRect);
- if ( m_pView )
+ if ( m_pView && m_nPaintEntranceCount == 0)
{
+ ++m_nPaintEntranceCount;
// repaint, get PageView and prepare Region
SdrPageView* pPgView = m_pView->GetSdrPageView();
const Region aPaintRectRegion(rRect);
@@ -158,10 +163,7 @@ void OReportSection::Paint( const Rectangle& rRect )
OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
// draw background self using wallpaper
OutputDevice& rTargetOutDev = pTargetPaintWindow->GetTargetOutputDevice();
- sal_Int32 nColor = m_xSection->getBackColor();
- if ( nColor == (sal_Int32)COL_TRANSPARENT )
- nColor = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
- rTargetOutDev.DrawWallpaper(rRect, Wallpaper(Color(nColor)));
+ rTargetOutDev.DrawWallpaper(rRect, Wallpaper(pPgView->GetApplicationDocumentColor()));
}
// do paint (unbuffered) and mark repaint end
@@ -172,21 +174,13 @@ void OReportSection::Paint( const Rectangle& rRect )
}
m_pView->CompleteRedraw(this,aPaintRectRegion);
+ --m_nPaintEntranceCount;
}
}
//------------------------------------------------------------------------------
void OReportSection::Resize()
{
Window::Resize();
- if ( m_xSection.is() && m_pPage && m_pView )
- {
- uno::Reference<report::XReportDefinition> xReportDefinition = m_xSection->getReportDefinition();
- m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) );
- const Size aPageSize = m_pPage->GetSize();
- const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
- const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
- m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) );
- }
}
//------------------------------------------------------------------------------
void OReportSection::fill()
@@ -235,8 +229,9 @@ void OReportSection::fill()
nColor = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
m_pView->SetApplicationDocumentColor(nColor);
- const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_LEFTMARGIN);
- const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_RIGHTMARGIN);
+ uno::Reference<report::XReportDefinition> xReportDefinition = m_xSection->getReportDefinition();
+ const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
+ const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
m_pPage->SetLftBorder(nLeftMargin);
m_pPage->SetRgtBorder(nRightMargin);
@@ -247,15 +242,9 @@ void OReportSection::fill()
m_pView->StartListening( *m_pModel );
/*Resize();*/
- if ( m_xSection.is() && m_pPage && m_pView )
- {
- uno::Reference<report::XReportDefinition> xReportDefinition = m_xSection->getReportDefinition();
- m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) );
- const Size aPageSize = m_pPage->GetSize();
- const sal_Int32 nWorkAreaLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
- const sal_Int32 nWorkAreaRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
- m_pView->SetWorkArea( Rectangle( Point( nWorkAreaLeftMargin, 0), Size(aPageSize.Width() - nWorkAreaLeftMargin - nWorkAreaRightMargin,aPageSize.Height()) ) );
- } // if ( m_xSection.is() && m_pPage && m_pView )
+ m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) );
+ const Size aPageSize = m_pPage->GetSize();
+ m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) );
//SetBackground( Wallpaper( COL_BLUE ));
}
@@ -556,68 +545,78 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
{
m_pPage->SetRgtBorder(nRightMargin);
}
-
- try
+ const Size aOldPageSize = m_pPage->GetSize();
+ sal_Int32 nNewHeight = 5*m_xSection->getHeight();
+ if ( aOldPageSize.Height() != nNewHeight || nPaperWidth != aOldPageSize.Width() )
{
- sal_Int32 nRightBorder = nPaperWidth - nRightMargin;
- const sal_Int32 nCount = m_xSection->getCount();
- for (sal_Int32 i = 0; i < nCount; ++i)
+ m_pPage->SetSize( Size( nPaperWidth,nNewHeight) );
+ const Size aPageSize = m_pPage->GetSize();
+ m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) );
+ }
+ impl_adjustObjectSizePosition(nPaperWidth,nLeftMargin,nRightMargin);
+ m_pParent->Invalidate(INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT);
+ }
+ }
+}
+void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_Int32 i_nLeftMargin,sal_Int32 i_nRightMargin)
+{
+ try
+ {
+ sal_Int32 nRightBorder = i_nPaperWidth - i_nRightMargin;
+ const sal_Int32 nCount = m_xSection->getCount();
+ for (sal_Int32 i = 0; i < nCount; ++i)
+ {
+ bool bChanged = false;
+ uno::Reference< report::XReportComponent> xReportComponent(m_xSection->getByIndex(i),uno::UNO_QUERY_THROW);
+ awt::Point aPos = xReportComponent->getPosition();
+ awt::Size aSize = xReportComponent->getSize();
+ SvxShape* pShape = SvxShape::getImplementation( xReportComponent );
+ SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL;
+ if ( pObject )
+ {
+ OObjectBase* pBase = dynamic_cast<OObjectBase*>(pObject);
+ pBase->EndListening(sal_False);
+ if ( aPos.X < i_nLeftMargin )
{
- bool bChanged = false;
- uno::Reference< report::XReportComponent> xReportComponent(m_xSection->getByIndex(i),uno::UNO_QUERY_THROW);
- awt::Point aPos = xReportComponent->getPosition();
- awt::Size aSize = xReportComponent->getSize();
- SvxShape* pShape = SvxShape::getImplementation( xReportComponent );
- SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL;
- if ( pObject )
+ aPos.X = i_nLeftMargin;
+ bChanged = true;
+ }
+ if ( (aPos.X + aSize.Width) > nRightBorder )
+ {
+ aPos.X = nRightBorder - aSize.Width;
+ if ( aPos.X < i_nLeftMargin )
{
- OObjectBase* pBase = dynamic_cast<OObjectBase*>(pObject);
- pBase->EndListening(sal_False);
- if ( aPos.X < nLeftMargin )
- {
- aPos.X = nLeftMargin;
- bChanged = true;
- }
- if ( (aPos.X + aSize.Width) > nRightBorder )
- {
- aPos.X = nRightBorder - aSize.Width;
- if ( aPos.X < nLeftMargin )
- {
- aSize.Width += aPos.X - nLeftMargin;
- aPos.X = nLeftMargin;
- // add listener around
- pBase->StartListening();
- xReportComponent->setSize(aSize);
- pBase->EndListening(sal_False);
- }
- bChanged = true;
- }
- if ( aPos.Y < 0 )
- aPos.Y = 0;
- if ( bChanged )
- {
- xReportComponent->setPosition(aPos);
- correctOverlapping(pObject,*this,false);
- Rectangle aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize()));
- aRet.setHeight(aRet.getHeight() + 1);
- aRet.setWidth(aRet.getWidth() + 1);
- if ( m_xSection.is() && (static_cast<sal_uInt32>(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) )
- m_xSection->setHeight(aRet.getHeight() + aRet.Top());
-
- pObject->RecalcBoundRect();
- }
+ aSize.Width += aPos.X - i_nLeftMargin;
+ aPos.X = i_nLeftMargin;
+ // add listener around
pBase->StartListening();
+ xReportComponent->setSize(aSize);
+ pBase->EndListening(sal_False);
}
- } // for (sal_Int32 i = 0; i < nCount; ++i)
- }
- catch(uno::Exception)
- {
- OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged(");
+ bChanged = true;
+ }
+ if ( aPos.Y < 0 )
+ aPos.Y = 0;
+ if ( bChanged )
+ {
+ xReportComponent->setPosition(aPos);
+ correctOverlapping(pObject,*this,false);
+ Rectangle aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize()));
+ aRet.setHeight(aRet.getHeight() + 1);
+ aRet.setWidth(aRet.getWidth() + 1);
+ if ( m_xSection.is() && (static_cast<sal_uInt32>(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) )
+ m_xSection->setHeight(aRet.getHeight() + aRet.Top());
+
+ pObject->RecalcBoundRect();
+ }
+ pBase->StartListening();
}
-
- Resize();
- }
- }
+ } // for (sal_Int32 i = 0; i < nCount; ++i)
+ }
+ catch(uno::Exception)
+ {
+ OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged(");
+ }
}
//------------------------------------------------------------------------------
sal_Bool OReportSection::handleKeyEvent(const KeyEvent& _rEvent)
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index c16c3bd48..7bf1abf57 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -31,6 +31,7 @@
#include "ViewsWindow.hxx"
#include "ReportRuler.hxx"
#include "DesignView.hxx"
+#include "UITools.hxx"
#include <tools/debug.hxx>
#include <svtools/colorcfg.hxx>
@@ -65,6 +66,7 @@ DBG_NAME( rpt_OReportWindow )
//------------------------------------------------------------------------------
OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView)
: Window(_pParent,WB_DIALOGCONTROL)
+, ::comphelper::OPropertyChangeListener(m_aMutex)
,m_aHRuler(this)
,m_pView(_pView)
,m_pParent(_pParent)
@@ -88,11 +90,14 @@ OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView)
m_aHRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH);
ImplInitSettings();
+ m_pReportListener = addStyleListener(_pView->getController().getReportDefinition(),this);
}
//------------------------------------------------------------------------------
OReportWindow::~OReportWindow()
{
DBG_DTOR( rpt_OReportWindow,NULL);
+ if ( m_pReportListener.is() )
+ m_pReportListener->dispose();
}
// -----------------------------------------------------------------------------
void OReportWindow::initialize()
@@ -438,6 +443,15 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const
return nZoom;
}
+// -----------------------------------------------------------------------------
+void OReportWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException)
+{
+ (void)_rEvent;
+ Resize();
+ m_aViewsWindow.Resize();
+ static sal_Int32 nIn = INVALIDATE_TRANSPARENT;
+ Invalidate(nIn);
+}
//==================================================================
} //rptui
//==================================================================
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index 29e34be7b..22661f20a 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -370,7 +370,7 @@ void OScrollWindowHelper::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- ImplInitSettings();
+ ImplInitSettings();
Invalidate();
}
}
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx
index 9740e25ed..3e99dc1ec 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -52,6 +52,7 @@ OSectionView::OSectionView( SdrModel* pModel, OReportSection* _pSectionWindow, O
,m_pSectionWindow(_pSectionWindow)
{
DBG_CTOR( rpt_OSectionView,NULL);
+ // SetPagePaintingAllowed(false);
SetBufferedOutputAllowed(true);
SetBufferedOverlayAllowed(true);
SetPageBorderVisible(false);
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index cf13019b8..191e35461 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -109,7 +109,6 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep
}
_propertyChanged(aEvent);
- SetPaintTransparent(sal_True);
}
// -----------------------------------------------------------------------------
OSectionWindow::~OSectionWindow()
@@ -135,18 +134,15 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
const uno::Reference< report::XSection> xCurrentSection = m_aReportSection.getSection();
if ( _rEvent.PropertyName.equals(PROPERTY_HEIGHT) )
{
+ static bool t4 = true;
+ if ( t4 )
m_pParent->getView()->SetUpdateMode(sal_False);
- Resize();
+ //Resize();
m_pParent->getView()->notifySizeChanged();
m_pParent->resize(*this);
+ if ( t4 )
m_pParent->getView()->SetUpdateMode(sal_True);
- m_aStartMarker.Invalidate(INVALIDATE_NOERASE);
- m_aEndMarker.Invalidate(INVALIDATE_NOERASE);
- m_aReportSection.Invalidate(/*INVALIDATE_NOERASE*/);
- getViewsWindow()->getView()->getReportView()->getController().resetZoomType();
- // Invalidate(INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
- // m_pParent->Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE|INVALIDATE_TRANSPARENT);
- // m_pParent->Invalidate(/*INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE |*/ INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
+ // getViewsWindow()->getView()->getReportView()->getController().resetZoomType();
}
else if ( _rEvent.PropertyName.equals(PROPERTY_NAME) && !xSection->getGroup().is() )
{
@@ -155,7 +151,9 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
|| setReportSectionTitle(xReport,RID_STR_REPORT_FOOTER,::std::mem_fun(&OReportHelper::getReportFooter),::std::mem_fun(&OReportHelper::getReportFooterOn))
|| setReportSectionTitle(xReport,RID_STR_PAGE_HEADER,::std::mem_fun(&OReportHelper::getPageHeader),::std::mem_fun(&OReportHelper::getPageHeaderOn))
|| setReportSectionTitle(xReport,RID_STR_PAGE_FOOTER,::std::mem_fun(&OReportHelper::getPageFooter),::std::mem_fun(&OReportHelper::getPageFooterOn)) )
+ {
m_aStartMarker.Invalidate(INVALIDATE_NOERASE);
+ }
else
{
String sTitle = String(ModuleRes(RID_STR_DETAIL));
@@ -167,10 +165,9 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
else if ( _rEvent.PropertyName.equals(PROPERTY_EXPRESSION) )
{
uno::Reference< report::XGroup > xGroup(_rEvent.Source,uno::UNO_QUERY);
- if ( xGroup.is() )
+ if ( xGroup.is() && !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fun(&OGroupHelper::getHeader),::std::mem_fun(&OGroupHelper::getHeaderOn)))
{
- if ( !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fun(&OGroupHelper::getHeader),::std::mem_fun(&OGroupHelper::getHeaderOn)) )
- setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fun(&OGroupHelper::getFooter),::std::mem_fun(&OGroupHelper::getFooterOn));
+ setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fun(&OGroupHelper::getFooter),::std::mem_fun(&OGroupHelper::getFooterOn));
}
}
}
@@ -211,8 +208,14 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>&
//------------------------------------------------------------------------------
void OSectionWindow::ImplInitSettings()
{
+ static bool t = false;
+ if ( t )
+ {
+ EnableChildTransparentMode( sal_True );
+ SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetPaintTransparent( sal_True );
+ }
SetBackground( );
- //SetBackground( Wallpaper( COL_RED ));
}
//-----------------------------------------------------------------------------
void OSectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
@@ -307,10 +310,6 @@ IMPL_LINK( OSectionWindow, Collapsed, OColorListener *, _pMarker )
m_aSplitter.Show(bShow);
m_pParent->resize(*this);
- Resize();
- // TRY
- // m_pParent->Invalidate(INVALIDATE_TRANSPARENT | INVALIDATE_NOCHILDREN);
- Invalidate();
}
return 0L;
}
@@ -408,8 +407,6 @@ void OSectionWindow::scrollChildren(long _nX)
lcl_setOrigin(m_aSplitter,_nX, 0);
lcl_scroll(m_aSplitter,aDiff);
-
- Resize();
}
//==============================================================================
} // rptui
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 53916b179..ec9005a2f 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -71,6 +71,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol
initDefaultNodeImages();
ImplInitSettings();
m_aText.SetHelpId(HID_RPT_START_TITLE);
+ m_aText.SetPaintTransparent(sal_True);
m_aImage.SetHelpId(HID_RPT_START_IMAGE);
m_aText.Show();
m_aImage.Show();
@@ -83,7 +84,9 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol
m_aVRuler.SetMargin2();
const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH);
- SetPaintTransparent(sal_True);
+ EnableChildTransparentMode( sal_True );
+ SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetPaintTransparent( sal_True );
}
// -----------------------------------------------------------------------------
OStartMarker::~OStartMarker()
@@ -107,21 +110,23 @@ sal_Int32 OStartMarker::getMinHeight() const
// -----------------------------------------------------------------------------
void OStartMarker::Paint( const Rectangle& rRect )
{
- Window::Paint( rRect );
+ (void)rRect;
//SetUpdateMode(sal_False);
Size aSize = GetOutputSizePixel();
long nSize = aSize.Width();
const long nCornerWidth = long(CORNER_SPACE * (double)GetMapMode().GetScaleX());
- if ( !isCollapsed() )
+ if ( isCollapsed() )
+ {
+ SetClipRegion();
+ }
+ else
{
const long nVRulerWidth = m_aVRuler.GetSizePixel().Width();
nSize = aSize.Width() - nVRulerWidth/* - m_nCornerSize*/;
- SetClipRegion(Region(PixelToLogic(Rectangle(Point(),Size( nSize,aSize.Height())))));
aSize.Width() += nCornerWidth;
- } // if ( !isCollapsed() )
- else
- SetClipRegion();
+ SetClipRegion(Region(PixelToLogic(Rectangle(Point(),Size(nSize,aSize.Height())))));
+ }
const Point aGcc3WorkaroundTemporary;
Rectangle aWholeRect(aGcc3WorkaroundTemporary,aSize);
@@ -253,7 +258,7 @@ void OStartMarker::Resize()
Point aPos(aImageSize.Width() + (long)(aExtraWidth + aExtraWidth), aExtraWidth);
const long nHeight = ::std::max<sal_Int32>(nOutputHeight - 2*aPos.Y(),LogicToPixel(Size(0,m_aText.GetTextHeight())).Height());
m_aText.SetPosSizePixel(aPos,Size(aRulerPos.X() - aPos.X(),nHeight));
-
+
aPos.X() = aExtraWidth;
aPos.Y() += static_cast<sal_Int32>((LogicToPixel(Size(0,m_aText.GetTextHeight())).Height() - aImageSize.Height()) * 0.5) ;
m_aImage.SetPosSizePixel(aPos,aImageSize);
@@ -272,7 +277,6 @@ void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint)
== SFX_HINT_COLORS_CHANGED))
{
setColor();
- //m_aText.Invalidate();
Invalidate(INVALIDATE_CHILDREN);
}
}
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 2dd7c34b7..4e8acc367 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -85,7 +85,7 @@ bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,Sd
aNewRect.Move(_nXMov,_nYMov);
break;
}
- if ( dynamic_cast<OUnoObject*>(_pObj) )
+ if (dynamic_cast<OUnoObject*>(_pObj) != NULL || dynamic_cast<OOle2Obj*>(_pObj) != NULL)
{
pOverlappedObj = isOver(aNewRect,*_pObj->GetPage(),*_pView,true,_pObj);
if ( pOverlappedObj && _pObj != pOverlappedObj )
@@ -244,8 +244,9 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow)
if ( bSet )
{
impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,bSet);
- pSectionWindow->Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
- pSectionWindow->getStartMarker().Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT );
+ static sal_Int32 nIn = INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT;
+ pSectionWindow->getStartMarker().Invalidate( nIn ); // INVALIDATE_NOERASE |INVALIDATE_NOCHILDREN| INVALIDATE_TRANSPARENT
+ pSectionWindow->getEndMarker().Invalidate( nIn );
}
} // for (;aIter != aEnd ; ++aIter,++nPos)
Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
@@ -256,7 +257,6 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow)
m_pParent->notifySizeChanged();
Rectangle aRect(PixelToLogic(Point(0,0)),aOut);
- Invalidate(aRect,INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
}
//------------------------------------------------------------------------------
void OViewsWindow::Resize()
@@ -294,7 +294,7 @@ void OViewsWindow::Paint( const Rectangle& rRect )
//------------------------------------------------------------------------------
void OViewsWindow::ImplInitSettings()
{
- // SetBackground( Wallpaper( COL_LIGHTBLUE ));
+ EnableChildTransparentMode( sal_True );
SetBackground( );
SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );
SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );
@@ -317,7 +317,6 @@ void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSectio
::boost::shared_ptr<OSectionWindow> pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) );
m_aSections.insert(getIteratorAtPos(_nPosition) , TSectionsMap::value_type(pSectionWindow));
m_pParent->setMarked(&pSectionWindow->getReportSection().getSectionView(),m_aSections.size() == 1);
-
Resize();
}
//----------------------------------------------------------------------------
@@ -566,8 +565,8 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView)
// -----------------------------------------------------------------------
void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32)
{
- ImplInitSettings();
- Invalidate();
+ ImplInitSettings();
+ Invalidate();
}
// -----------------------------------------------------------------------------
void OViewsWindow::MouseButtonDown( const MouseEvent& rMEvt )
@@ -868,7 +867,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli
TRectangleMap::iterator aInterSectRectIter = aSortRectangles.begin();
for (; aInterSectRectIter != aRectIter; ++aInterSectRectIter)
{
- if ( pView == aInterSectRectIter->second.second && dynamic_cast<OUnoObject*>(aInterSectRectIter->second.first) )
+ if ( pView == aInterSectRectIter->second.second && (dynamic_cast<OUnoObject*>(aInterSectRectIter->second.first) || dynamic_cast<OOle2Obj*>(aInterSectRectIter->second.first)))
{
SdrObject* pPreviousObj = aInterSectRectIter->second.first;
Rectangle aIntersectRect = aTest.GetIntersection(_bBoundRects ? pPreviousObj->GetCurrentBoundRect() : pPreviousObj->GetSnapRect());
@@ -946,7 +945,8 @@ void OViewsWindow::setGridSnap(sal_Bool bOn)
for (; aIter != aEnd ; ++aIter)
{
(*aIter)->getReportSection().getSectionView().SetGridSnap(bOn);
- (*aIter)->getReportSection().Invalidate();
+ static sal_Int32 nIn = 0;
+ (*aIter)->getReportSection().Invalidate(nIn);
}
}
// -----------------------------------------------------------------------------
@@ -1654,6 +1654,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode)
{
// restrict movement to work area
Rectangle rWorkArea = rView.GetWorkArea();
+ rWorkArea.Right()++;
if ( !rWorkArea.IsEmpty() )
{
@@ -1681,11 +1682,56 @@ void OViewsWindow::handleKey(const KeyCode& _rCode)
for (sal_uInt32 i = 0; !bCheck && i < rMarkList.GetMarkCount();++i )
{
SdrMark* pMark = rMarkList.GetMark(i);
- bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL;
+ bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL|| dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj());
}
- if ( bCheck && isOver(aMarkRect,*rReportSection.getPage(),rView) )
- break;
+
+ if ( bCheck )
+ {
+ SdrObject* pOverlapped = isOver(aMarkRect,*rReportSection.getPage(),rView);
+ if ( pOverlapped )
+ {
+ do
+ {
+ Rectangle aOver = pOverlapped->GetLastBoundRect();
+ Point aPos;
+ if ( nCode == KEY_UP )
+ {
+ aPos.X() = aMarkRect.Left();
+ aPos.Y() = aOver.Top() - aMarkRect.getHeight();
+ nY += (aPos.Y() - aMarkRect.Top());
+ }
+ else if ( nCode == KEY_DOWN )
+ {
+ aPos.X() = aMarkRect.Left();
+ aPos.Y() = aOver.Bottom();
+ nY += (aPos.Y() - aMarkRect.Top());
+ }
+ else if ( nCode == KEY_LEFT )
+ {
+ aPos.X() = aOver.Left() - aMarkRect.getWidth();
+ aPos.Y() = aMarkRect.Top();
+ nX += (aPos.X() - aMarkRect.Left());
+ }
+ else if ( nCode == KEY_RIGHT )
+ {
+ aPos.X() = aOver.Right();
+ aPos.Y() = aMarkRect.Top();
+ nX += (aPos.X() - aMarkRect.Left());
+ }
+
+ aMarkRect.SetPos(aPos);
+ if ( !rWorkArea.IsInside( aMarkRect ) )
+ {
+ break;
+ }
+ pOverlapped = isOver(aMarkRect,*rReportSection.getPage(),rView);
+ }
+ while(pOverlapped != NULL);
+ if (pOverlapped != NULL)
+ break;
+ }
+ }
}
if ( nX != 0 || nY != 0 )
@@ -1724,7 +1770,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode)
for (sal_uInt32 i = 0; !bCheck && i < rMarkList.GetMarkCount();++i )
{
SdrMark* pMark = rMarkList.GetMark(i);
- bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL;
+ bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL || dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj()) != NULL;
if ( bCheck )
aNewRect.Union(pMark->GetMarkedSdrObj()->GetLastBoundRect());
}
@@ -1826,7 +1872,8 @@ void OViewsWindow::zoom(const Fraction& _aZoom)
aOut = PixelToLogic(aOut);
Rectangle aRect(PixelToLogic(Point(0,0)),aOut);
- Invalidate(aRect,/*INVALIDATE_NOERASE | */INVALIDATE_NOCHILDREN /*| INVALIDATE_TRANSPARENT*/);
+ static sal_Int32 nIn = INVALIDATE_NOCHILDREN;
+ Invalidate(aRect,nIn);
}
//----------------------------------------------------------------------------
void OViewsWindow::scrollChildren(const Point& _aThumbPos)
@@ -1843,8 +1890,6 @@ void OViewsWindow::scrollChildren(const Point& _aThumbPos)
SetMapMode( aMapMode );
//OWindowPositionCorrector aCorrector(this,0,-( aOld.Y() + aPosY.Y()));
Scroll(0, -( aOld.Y() + aPosY.Y()),SCROLL_CHILDREN);
- Resize();
- Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_TRANSPARENT);
}
TSectionsMap::iterator aIter = m_aSections.begin();
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index 8f3cdd43e..57e0c756f 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -92,8 +92,12 @@ void DlgEdFunc::ForceScroll( const Point& rPos )
aStartWidth *= m_pParent->GetMapMode().GetScaleX();
aOut.Width() -= (long)aStartWidth;
+ aOut.Height() = m_pParent->GetOutputSizePixel().Height();
- Rectangle aOutRect( pScrollWindow->getThumbPos(), aOut );
+ Point aPos = pScrollWindow->getThumbPos();
+ aPos.X() *= 0.5;
+ aPos.Y() *= 0.5;
+ Rectangle aOutRect( aPos, aOut );
aOutRect = m_pParent->PixelToLogic( aOutRect );
//Rectangle aWorkArea = m_pParent->getView()->GetWorkArea();
Point aGcc3WorkaroundTemporary;
@@ -618,7 +622,7 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt)
while( (pObjIter = aIter.Next()) != NULL && !bIsSetPoint)
{
if ( m_rView.IsObjMarked(pObjIter)
- && dynamic_cast<OUnoObject*>(pObjIter) != NULL )
+ && (dynamic_cast<OUnoObject*>(pObjIter) != NULL || dynamic_cast<OOle2Obj*>(pObjIter) != NULL) )
{
Rectangle aNewRect = pObjIter->GetLastBoundRect();
long nDx = rDragStat.IsHorFixed() ? 0 : rDragStat.GetDX();