diff options
author | Noel Power <noel.power@suse.com> | 2013-02-19 17:29:32 +0000 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-02-19 18:09:24 +0000 |
commit | 2b1aa949539d2fcbb3d349be3c279996630d83fc (patch) | |
tree | 661e8b800eda9c0fcc4b6228e61183e3b05ab033 /sc/inc | |
parent | 0d05957cf0c38abab45030ba172025e4ef318f43 (diff) |
fdo#56276 - resize/reposition rotated shapes in a sensible way
Change-Id: Ifa4f848da21838591daa1f57fb42dfd3f4fa8044
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/document.hxx | 10 | ||||
-rw-r--r-- | sc/inc/drwlayer.hxx | 7 | ||||
-rw-r--r-- | sc/inc/table.hxx | 10 | ||||
-rw-r--r-- | sc/inc/userdat.hxx | 1 |
4 files changed, 16 insertions, 12 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 4e1014514ad6..0663cb9f6982 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1300,14 +1300,14 @@ public: sal_uInt16 nNewHeight ); SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual ); - SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const; SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const; SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const; - SC_DLLPUBLIC sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const; SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const; sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const; - SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab ) const; - SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const; + SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const; SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const; SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const; @@ -1458,7 +1458,7 @@ public: void RestorePrintRanges( const ScPrintRangeSaver& rSaver ); SC_DLLPUBLIC Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const; + SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const; SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const Rectangle& rMMRect ) const; void UpdStlShtPtrsFrmNms(); diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx index 72b980d5fea7..0329f6c7ad5a 100644 --- a/sc/inc/drwlayer.hxx +++ b/sc/inc/drwlayer.hxx @@ -93,6 +93,7 @@ private: SCsCOL nDx,SCsROW nDy, bool bUpdateNoteCaptionPos ); void RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegativePage, bool bUpdateNoteCaptionPos ); + void ResizeLastRectFromAnchor( SdrObject* pObj, ScDrawObjData& rData, bool bUseLogicRect, bool bNegativePage, bool bCanResize, bool bHiddenAsZero = true ); public: ScDrawLayer( ScDocument* pDocument, const String& rName ); @@ -169,14 +170,16 @@ public: static bool IsCellAnchored( const SdrObject& rObj ); static void SetPageAnchored( SdrObject& ); static void SetCellAnchored( SdrObject&, const ScDrawObjData &rAnchor ); + static void SetVisualCellAnchored( SdrObject&, const ScDrawObjData &rAnchor ); // Updates rAnchor based on position of rObj - static void GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab ); + static void GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect = true, bool bHiddenAsZero = true ); static void SetCellAnchoredFromPosition( SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab ); - static void UpdateCellAnchorFromPositionEnd( SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab ); + static void UpdateCellAnchorFromPositionEnd( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect = true ); static ScAnchorType GetAnchorType( const SdrObject& ); // positions for detektive lines static ScDrawObjData* GetObjData( SdrObject* pObj, sal_Bool bCreate=false ); + static ScDrawObjData* GetNonRotatedObjData( SdrObject* pObj, sal_Bool bCreate=false ); // The sheet information in ScDrawObjData isn't updated when sheets are inserted/deleted. // Use this method to get an object with positions on the specified sheet (should be the diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index fd2aece5e356..a43c04d3cedf 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -629,12 +629,12 @@ public: // nPPT to test for modification void SetManualHeight( SCROW nStartRow, SCROW nEndRow, bool bManual ); - sal_uInt16 GetColWidth( SCCOL nCol ) const; + sal_uInt16 GetColWidth( SCCOL nCol, bool bHiddenAsZero = true ) const; SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL, bool bHiddenAsZero = true ) const; - sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const; + sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true ) const; sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const; - sal_uLong GetColOffset( SCCOL nCol ) const; - sal_uLong GetRowOffset( SCROW nRow ) const; + sal_uLong GetColOffset( SCCOL nCol, bool bHiddenAsZero = true ) const; + sal_uLong GetRowOffset( SCROW nRow, bool bHiddenAsZero = true ) const; /** * Get the last row such that the height of row 0 to the end row is as @@ -727,7 +727,7 @@ public: SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const; SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const; SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const; - sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow) const; + sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true) const; SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol) const; diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx index 06939d26210a..29f09b5caffe 100644 --- a/sc/inc/userdat.hxx +++ b/sc/inc/userdat.hxx @@ -34,6 +34,7 @@ #define SC_UD_OBJDATA 1 #define SC_UD_IMAPDATA 2 #define SC_UD_MACRODATA 3 +#define SC_UD_ALTOBJDATA 4 //------------------------------------------------------------------------- |